dect
/
asterisk
Archived
13
0
Fork 0

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/trunk@152442 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
tilghman 2008-10-28 21:38:26 +00:00
parent c10d849458
commit 1268965df1
1 changed files with 2 additions and 1 deletions

View File

@ -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 */