Fix register command of linphone-daemon that was sending three responses to a unique command...

This commit is contained in:
Ghislain MARY 2016-11-28 17:24:41 +01:00
parent de7a430668
commit ba441492c3

View file

@ -37,7 +37,6 @@ void RegisterCommand::exec(Daemon *app, const char *args) {
ostringstream ostr;
char proxy[256] = { 0 }, identity[128] = { 0 }, password[64] = { 0 }, userid[128] = { 0 }, realm[128] = { 0 }, parameter[256] = { 0 };
if (sscanf(args, "%255s %127s %63s %127s %127s %255s", identity, proxy, password, userid, realm, parameter) >= 2) {
app->sendResponse(Response(ostr.str().c_str(), Response::Ok));
if (strcmp(password, "NULL") == 0) {
password[0] = 0;
}
@ -50,7 +49,6 @@ void RegisterCommand::exec(Daemon *app, const char *args) {
if (strcmp(parameter, "NULL") == 0) {
parameter[0] = 0;
}
app->sendResponse(Response(ostr.str().c_str(), Response::Ok));
LinphoneProxyConfig *cfg = linphone_proxy_config_new();
if (password[0] != '\0') {
LinphoneAddress *from = linphone_address_new(identity);