[asterisk-commits] tilghman: trunk r176501 - /trunk/channels/chan_sip.c

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


Author: tilghman
Date: Tue Feb 17 08:39:36 2009
New Revision: 176501

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176501
Log:
In this version, we can combine the queries, because we support dropping
nonexistent columns.

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=176501&r1=176500&r2=176501
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Tue Feb 17 08:39:36 2009
@@ -4158,18 +4158,15 @@
 		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
 			"port", port, "regseconds", regseconds,
 			deprecated_username ? "username" : "defaultuser", defaultuser,
-			"useragent", useragent,
+			"useragent", useragent, "lastms", str_lastms,
 			fc, fullcontact, syslabel, sysname, SENTINEL); /* note fc and syslabel _can_ be NULL */
 	} else {
 		ast_update_realtime(tablename, "name", peername, "ipaddr", ipaddr,
 			"port", port, "regseconds", regseconds,
-			"useragent", useragent,
+			"useragent", useragent, "lastms", str_lastms,
 			deprecated_username ? "username" : "defaultuser", defaultuser,
 			syslabel, sysname, SENTINEL); /* 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);
 }
 
 /*! \brief Automatically add peer extension to dial plan */




More information about the asterisk-commits mailing list