[asterisk-commits] tilghman: branch 1.6.0 r176502 - /branches/1.6.0/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Feb 17 08:42:10 CST 2009


Author: tilghman
Date: Tue Feb 17 08:42:10 2009
New Revision: 176502

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176502
Log:
In 1.6.0, the tablename is stored in a variable.

Modified:
    branches/1.6.0/channels/chan_sip.c

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=176502&r1=176501&r2=176502
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Tue Feb 17 08:42:10 2009
@@ -3486,7 +3486,7 @@
 			deprecated_username ? "username" : "defaultuser", defaultuser, syslabel, sysname, NULL); /* note syslabel _can_ be NULL */
 	/* We cannot do this in the same statement as above, because the lack of
 	 * this field could cause the whole statement to fail. */
-	ast_update_realtime("sippeers", "name", peername, "lastms", str_lastms, NULL);
+	ast_update_realtime(tablename, "name", peername, "lastms", str_lastms, NULL);
 }
 
 /*! \brief Automatically add peer extension to dial plan */
@@ -9890,7 +9890,7 @@
 	if (!sip_cfg.ignore_regexpire) {
 		if (peer->rt_fromcontact) {
 			ast_update_realtime(tablename, "name", peer->name, "fullcontact", "", "ipaddr", "", "port", "", "regseconds", "0", peer->deprecated_username ? "username" : "defaultuser", "", "regserver", "", NULL);
-			ast_update_realtime("sippeers", "name", peer->name, "lastms", "", NULL);
+			ast_update_realtime(tablename, "name", peer->name, "lastms", "", NULL);
 		} else {
 			ast_db_del("SIP/Registry", peer->name);
 		}
@@ -15495,7 +15495,7 @@
 		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("sippeers", "name", peer->name, "lastms", str_lastms, NULL);
+		ast_update_realtime(tablename, "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);
@@ -19761,7 +19761,7 @@
 	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("sippeers", "name", peer->name, "lastms", "-1", NULL);
+		ast_update_realtime(tablename, "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