From: Michael Jerris Date: Fri, 21 May 2010 18:40:36 +0000 (-0400) Subject: possible fix for FSCORE-575 X-Git-Tag: git2svn-syncpoint-master~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7996819fcac37d6d2a096d7af284cb818d6a5e0a;p=thirdparty%2Ffreeswitch.git possible fix for FSCORE-575 --- diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 55b3f314e2..9190f9107f 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -2393,10 +2393,8 @@ sofia_gateway_t *sofia_reg_find_gateway_by_realm__(const char *file, const char switch_mutex_lock(mod_sofia_globals.hash_mutex); for (hi = switch_hash_first(NULL, mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) { switch_hash_this(hi, &var, NULL, &val); - if ((gateway = (sofia_gateway_t *) val)) { - if (!strcasecmp(gateway->register_realm, key)) { - break; - } + if ((gateway = (sofia_gateway_t *) val) && gateway->register_realm && !strcasecmp(gateway->register_realm, key)) { + break; } else { gateway = NULL; }