From: Matthew Nicholson Date: Tue, 14 Sep 2010 19:26:18 +0000 (+0000) Subject: Don't clear the username from a realtime database when a registration expires. X-Git-Tag: 1.4.37-rc1~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b34044bd3a20eef70d185668b1697404c9467933;p=thirdparty%2Fasterisk.git Don't clear the username from a realtime database when a registration expires. 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 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index addfbd9e71..3aedc0a705 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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);