From 99be09a66e1704b14a8f4ee8936507448c01acce Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 23 Apr 2007 20:38:00 +0000 Subject: [PATCH] del reg git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5007 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/sofia_reg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c index 2237024b1f..9c6fb59b69 100644 --- a/src/mod/endpoints/mod_sofia/sofia_reg.c +++ b/src/mod/endpoints/mod_sofia/sofia_reg.c @@ -391,6 +391,11 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han switch_safe_free(sql); sql = NULL; } + if ((sql = switch_mprintf("delete from sip_registrations where user='%q' and host='%q'", from_user, from_host))) { + sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, profile->ireg_mutex); + switch_safe_free(sql); + sql = NULL; + } if (switch_event_create(&event, SWITCH_EVENT_PRESENCE_OUT) == SWITCH_STATUS_SUCCESS) { switch_event_add_header(event, SWITCH_STACK_BOTTOM, "proto", "sip"); switch_event_add_header(event, SWITCH_STACK_BOTTOM, "login", "%s", profile->url);