[svn-commits] russell: branch russell/chan_refcount r82630 - in /team/russell/chan_refcount...
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Sep 17 14:05:27 CDT 2007
Author: russell
Date: Mon Sep 17 14:05:26 2007
New Revision: 82630
URL: http://svn.digium.com/view/asterisk?view=rev&rev=82630
Log:
sync with trunk
Modified:
team/russell/chan_refcount/ (props changed)
team/russell/chan_refcount/apps/app_dial.c
team/russell/chan_refcount/apps/app_meetme.c
team/russell/chan_refcount/apps/app_queue.c
team/russell/chan_refcount/channels/chan_iax2.c
team/russell/chan_refcount/channels/chan_sip.c
team/russell/chan_refcount/channels/chan_skinny.c
team/russell/chan_refcount/include/asterisk/utils.h
team/russell/chan_refcount/pbx/pbx_config.c
team/russell/chan_refcount/res/ael/pval.c
team/russell/chan_refcount/res/res_features.c
Propchange: team/russell/chan_refcount/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Sep 17 14:05:26 2007
@@ -1,1 +1,1 @@
-/trunk:1-82618
+/trunk:1-82629
Modified: team/russell/chan_refcount/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_dial.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/apps/app_dial.c (original)
+++ team/russell/chan_refcount/apps/app_dial.c Mon Sep 17 14:05:26 2007
@@ -1970,7 +1970,7 @@
if (!con)
ast_log(LOG_ERROR, "Dial virtual context 'app_dial_gosub_virtual_context' does not exist and unable to create\n");
else
- ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free, "app_dial");
+ ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_dial");
res = ast_register_application(app, dial_exec, synopsis, descrip);
res |= ast_register_application(rapp, retrydial_exec, rsynopsis, rdescrip);
Modified: team/russell/chan_refcount/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_meetme.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/apps/app_meetme.c (original)
+++ team/russell/chan_refcount/apps/app_meetme.c Mon Sep 17 14:05:26 2007
@@ -4715,7 +4715,7 @@
return -1;
}
if (ast_add_extension2(context, 0 /* don't replace */, "s", 1,
- NULL, NULL, slatrunk_app, ast_strdup(trunk->name), ast_free, sla_registrar)) {
+ NULL, NULL, slatrunk_app, ast_strdup(trunk->name), ast_free_ptr, sla_registrar)) {
ast_log(LOG_ERROR, "Failed to automatically create extension "
"for trunk '%s'!\n", trunk->name);
destroy_trunk(trunk);
@@ -4854,7 +4854,7 @@
/* The extension for when the handset goes off-hook.
* exten => station1,1,SLAStation(station1) */
if (ast_add_extension2(context, 0 /* don't replace */, station->name, 1,
- NULL, NULL, slastation_app, ast_strdup(station->name), ast_free, sla_registrar)) {
+ NULL, NULL, slastation_app, ast_strdup(station->name), ast_free_ptr, sla_registrar)) {
ast_log(LOG_ERROR, "Failed to automatically create extension "
"for trunk '%s'!\n", station->name);
destroy_station(station);
@@ -4869,7 +4869,7 @@
/* Extension for this line button
* exten => station1_line1,1,SLAStation(station1_line1) */
if (ast_add_extension2(context, 0 /* don't replace */, exten, 1,
- NULL, NULL, slastation_app, ast_strdup(exten), ast_free, sla_registrar)) {
+ NULL, NULL, slastation_app, ast_strdup(exten), ast_free_ptr, sla_registrar)) {
ast_log(LOG_ERROR, "Failed to automatically create extension "
"for trunk '%s'!\n", station->name);
destroy_station(station);
Modified: team/russell/chan_refcount/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/apps/app_queue.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/apps/app_queue.c (original)
+++ team/russell/chan_refcount/apps/app_queue.c Mon Sep 17 14:05:26 2007
@@ -4979,7 +4979,7 @@
if (!con)
ast_log(LOG_ERROR, "Queue virtual context 'app_queue_gosub_virtual_context' does not exist and unable to create\n");
else
- ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free, "app_queue");
+ ast_add_extension2(con, 1, "s", 1, NULL, NULL, "KeepAlive", ast_strdup(""), ast_free_ptr, "app_queue");
if (queue_persistent_members)
reload_queue_members();
Modified: team/russell/chan_refcount/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_iax2.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/channels/chan_iax2.c (original)
+++ team/russell/chan_refcount/channels/chan_iax2.c Mon Sep 17 14:05:26 2007
@@ -6057,7 +6057,7 @@
if (onoff) {
if (!ast_exists_extension(NULL, regcontext, ext, 1, NULL))
ast_add_extension(regcontext, 1, ext, 1, NULL, NULL,
- "Noop", ast_strdup(peer->name), ast_free, "IAX2");
+ "Noop", ast_strdup(peer->name), ast_free_ptr, "IAX2");
} else
ast_context_remove_extension(regcontext, ext, 1, NULL);
}
Modified: team/russell/chan_refcount/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_sip.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/channels/chan_sip.c (original)
+++ team/russell/chan_refcount/channels/chan_sip.c Mon Sep 17 14:05:26 2007
@@ -2906,7 +2906,7 @@
}
if (onoff)
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
ast_context_remove_extension(context, ext, 1, NULL);
}
Modified: team/russell/chan_refcount/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/channels/chan_skinny.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/channels/chan_skinny.c (original)
+++ team/russell/chan_refcount/channels/chan_skinny.c Mon Sep 17 14:05:26 2007
@@ -1628,7 +1628,7 @@
context = regcontext;
}
ast_add_extension(context, 1, ext, 1, NULL, NULL, "Noop",
- ast_strdup(l->name), ast_free, "Skinny");
+ ast_strdup(l->name), ast_free_ptr, "Skinny");
}
}
Modified: team/russell/chan_refcount/include/asterisk/utils.h
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/include/asterisk/utils.h?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/include/asterisk/utils.h (original)
+++ team/russell/chan_refcount/include/asterisk/utils.h Mon Sep 17 14:05:26 2007
@@ -408,20 +408,22 @@
long int ast_random(void);
+#define ast_free free
+
/*!
* \brief free() wrapper
*
- * ast_free should be used when a function pointer for free() needs to be passed
+ * ast_free_ptr should be used when a function pointer for free() needs to be passed
* as the argument to a function. Otherwise, astmm will cause seg faults.
*/
#ifdef __AST_DEBUG_MALLOC
-static void ast_free(void *ptr) attribute_unused;
-static void ast_free(void *ptr)
-{
- free(ptr);
+static void ast_free_ptr(void *ptr) attribute_unused;
+static void ast_free_ptr(void *ptr)
+{
+ ast_free(ptr);
}
#else
-#define ast_free free
+#define ast_free_ptr ast_free
#endif
#ifndef __AST_DEBUG_MALLOC
Modified: team/russell/chan_refcount/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/pbx/pbx_config.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/pbx/pbx_config.c (original)
+++ team/russell/chan_refcount/pbx/pbx_config.c Mon Sep 17 14:05:26 2007
@@ -1439,7 +1439,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, registrar)) {
+ if (ast_add_extension2(con, 0, realext, ipri, label, cidmatch, appl, strdup(data), ast_free_ptr, registrar)) {
ast_log(LOG_WARNING, "Unable to register extension at line %d\n", v->lineno);
}
}
@@ -1567,9 +1567,9 @@
/* If voicemail, use "stdexten" else use plain old dial */
if (hasvoicemail) {
snprintf(tmp, sizeof(tmp), "stdexten,%s,${HINT}", cat);
- ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free, registrar);
+ ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Macro", strdup(tmp), ast_free_ptr, registrar);
} else {
- ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free, registrar);
+ ast_add_extension2(con, 0, cat, 1, NULL, NULL, "Dial", strdup("${HINT}"), ast_free_ptr, registrar);
}
}
}
Modified: team/russell/chan_refcount/res/ael/pval.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/res/ael/pval.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/res/ael/pval.c (original)
+++ team/russell/chan_refcount/res/ael/pval.c Mon Sep 17 14:05:26 2007
@@ -49,6 +49,7 @@
#ifdef AAL_ARGCHECK
#include "asterisk/argdesc.h"
#endif
+#include "asterisk/utils.h"
extern int localized_pbx_load_module(void);
@@ -3702,7 +3703,7 @@
pbx_substitute_variables_helper(NULL, exten->name, realext, sizeof(realext) - 1);
if (exten->hints) {
if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, PRIORITY_HINT, NULL, exten->cidmatch,
- exten->hints, NULL, ast_free, registrar)) {
+ exten->hints, NULL, ast_free_ptr, registrar)) {
ast_log(LOG_WARNING, "Unable to add step at priority 'hint' of extension '%s'\n",
exten->name);
}
@@ -3782,7 +3783,7 @@
label = 0;
if (ast_add_extension2(exten->context, 0 /*no replace*/, realext, pr->priority_num, (label?label:NULL), exten->cidmatch,
- app, strdup(appargs), ast_free, registrar)) {
+ app, strdup(appargs), ast_free_ptr, registrar)) {
ast_log(LOG_WARNING, "Unable to add step at priority '%d' of extension '%s'\n", pr->priority_num,
exten->name);
}
Modified: team/russell/chan_refcount/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_refcount/res/res_features.c?view=diff&rev=82630&r1=82629&r2=82630
==============================================================================
--- team/russell/chan_refcount/res/res_features.c (original)
+++ team/russell/chan_refcount/res/res_features.c Mon Sep 17 14:05:26 2007
@@ -498,7 +498,7 @@
ast_clear_flag(peer, AST_FLAG_MASQ_NOSTREAM);
}
if (con) {
- if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, ast_strdup(pu->parkingexten), ast_free, registrar))
+ if (!ast_add_extension2(con, 1, pu->parkingexten, 1, NULL, NULL, parkedcall, ast_strdup(pu->parkingexten), ast_free_ptr, registrar))
notify_metermaids(pu->parkingexten, parking_con, AST_DEVICE_INUSE);
}
if (pu->notquiteyet) {
@@ -2091,7 +2091,7 @@
if (con) {
char returnexten[AST_MAX_EXTENSION];
snprintf(returnexten, sizeof(returnexten), "%s,,t", peername);
- ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free, registrar);
+ ast_add_extension2(con, 1, peername, 1, NULL, NULL, "Dial", ast_strdup(returnexten), ast_free_ptr, registrar);
}
if (comebacktoorigin) {
set_c_e_p(chan, parking_con_dial, peername, 1);
More information about the svn-commits
mailing list