提交 da2397d0 authored 作者: Anthony Minessale's avatar Anthony Minessale

update

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3414 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 fc03e90d
...@@ -4150,28 +4150,27 @@ static void sip_r_register(int status, ...@@ -4150,28 +4150,27 @@ static void sip_r_register(int status,
if (!(scheme && realm)) { if (!(scheme && realm)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No scheme and realm!\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No scheme and realm!\n");
return;
} }
} }
if (!(scheme && realm)) {
return;
}
duprealm = strdup(realm); if (sofia_private) {
if (sofia_private->oreg) {
oreg = sofia_private->oreg;
} else if (profile) {
outbound_reg_t *oregp;
if ((duprealm = strdup(realm))) {
qrealm = duprealm; qrealm = duprealm;
while(qrealm && *qrealm && *qrealm == '"') { while(*qrealm && *qrealm == '"') {
qrealm++; qrealm++;
} }
if ((p = strchr(qrealm, '"'))) { if ((p = strchr(qrealm, '"'))) {
*p = '\0'; *p = '\0';
} }
if (sofia_private) {
if (sofia_private->oreg) {
oreg = sofia_private->oreg;
} else if (profile) {
outbound_reg_t *oregp;
for (oregp = profile->registrations; oregp; oregp = oregp->next) { for (oregp = profile->registrations; oregp; oregp = oregp->next) {
if (scheme && qrealm && !strcasecmp(oregp->register_scheme, scheme) && !strcasecmp(oregp->register_realm, qrealm)) { if (scheme && qrealm && !strcasecmp(oregp->register_scheme, scheme) && !strcasecmp(oregp->register_realm, qrealm)) {
oreg = oregp; oreg = oregp;
...@@ -4181,11 +4180,13 @@ static void sip_r_register(int status, ...@@ -4181,11 +4180,13 @@ static void sip_r_register(int status,
if (!oreg) { if (!oreg) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Match for Scheme [%s] Realm [%s]\n", scheme, qrealm); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No Match for Scheme [%s] Realm [%s]\n", scheme, qrealm);
} }
switch_safe_free(duprealm);
} else {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Memory Error!\n");
return;
}
} }
} }
switch_safe_free(duprealm);
if (!oreg) { if (!oreg) {
return; return;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论