Skip to content
Snippets Groups Projects
Commit a87b81e4 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #9910: fix 606 error code nomenclature

A 606 error doesn't necessarily have anything to do with STUN
parent e22663eb
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ enum RegistrationState {
ErrorNetwork ,
ErrorHost,
ErrorExistStun,
ErrorConfStun,
ErrorNotAcceptable,
NumberOfStates
};
......
......@@ -1572,7 +1572,7 @@ void registration_cb(pjsip_regc_cbparam *param)
if (param->code < 0 || param->code >= 300) {
switch (param->code) {
case 606:
account->setRegistrationState(ErrorConfStun);
account->setRegistrationState(ErrorNotAcceptable);
break;
case 503:
......
......@@ -162,8 +162,8 @@ const gchar * account_state_name(account_state_t s)
return _("Network unreachable");
case ACCOUNT_STATE_ERROR_HOST:
return _("Host unreachable");
case ACCOUNT_STATE_ERROR_CONF_STUN:
return _("Stun configuration error");
case ACCOUNT_STATE_ERROR_NOT_ACCEPTABLE:
return _("Not acceptable");
case ACCOUNT_STATE_ERROR_EXIST_STUN:
return _("Stun server invalid");
case ACCOUNT_STATE_IP2IP_READY:
......
......@@ -58,7 +58,7 @@ typedef enum {
/** Stun server is not existing. The account is not registered */
ACCOUNT_STATE_ERROR_EXIST_STUN,
/** Stun server configuration error. The account is not registered */
ACCOUNT_STATE_ERROR_CONF_STUN,
ACCOUNT_STATE_ERROR_NOT_ACCEPTABLE,
/** IP2IP Account is always ready */
ACCOUNT_STATE_IP2IP_READY,
/** Invalid state */
......
......@@ -227,17 +227,17 @@ void sflphone_fill_account_list(void)
acc->state = ACCOUNT_STATE_TRYING;
else if (g_strcmp0(status, "ERROR") == 0)
acc->state = ACCOUNT_STATE_ERROR;
else if (g_strcmp0(status , "ERROR_AUTH") == 0)
else if (g_strcmp0(status, "ERROR_AUTH") == 0)
acc->state = ACCOUNT_STATE_ERROR_AUTH;
else if (g_strcmp0(status , "ERROR_NETWORK") == 0)
else if (g_strcmp0(status, "ERROR_NETWORK") == 0)
acc->state = ACCOUNT_STATE_ERROR_NETWORK;
else if (g_strcmp0(status , "ERROR_HOST") == 0)
else if (g_strcmp0(status, "ERROR_HOST") == 0)
acc->state = ACCOUNT_STATE_ERROR_HOST;
else if (g_strcmp0(status , "ERROR_CONF_STUN") == 0)
acc->state = ACCOUNT_STATE_ERROR_CONF_STUN;
else if (g_strcmp0(status , "ERROR_EXIST_STUN") == 0)
else if (g_strcmp0(status, "ERROR_NOT_ACCEPTABLE") == 0)
acc->state = ACCOUNT_STATE_ERROR_NOT_ACCEPTABLE;
else if (g_strcmp0(status, "ERROR_EXIST_STUN") == 0)
acc->state = ACCOUNT_STATE_ERROR_EXIST_STUN;
else if (g_strcmp0(status , "ACCOUNT_STATE_IP2IP_READY") == 0)
else if (g_strcmp0(status, "ACCOUNT_STATE_IP2IP_READY") == 0)
acc->state = ACCOUNT_STATE_IP2IP_READY;
else
acc->state = ACCOUNT_STATE_INVALID;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment