]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
del reg
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 23 Apr 2007 20:38:00 +0000 (20:38 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 23 Apr 2007 20:38:00 +0000 (20:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5007 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia_reg.c

index 2237024b1f018d93c7629b3b7746c5997720e5ab..9c6fb59b698f541563f432c22936877c133f24ad 100644 (file)
@@ -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);