[Asterisk-cvs] asterisk pbx.c,1.247,1.248

kpfleming at lists.digium.com kpfleming at lists.digium.com
Thu Jun 2 22:18:05 CDT 2005


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv4835

Modified Files:
	pbx.c 
Log Message:
allow ast_add_extension2 to accept a NULL destructor (bug #4411)


Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -d -r1.247 -r1.248
--- pbx.c	3 Jun 2005 01:42:31 -0000	1.247
+++ pbx.c	3 Jun 2005 02:21:07 -0000	1.248
@@ -4514,6 +4514,10 @@
 	return count;
 }
 
+static void null_datad(void *foo)
+{
+}
+
 /*
  * EBUSY - can't lock
  * EEXIST - extension with the same priority exist and no replace is set
@@ -4560,6 +4564,8 @@
 		length ++;
 
 	/* Be optimistic:  Build the extension structure first */
+	if (datad == NULL)
+		datad = null_datad;
 	tmp = malloc(length);
 	if (tmp) {
 		memset(tmp, 0, length);




More information about the svn-commits mailing list