From: Tilghman Lesher Date: Tue, 17 Feb 2009 14:39:36 +0000 (+0000) Subject: In this version, we can combine the queries, because we support dropping X-Git-Tag: 1.6.2.0-beta1~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef94685d3254c9586cd0ba66e08834b2dd2852e7;p=thirdparty%2Fasterisk.git In this version, we can combine the queries, because we support dropping nonexistent columns. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176501 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index f9f0c94556..da32f627a7 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4158,18 +4158,15 @@ static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, 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 */