diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-28 21:40:06 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-10-28 21:40:06 +0000 |
commit | 969193907d8e8c769f9e4f4f00bee3e02b77cf7a (patch) | |
tree | 18f0aeb90cdb7f063d3ad326d55355e0773610ed | |
parent | 54f6f9d46dfd351fb542fb97d6daf19ba1589bad (diff) |
Merged revisions 152442 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r152442 | tilghman | 2008-10-28 16:38:26 -0500 (Tue, 28 Oct 2008) | 7 lines
Only re-add the io port if it was closed, otherwise reload causes a memory
leak.
(closes issue #13785)
Reported by: eliel
Patches:
chan_mgcp.c.patch uploaded by eliel (license 64)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@152444 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_mgcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index a5c54d4b9..1d3f1c636 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -3431,8 +3431,9 @@ static void *do_monitor(void *data) ast_verb(1, "Reloading MGCP\n"); reload_config(1); /* Add an I/O event to our UDP socket */ - if (mgcpsock > -1) + if (mgcpsock > -1 && !mgcpsock_read_id) { mgcpsock_read_id = ast_io_add(io, mgcpsock, mgcpsock_read, AST_IO_IN, NULL); + } } /* Check for interfaces needing to be killed */ |