[asterisk-commits] tilghman: branch 1.6.0 r188837 - in /branches/1.6.0: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 16 17:03:40 CDT 2009
Author: tilghman
Date: Thu Apr 16 17:03:35 2009
New Revision: 188837
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=188837
Log:
Merged revisions 188836 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r188836 | tilghman | 2009-04-16 16:57:37 -0500 (Thu, 16 Apr 2009) | 14 lines
Merged revisions 188835 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r188835 | tilghman | 2009-04-16 16:41:13 -0500 (Thu, 16 Apr 2009) | 7 lines
Only update realtime, if global option rtupdate != false
(closes issue #14885)
Reported by: deepesh
Patches:
20090413__bug14885.diff.txt uploaded by tilghman (license 14)
Tested by: deepesh
........
................
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_sip.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=188837&r1=188836&r2=188837
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Thu Apr 16 17:03:35 2009
@@ -9902,7 +9902,7 @@
char *tablename = (realtimeregs) ? "sipregs" : "sippeers";
if (!sip_cfg.ignore_regexpire) {
- if (peer->rt_fromcontact) {
+ if (peer->rt_fromcontact && sip_cfg.peer_rtupdate) {
ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", peer->deprecated_username ? "username" : "defaultuser", "", "regserver", "", NULL);
ast_update_realtime(tablename, "name", peer->name, "lastms", "", NULL);
} else {
@@ -15579,7 +15579,9 @@
ast_log(LOG_NOTICE, "Peer '%s' is now %s. (%dms / %dms)\n",
peer->name, s, pingtime, peer->maxms);
ast_device_state_changed("SIP/%s", peer->name);
- ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", str_lastms, NULL);
+ if (sip_cfg.peer_rtupdate) {
+ ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", str_lastms, NULL);
+ }
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus",
"ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: %s\r\nTime: %d\r\n",
peer->name, s, pingtime);
@@ -19827,7 +19829,9 @@
peer->pokeexpire = -1;
if (peer->lastms > -1) {
ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Last qualify: %d\n", peer->name, peer->lastms);
- ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", "-1", NULL);
+ if (sip_cfg.peer_rtupdate) {
+ ast_update_realtime(ast_check_realtime("sipregs") ? "sipregs" : "sippeers", "name", peer->name, "lastms", "-1", NULL);
+ }
manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, -1);
if (global_regextenonqualify) {
register_peer_exten(peer, FALSE);
More information about the asterisk-commits
mailing list