[svn-commits] tilghman: trunk r152442 - /trunk/channels/chan_mgcp.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Oct 28 16:38:27 CDT 2008


Author: tilghman
Date: Tue Oct 28 16:38:26 2008
New Revision: 152442

URL: http://svn.digium.com/view/asterisk?view=rev&rev=152442
Log:
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)

Modified:
    trunk/channels/chan_mgcp.c

Modified: trunk/channels/chan_mgcp.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_mgcp.c?view=diff&rev=152442&r1=152441&r2=152442
==============================================================================
--- trunk/channels/chan_mgcp.c (original)
+++ trunk/channels/chan_mgcp.c Tue Oct 28 16:38:26 2008
@@ -3431,8 +3431,9 @@
 			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 */




More information about the svn-commits mailing list