[asterisk-commits] tilghman: branch 1.2 r43019 -
/branches/1.2/channels/chan_iax2.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sat Sep 16 00:57:04 MST 2006
Author: tilghman
Date: Sat Sep 16 02:57:04 2006
New Revision: 43019
URL: http://svn.digium.com/view/asterisk?rev=43019&view=rev
Log:
When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)
Modified:
branches/1.2/channels/chan_iax2.c
Modified: branches/1.2/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_iax2.c?rev=43019&r1=43018&r2=43019&view=diff
==============================================================================
--- branches/1.2/channels/chan_iax2.c (original)
+++ branches/1.2/channels/chan_iax2.c Sat Sep 16 02:57:04 2006
@@ -2600,6 +2600,7 @@
static void destroy_user(struct iax2_user *user);
static int expire_registry(void *data);
+static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, time_t regtime);
static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in *sin)
{
@@ -2685,6 +2686,7 @@
time(&nowtime);
if ((nowtime - regseconds) > IAX_DEFAULT_REG_EXPIRE) {
memset(&peer->addr, 0, sizeof(peer->addr));
+ realtime_update_peer(peer->name, &peer->addr, 0);
if (option_debug)
ast_log(LOG_DEBUG, "realtime_peer: Bah, '%s' is expired (%d/%d/%d)!\n",
peername, (int)(nowtime - regseconds), (int)regseconds, (int)nowtime);
More information about the asterisk-commits
mailing list