[svn-commits] trunk r8678 - in /trunk: ./ channels/chan_sip.c
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Wed Jan 25 12:16:16 MST 2006
Author: russell
Date: Wed Jan 25 13:16:14 2006
New Revision: 8678
URL: http://svn.digium.com/view/asterisk?rev=8678&view=rev
Log:
Merged revisions 8677 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r8677 | russell | 2006-01-25 14:14:43 -0500 (Wed, 25 Jan 2006) | 3 lines
don't call ast_update_realtime with uninitialized variables if we get a
registration with an expirey of 0 seconds (issue #6173)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=8678&r1=8677&r2=8678&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Jan 25 13:16:14 2006
@@ -1596,16 +1596,15 @@
{
char port[10];
char ipaddr[20];
- char regseconds[20] = "0";
+ char regseconds[20];
+ time_t nowtime;
- if (expirey) { /* Registration */
- time_t nowtime;
- time(&nowtime);
- nowtime += expirey;
- snprintf(regseconds, sizeof(regseconds), "%d", (int)nowtime); /* Expiration time */
- ast_inet_ntoa(ipaddr, sizeof(ipaddr), sin->sin_addr);
- snprintf(port, sizeof(port), "%d", ntohs(sin->sin_port));
- }
+ time(&nowtime);
+ nowtime += expirey;
+ snprintf(regseconds, sizeof(regseconds), "%d", (int)nowtime); /* Expiration time */
+ ast_inet_ntoa(ipaddr, sizeof(ipaddr), sin->sin_addr);
+ snprintf(port, sizeof(port), "%d", ntohs(sin->sin_port));
+
if (fullcontact)
ast_update_realtime("sippeers", "name", peername, "ipaddr", ipaddr, "port", port, "regseconds", regseconds, "username", username, "fullcontact", fullcontact, NULL);
else
More information about the svn-commits
mailing list