code before declaration

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3155 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2006-10-22 15:46:01 +00:00
parent 71043450c7
commit 49a130962c
1 changed files with 5 additions and 4 deletions

View File

@ -3810,6 +3810,11 @@ static void sip_r_register(int status,
nua_handle_destroy(nh);
}
} else if (status == 401 || status == 407) {
char const *realm = (char const *) *authenticate->au_params;
char const *scheme = (char const *) authenticate->au_scheme;
char authentication[256] = "";
int ss_state;
if (sip->sip_www_authenticate) {
authenticate = sip->sip_www_authenticate;
@ -3820,10 +3825,6 @@ static void sip_r_register(int status,
return;
}
char const *realm = (char const *) *authenticate->au_params;
char const *scheme = (char const *) authenticate->au_scheme;
char authentication[256] = "";
int ss_state;
snprintf(authentication, sizeof(authentication), "%s:%s:%s:%s", scheme, strstr(realm, "=") + 1,
oreg->register_username,