[svn-commits] kpfleming: branch jpeeler/bug13593-2 r180797 - in /team/jpeeler/bug13593-2: c...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 10 06:38:23 CDT 2009


Author: kpfleming
Date: Tue Mar 10 06:38:19 2009
New Revision: 180797

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=180797
Log:
replace a few references to ast_free() with ast_free_ptr(); when a pointer to a function to free memory is needed, ast_free_ptr() *MUST* be used, so that the proper definition can be supplied for both normal and MALLOC_DEBUG situations


Modified:
    team/jpeeler/bug13593-2/channels/chan_sip.c
    team/jpeeler/bug13593-2/main/features.c
    team/jpeeler/bug13593-2/pbx/pbx_config.c
    team/jpeeler/bug13593-2/utils/extconf.c

Modified: team/jpeeler/bug13593-2/channels/chan_sip.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug13593-2/channels/chan_sip.c?view=diff&rev=180797&r1=180796&r2=180797
==============================================================================
--- team/jpeeler/bug13593-2/channels/chan_sip.c (original)
+++ team/jpeeler/bug13593-2/channels/chan_sip.c Tue Mar 10 06:38:19 2009
@@ -4200,7 +4200,7 @@
 		if (onoff) {
 			if (!ast_exists_extension(NULL, context, ext, 1, NULL)) {
 				ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
-					 ast_strdup(peer->name), ast_free, "SIP");
+					 ast_strdup(peer->name), ast_free_ptr, "SIP");
 			}
 		} else if (pbx_find_extension(NULL, NULL, &q, context, ext, 1, NULL, "", E_MATCH)) {
 			ast_context_remove_extension(context, ext, 1, NULL);

Modified: team/jpeeler/bug13593-2/main/features.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug13593-2/main/features.c?view=diff&rev=180797&r1=180796&r2=180797
==============================================================================
--- team/jpeeler/bug13593-2/main/features.c (original)
+++ team/jpeeler/bug13593-2/main/features.c Tue Mar 10 06:38:19 2009
@@ -3544,7 +3544,7 @@
 	/* Add a parking extension into the context */
 	if (!oldparkinglot) {
 		if (!ast_strlen_zero(ast_parking_ext())) {
-			if (ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, NULL, parkcall, strdup(""), ast_free, registrar) == -1)
+			if (ast_add_extension2(con, 1, ast_parking_ext(), 1, NULL, NULL, parkcall, strdup(""), ast_free_ptr, registrar) == -1)
 				error = 1;
 		}
 	}

Modified: team/jpeeler/bug13593-2/pbx/pbx_config.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug13593-2/pbx/pbx_config.c?view=diff&rev=180797&r1=180796&r2=180797
==============================================================================
--- team/jpeeler/bug13593-2/pbx/pbx_config.c (original)
+++ team/jpeeler/bug13593-2/pbx/pbx_config.c Tue Mar 10 06:38:19 2009
@@ -1754,7 +1754,7 @@
 				c = altcopy;
 				ext = strsep(&c, ",");
 				while (ext) {
-					ast_add_extension2(con, 0, ext, 1, NULL, NULL, "Goto", strdup(tmp), ast_free, registrar);
+					ast_add_extension2(con, 0, ext, 1, NULL, NULL, "Goto", strdup(tmp), ast_free_ptr, registrar);
 					ext = strsep(&c, ",");
 				}
 			}

Modified: team/jpeeler/bug13593-2/utils/extconf.c
URL: http://svn.digium.com/svn-view/asterisk/team/jpeeler/bug13593-2/utils/extconf.c?view=diff&rev=180797&r1=180796&r2=180797
==============================================================================
--- team/jpeeler/bug13593-2/utils/extconf.c (original)
+++ team/jpeeler/bug13593-2/utils/extconf.c Tue Mar 10 06:38:19 2009
@@ -6092,7 +6092,7 @@
 						lastpri = ipri;
 						if (!ast_opt_dont_warn && !strcmp(realext, "_."))
 							ast_log(LOG_WARNING, "The use of '_.' for an extension is strongly discouraged and can have unexpected behavior.  Please use '_X.' instead at line %d\n", v->lineno);
-						if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free, global_registrar)) {
+						if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free_ptr, global_registrar)) {
 							ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno);
 						}
 					}




More information about the svn-commits mailing list