diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-16 08:10:55 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-09-16 08:10:55 +0000 |
commit | 9e59e6756a63094c5fc1b2a3af256a27b33ee41b (patch) | |
tree | 2f7f32a34f3fd8cecfbd4711ebbee95208632e3f | |
parent | 4ba23c8dc4fb587725f3bfd7e0a24e43e028684a (diff) |
Merged revisions 43019 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r43019 | tilghman | 2006-09-16 02:57:04 -0500 (Sat, 16 Sep 2006) | 2 lines
When a realtime peer expires, reset the ipaddress in the realtime database back to 0 (Issue 6656)
........
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43024 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_iax2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 54675b86a..6400ca22f 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -800,6 +800,7 @@ static struct ast_channel *iax2_request(const char *type, int format, void *data static struct ast_frame *iax2_read(struct ast_channel *c); static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, int temponly); static struct iax2_user *build_user(const char *name, struct ast_variable *v, int temponly); +static void realtime_update_peer(const char *peername, struct sockaddr_in *sin, time_t regtime); static void destroy_user(struct iax2_user *user); static void prune_peers(void); @@ -2496,6 +2497,7 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in 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); |