]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Don't clear the username from a realtime database when a registration expires.
authorMatthew Nicholson <mnicholson@digium.com>
Tue, 14 Sep 2010 19:26:18 +0000 (19:26 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Tue, 14 Sep 2010 19:26:18 +0000 (19:26 +0000)
Non-realtime chan_sip does not clear the username from memory when a registration expiries so realtime probably shouldn't either.

(closes issue #17551)
Reported by: ricardolandim
Patches:
      reg-expiry-username-1.4-fix1.diff uploaded by mnicholson (license 96)
      reg-expiry-username-1.6.2-fix1.diff uploaded by mnicholson (license 96)
      reg-expiry-username-1.8-fix1.diff uploaded by mnicholson (license 96)
      reg-expiry-username-trunk-fix1.diff uploaded by mnicholson (license 96)
Tested by: ricardolandim, mnicholson

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@286756 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index addfbd9e716483c632135d092c144fee8a2638f6..3aedc0a705ef9c4cea50efd0e8347a0c10ea3a31 100644 (file)
@@ -8543,7 +8543,7 @@ static void destroy_association(struct sip_peer *peer)
 {
        if (!ast_test_flag(&global_flags[1], SIP_PAGE2_IGNOREREGEXPIRE)) {
                if (ast_test_flag(&peer->flags[1], SIP_PAGE2_RT_FROMCONTACT) && ast_test_flag(&global_flags[1], SIP_PAGE2_RTUPDATE)) {
-                       ast_update_realtime("sippeers", "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", "username", "", "regserver", "", NULL);
+                       ast_update_realtime("sippeers", "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", "regserver", "", NULL);
                        ast_update_realtime("sippeers", "name", peer->name, "lastms", "", NULL);
                } else 
                        ast_db_del("SIP/Registry", peer->name);