From: Mathieu Rene Date: Tue, 24 Aug 2010 22:09:25 +0000 (-0400) Subject: Avoiding segfault X-Git-Tag: v1.2-rc1~464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a6ae735c747ae52e3ace461472fb6b563fee5d7;p=thirdparty%2Ffreeswitch.git Avoiding segfault --- diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 2ded7ee4c4..1623d3d4e8 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -1160,7 +1160,7 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand sql = switch_mprintf("delete from sip_registrations where call_id='%q'", call_id); } } else { - sql = switch_mprintf("delete from sip_subscriptions where sip_user='%q' and sip_host='%q'"); + sql = switch_mprintf("delete from sip_subscriptions where sip_user='%q' and sip_host='%q'", to_user, reg_host); sofia_glue_execute_sql_now(profile, &sql, SWITCH_TRUE); sql = switch_mprintf("delete from sip_registrations where sip_user='%q' and sip_host='%q'", to_user, reg_host); }