From cce887c6ccd7839f2895951470b8f27d7cacde28 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 26 May 2008 16:09:08 +0000 Subject: [PATCH] fix mwi git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8662 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_presence.c | 26 +++++++++----------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c index 26b42d527a..d009657276 100644 --- a/src/mod/endpoints/mod_sofia/sofia_presence.c +++ b/src/mod/endpoints/mod_sofia/sofia_presence.c @@ -274,23 +274,21 @@ static void actual_sofia_presence_mwi_event_handler(switch_event_t *event) switch_safe_free(sql); - if (h.total) { - sql = switch_mprintf("select sip_user,sip_host,contact,'%q' from sip_registrations where sip_user='%q' and sip_host='%q'", - stream.data, user, host); + + sql = switch_mprintf("select sip_user,sip_host,contact,'%q' from sip_registrations where sip_user='%q' and sip_host='%q'", + stream.data, user, host); - switch_assert (sql != NULL); - sofia_glue_execute_sql_callback(profile, - SWITCH_FALSE, - profile->ireg_mutex, - sql, - sofia_presence_mwi_callback2, - &h); - - switch_safe_free(sql); - } - + switch_assert (sql != NULL); + sofia_glue_execute_sql_callback(profile, + SWITCH_FALSE, + profile->ireg_mutex, + sql, + sofia_presence_mwi_callback2, + &h); + + switch_safe_free(sql); switch_safe_free(stream.data);