From 7996819fcac37d6d2a096d7af284cb818d6a5e0a Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 21 May 2010 14:40:36 -0400 Subject: [PATCH] possible fix for FSCORE-575 --- src/mod/endpoints/mod_sofia/sofia_reg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; }