Added support of default ID
This commit is contained in:
parent
fd65ad7769
commit
ebc4aa16bc
3 changed files with 22 additions and 7 deletions
SVXLink/echolink
|
@ -18,6 +18,7 @@ BrandMeisterBridge::BrandMeisterBridge()
|
|||
proxy = NULL;
|
||||
store = NULL;
|
||||
talker = NULL;
|
||||
unknown = ECHOLINK_DEFAULT_USER_NUMBER;
|
||||
}
|
||||
|
||||
BrandMeisterBridge::~BrandMeisterBridge()
|
||||
|
@ -29,6 +30,11 @@ BrandMeisterBridge::~BrandMeisterBridge()
|
|||
|
||||
// Interface methods for ModuleEchoLink
|
||||
|
||||
void BrandMeisterBridge::setDefaultConfiguration(const char* configuration)
|
||||
{
|
||||
unknown = strtol(configuration, NULL, 10);
|
||||
}
|
||||
|
||||
void BrandMeisterBridge::setProxyConfiguration(const char* configuration)
|
||||
{
|
||||
char* pointer = const_cast<char*>(configuration);
|
||||
|
@ -95,7 +101,7 @@ void BrandMeisterBridge::setTalker(const char* call, const char* name)
|
|||
|
||||
uint32_t number = store->getPrivateIDForCall(call);
|
||||
if (number == 0)
|
||||
number = ECHOLINK_DEFAULT_USER_NUMBER;
|
||||
number = unknown;
|
||||
|
||||
syslog(LOG_INFO, "Set talker ID to %d for call-sign %s", number, call);
|
||||
proxy->setTalkerID(number);
|
||||
|
@ -125,9 +131,8 @@ void BrandMeisterBridge::handleChatMessage(const char* text)
|
|||
}
|
||||
else
|
||||
{
|
||||
uint32_t number = ECHOLINK_DEFAULT_USER_NUMBER;
|
||||
syslog(LOG_INFO, "Set talker ID to %d (call-sign was not fit into chat message)", number);
|
||||
proxy->setTalkerID(number);
|
||||
syslog(LOG_INFO, "Set talker ID to %d (call-sign was not fit into chat message)", unknown);
|
||||
proxy->setTalkerID(unknown);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ class BrandMeisterBridge
|
|||
BrandMeisterBridge();
|
||||
~BrandMeisterBridge();
|
||||
|
||||
void setDefaultConfiguration(const char* configuration);
|
||||
void setProxyConfiguration(const char* configuration);
|
||||
void setStoreConfiguration(const char* configuration);
|
||||
|
||||
|
@ -25,6 +26,7 @@ class BrandMeisterBridge
|
|||
PatchCordProxy* proxy;
|
||||
UserDataStore* store;
|
||||
char* talker;
|
||||
int unknown;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue