[asterisk-commits] file: branch file/usecnt-cleanup r53976 - in
/team/file/usecnt-cleanup: apps/...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Feb 11 16:31:09 MST 2007
Author: file
Date: Sun Feb 11 17:31:08 2007
New Revision: 53976
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53976
Log:
Update dialplan functions so that they too will keep proper use counts with their respective modules.
Modified:
team/file/usecnt-cleanup/apps/app_queue.c
team/file/usecnt-cleanup/apps/app_speech_utils.c
team/file/usecnt-cleanup/apps/app_voicemail.c
team/file/usecnt-cleanup/channels/chan_agent.c
team/file/usecnt-cleanup/channels/chan_iax2.c
team/file/usecnt-cleanup/channels/chan_sip.c
team/file/usecnt-cleanup/funcs/func_base64.c
team/file/usecnt-cleanup/funcs/func_blacklist.c
team/file/usecnt-cleanup/funcs/func_callerid.c
team/file/usecnt-cleanup/funcs/func_cdr.c
team/file/usecnt-cleanup/funcs/func_channel.c
team/file/usecnt-cleanup/funcs/func_curl.c
team/file/usecnt-cleanup/funcs/func_cut.c
team/file/usecnt-cleanup/funcs/func_db.c
team/file/usecnt-cleanup/funcs/func_enum.c
team/file/usecnt-cleanup/funcs/func_env.c
team/file/usecnt-cleanup/funcs/func_global.c
team/file/usecnt-cleanup/funcs/func_groupcount.c
team/file/usecnt-cleanup/funcs/func_logic.c
team/file/usecnt-cleanup/funcs/func_math.c
team/file/usecnt-cleanup/funcs/func_md5.c
team/file/usecnt-cleanup/funcs/func_module.c
team/file/usecnt-cleanup/funcs/func_odbc.c
team/file/usecnt-cleanup/funcs/func_rand.c
team/file/usecnt-cleanup/funcs/func_realtime.c
team/file/usecnt-cleanup/funcs/func_sha1.c
team/file/usecnt-cleanup/funcs/func_shell.c
team/file/usecnt-cleanup/funcs/func_strings.c
team/file/usecnt-cleanup/funcs/func_timeout.c
team/file/usecnt-cleanup/funcs/func_uri.c
team/file/usecnt-cleanup/funcs/func_version.c
team/file/usecnt-cleanup/funcs/func_vmcount.c
team/file/usecnt-cleanup/include/asterisk/pbx.h
team/file/usecnt-cleanup/main/pbx.c
team/file/usecnt-cleanup/pbx/pbx_dundi.c
Modified: team/file/usecnt-cleanup/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/apps/app_queue.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/apps/app_queue.c (original)
+++ team/file/usecnt-cleanup/apps/app_queue.c Sun Feb 11 17:31:08 2007
@@ -4637,10 +4637,10 @@
res |= ast_manager_register("QueueRemove", EVENT_FLAG_AGENT, manager_remove_queue_member, "Remove interface from queue.");
res |= ast_manager_register("QueuePause", EVENT_FLAG_AGENT, manager_pause_queue_member, "Makes a queue member temporarily unavailable");
res |= ast_manager_register("QueueLog", EVENT_FLAG_AGENT, manager_queue_log_custom, "Adds custom entry in queue_log");
- res |= ast_custom_function_register(&queuevar_function);
- res |= ast_custom_function_register(&queuemembercount_function);
- res |= ast_custom_function_register(&queuememberlist_function);
- res |= ast_custom_function_register(&queuewaitingcount_function);
+ res |= ast_custom_function_register(&queuevar_function, ast_module_info->self);
+ res |= ast_custom_function_register(&queuemembercount_function, ast_module_info->self);
+ res |= ast_custom_function_register(&queuememberlist_function, ast_module_info->self);
+ res |= ast_custom_function_register(&queuewaitingcount_function, ast_module_info->self);
res |= ast_devstate_add(statechange_queue, NULL);
return res;
Modified: team/file/usecnt-cleanup/apps/app_speech_utils.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/apps/app_speech_utils.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/apps/app_speech_utils.c (original)
+++ team/file/usecnt-cleanup/apps/app_speech_utils.c Sun Feb 11 17:31:08 2007
@@ -724,11 +724,11 @@
res |= ast_register_application("SpeechBackground", speech_background, "Play a sound file and wait for speech to be recognized", speechbackground_descrip, ast_module_info->self);
res |= ast_register_application("SpeechDestroy", speech_destroy, "End speech recognition", speechdestroy_descrip, ast_module_info->self);
res |= ast_register_application("SpeechProcessingSound", speech_processing_sound, "Change background processing sound", speechprocessingsound_descrip, ast_module_info->self);
- res |= ast_custom_function_register(&speech_function);
- res |= ast_custom_function_register(&speech_score_function);
- res |= ast_custom_function_register(&speech_text_function);
- res |= ast_custom_function_register(&speech_grammar_function);
- res |= ast_custom_function_register(&speech_engine_function);
+ res |= ast_custom_function_register(&speech_function, ast_module_info->self);
+ res |= ast_custom_function_register(&speech_score_function, ast_module_info->self);
+ res |= ast_custom_function_register(&speech_text_function, ast_module_info->self);
+ res |= ast_custom_function_register(&speech_grammar_function, ast_module_info->self);
+ res |= ast_custom_function_register(&speech_engine_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/apps/app_voicemail.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/apps/app_voicemail.c (original)
+++ team/file/usecnt-cleanup/apps/app_voicemail.c Sun Feb 11 17:31:08 2007
@@ -7688,7 +7688,7 @@
res |= ast_register_application(app2, vm_execmain, synopsis_vmain, descrip_vmain, ast_module_info->self);
res |= ast_register_application(app3, vm_box_exists, synopsis_vm_box_exists, descrip_vm_box_exists, ast_module_info->self);
res |= ast_register_application(app4, vmauthenticate, synopsis_vmauthenticate, descrip_vmauthenticate, ast_module_info->self);
- res |= ast_custom_function_register(&mailbox_exists_acf);
+ res |= ast_custom_function_register(&mailbox_exists_acf, ast_module_info->self);
if (res)
return(res);
Modified: team/file/usecnt-cleanup/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_agent.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_agent.c (original)
+++ team/file/usecnt-cleanup/channels/chan_agent.c Sun Feb 11 17:31:08 2007
@@ -2476,7 +2476,7 @@
ast_cli_register_multiple(cli_agents, sizeof(cli_agents) / sizeof(struct ast_cli_entry));
/* Dialplan Functions */
- ast_custom_function_register(&agent_function);
+ ast_custom_function_register(&agent_function, ast_module_info->self);
return 0;
}
Modified: team/file/usecnt-cleanup/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_iax2.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_iax2.c (original)
+++ team/file/usecnt-cleanup/channels/chan_iax2.c Sun Feb 11 17:31:08 2007
@@ -10100,8 +10100,8 @@
struct iax2_registry *reg = NULL;
struct iax2_peer *peer = NULL;
- ast_custom_function_register(&iaxpeer_function);
- ast_custom_function_register(&iaxvar_function);
+ ast_custom_function_register(&iaxpeer_function, ast_module_info->self);
+ ast_custom_function_register(&iaxvar_function, ast_module_info->self);
iax_set_output(iax_debug_output);
iax_set_error(iax_error_output);
Modified: team/file/usecnt-cleanup/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/channels/chan_sip.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/channels/chan_sip.c (original)
+++ team/file/usecnt-cleanup/channels/chan_sip.c Sun Feb 11 17:31:08 2007
@@ -17647,10 +17647,10 @@
ast_register_application(app_sipaddheader, sip_addheader, synopsis_sipaddheader, descrip_sipaddheader, ast_module_info->self);
/* Register dialplan functions */
- ast_custom_function_register(&sip_header_function);
- ast_custom_function_register(&sippeer_function);
- ast_custom_function_register(&sipchaninfo_function);
- ast_custom_function_register(&checksipdomain_function);
+ ast_custom_function_register(&sip_header_function, ast_module_info->self);
+ ast_custom_function_register(&sippeer_function, ast_module_info->self);
+ ast_custom_function_register(&sipchaninfo_function, ast_module_info->self);
+ ast_custom_function_register(&checksipdomain_function, ast_module_info->self);
/* Register manager commands */
ast_manager_register2("SIPpeers", EVENT_FLAG_SYSTEM, manager_sip_show_peers,
Modified: team/file/usecnt-cleanup/funcs/func_base64.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_base64.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_base64.c (original)
+++ team/file/usecnt-cleanup/funcs/func_base64.c Sun Feb 11 17:31:08 2007
@@ -88,8 +88,8 @@
static int load_module(void)
{
- return ast_custom_function_register(&base64_encode_function) |
- ast_custom_function_register(&base64_decode_function);
+ return ast_custom_function_register(&base64_encode_function, ast_module_info->self) |
+ ast_custom_function_register(&base64_decode_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "base64 encode/decode dialplan functions");
Modified: team/file/usecnt-cleanup/funcs/func_blacklist.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_blacklist.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_blacklist.c (original)
+++ team/file/usecnt-cleanup/funcs/func_blacklist.c Sun Feb 11 17:31:08 2007
@@ -82,7 +82,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&blacklist_function);
+ return ast_custom_function_register(&blacklist_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Look up Caller*ID name/number from blacklist database");
Modified: team/file/usecnt-cleanup/funcs/func_callerid.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_callerid.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_callerid.c (original)
+++ team/file/usecnt-cleanup/funcs/func_callerid.c Sun Feb 11 17:31:08 2007
@@ -218,8 +218,8 @@
static int load_module(void)
{
- int res = ast_custom_function_register(&callerpres_function);
- res |= ast_custom_function_register(&callerid_function);
+ int res = ast_custom_function_register(&callerpres_function, ast_module_info->self);
+ res |= ast_custom_function_register(&callerid_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_cdr.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_cdr.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_cdr.c (original)
+++ team/file/usecnt-cleanup/funcs/func_cdr.c Sun Feb 11 17:31:08 2007
@@ -162,7 +162,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&cdr_function);
+ return ast_custom_function_register(&cdr_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "CDR dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_channel.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_channel.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_channel.c (original)
+++ team/file/usecnt-cleanup/funcs/func_channel.c Sun Feb 11 17:31:08 2007
@@ -179,7 +179,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&channel_function);
+ return ast_custom_function_register(&channel_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Channel information dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_curl.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_curl.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_curl.c (original)
+++ team/file/usecnt-cleanup/funcs/func_curl.c Sun Feb 11 17:31:08 2007
@@ -196,7 +196,7 @@
return AST_MODULE_LOAD_DECLINE;
}
- res = ast_custom_function_register(&acf_curl);
+ res = ast_custom_function_register(&acf_curl, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_cut.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_cut.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_cut.c (original)
+++ team/file/usecnt-cleanup/funcs/func_cut.c Sun Feb 11 17:31:08 2007
@@ -305,8 +305,8 @@
{
int res = 0;
- res |= ast_custom_function_register(&acf_cut);
- res |= ast_custom_function_register(&acf_sort);
+ res |= ast_custom_function_register(&acf_cut, ast_module_info->self);
+ res |= ast_custom_function_register(&acf_sort, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_db.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_db.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_db.c (original)
+++ team/file/usecnt-cleanup/funcs/func_db.c Sun Feb 11 17:31:08 2007
@@ -226,9 +226,9 @@
{
int res = 0;
- res |= ast_custom_function_register(&db_function);
- res |= ast_custom_function_register(&db_exists_function);
- res |= ast_custom_function_register(&db_delete_function);
+ res |= ast_custom_function_register(&db_function, ast_module_info->self);
+ res |= ast_custom_function_register(&db_exists_function, ast_module_info->self);
+ res |= ast_custom_function_register(&db_delete_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_enum.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_enum.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_enum.c (original)
+++ team/file/usecnt-cleanup/funcs/func_enum.c Sun Feb 11 17:31:08 2007
@@ -180,8 +180,8 @@
{
int res = 0;
- res |= ast_custom_function_register(&enum_function);
- res |= ast_custom_function_register(&txtcidname_function);
+ res |= ast_custom_function_register(&enum_function, ast_module_info->self);
+ res |= ast_custom_function_register(&txtcidname_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_env.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_env.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_env.c (original)
+++ team/file/usecnt-cleanup/funcs/func_env.c Sun Feb 11 17:31:08 2007
@@ -150,8 +150,8 @@
{
int res = 0;
- res |= ast_custom_function_register(&env_function);
- res |= ast_custom_function_register(&stat_function);
+ res |= ast_custom_function_register(&env_function, ast_module_info->self);
+ res |= ast_custom_function_register(&stat_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_global.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_global.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_global.c (original)
+++ team/file/usecnt-cleanup/funcs/func_global.c Sun Feb 11 17:31:08 2007
@@ -80,7 +80,7 @@
{
int res = 0;
- res |= ast_custom_function_register(&global_function);
+ res |= ast_custom_function_register(&global_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_groupcount.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_groupcount.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_groupcount.c (original)
+++ team/file/usecnt-cleanup/funcs/func_groupcount.c Sun Feb 11 17:31:08 2007
@@ -212,10 +212,10 @@
{
int res = 0;
- res |= ast_custom_function_register(&group_count_function);
- res |= ast_custom_function_register(&group_match_count_function);
- res |= ast_custom_function_register(&group_list_function);
- res |= ast_custom_function_register(&group_function);
+ res |= ast_custom_function_register(&group_count_function, ast_module_info->self);
+ res |= ast_custom_function_register(&group_match_count_function, ast_module_info->self);
+ res |= ast_custom_function_register(&group_list_function, ast_module_info->self);
+ res |= ast_custom_function_register(&group_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_logic.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_logic.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_logic.c (original)
+++ team/file/usecnt-cleanup/funcs/func_logic.c Sun Feb 11 17:31:08 2007
@@ -194,11 +194,11 @@
{
int res = 0;
- res |= ast_custom_function_register(&isnull_function);
- res |= ast_custom_function_register(&set_function);
- res |= ast_custom_function_register(&exists_function);
- res |= ast_custom_function_register(&if_function);
- res |= ast_custom_function_register(&if_time_function);
+ res |= ast_custom_function_register(&isnull_function, ast_module_info->self);
+ res |= ast_custom_function_register(&set_function, ast_module_info->self);
+ res |= ast_custom_function_register(&exists_function, ast_module_info->self);
+ res |= ast_custom_function_register(&if_function, ast_module_info->self);
+ res |= ast_custom_function_register(&if_time_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_math.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_math.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_math.c (original)
+++ team/file/usecnt-cleanup/funcs/func_math.c Sun Feb 11 17:31:08 2007
@@ -287,7 +287,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&math_function);
+ return ast_custom_function_register(&math_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Mathematical dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_md5.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_md5.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_md5.c (original)
+++ team/file/usecnt-cleanup/funcs/func_md5.c Sun Feb 11 17:31:08 2007
@@ -70,7 +70,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&md5_function);
+ return ast_custom_function_register(&md5_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "MD5 digest dialplan functions");
Modified: team/file/usecnt-cleanup/funcs/func_module.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_module.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_module.c (original)
+++ team/file/usecnt-cleanup/funcs/func_module.c Sun Feb 11 17:31:08 2007
@@ -73,7 +73,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&ifmodule_function);
+ return ast_custom_function_register(&ifmodule_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Checks if Asterisk module is loaded in memory");
Modified: team/file/usecnt-cleanup/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_odbc.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_odbc.c (original)
+++ team/file/usecnt-cleanup/funcs/func_odbc.c Sun Feb 11 17:31:08 2007
@@ -593,12 +593,12 @@
ast_log(LOG_ERROR, "%s (%d)\n", strerror(err), err);
} else {
AST_LIST_INSERT_HEAD(&queries, query, list);
- ast_custom_function_register(query->acf);
+ ast_custom_function_register(query->acf, ast_module_info->self);
}
}
ast_config_destroy(cfg);
- res |= ast_custom_function_register(&escape_function);
+ res |= ast_custom_function_register(&escape_function, ast_module_info->self);
AST_LIST_UNLOCK(&queries);
return res;
@@ -657,7 +657,7 @@
ast_log(LOG_ERROR, "Cannot initialize query %s\n", catg);
} else {
AST_LIST_INSERT_HEAD(&queries, query, list);
- ast_custom_function_register(query->acf);
+ ast_custom_function_register(query->acf, ast_module_info->self);
}
}
Modified: team/file/usecnt-cleanup/funcs/func_rand.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_rand.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_rand.c (original)
+++ team/file/usecnt-cleanup/funcs/func_rand.c Sun Feb 11 17:31:08 2007
@@ -97,7 +97,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&acf_rand);
+ return ast_custom_function_register(&acf_rand, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Random number dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_realtime.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_realtime.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_realtime.c (original)
+++ team/file/usecnt-cleanup/funcs/func_realtime.c Sun Feb 11 17:31:08 2007
@@ -147,7 +147,7 @@
static int load_module(void)
{
- int res = ast_custom_function_register(&realtime_function);
+ int res = ast_custom_function_register(&realtime_function, ast_module_info->self);
return res;
}
Modified: team/file/usecnt-cleanup/funcs/func_sha1.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_sha1.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_sha1.c (original)
+++ team/file/usecnt-cleanup/funcs/func_sha1.c Sun Feb 11 17:31:08 2007
@@ -79,7 +79,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&sha1_function);
+ return ast_custom_function_register(&sha1_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "SHA-1 computation dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_shell.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_shell.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_shell.c (original)
+++ team/file/usecnt-cleanup/funcs/func_shell.c Sun Feb 11 17:31:08 2007
@@ -85,7 +85,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&shell_function);
+ return ast_custom_function_register(&shell_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "SHELL dialplan function");
Modified: team/file/usecnt-cleanup/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_strings.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_strings.c (original)
+++ team/file/usecnt-cleanup/funcs/func_strings.c Sun Feb 11 17:31:08 2007
@@ -778,19 +778,19 @@
{
int res = 0;
- res |= ast_custom_function_register(&fieldqty_function);
- res |= ast_custom_function_register(&filter_function);
- res |= ast_custom_function_register(®ex_function);
- res |= ast_custom_function_register(&array_function);
- res |= ast_custom_function_register("e_function);
- res |= ast_custom_function_register(&len_function);
- res |= ast_custom_function_register(&strftime_function);
- res |= ast_custom_function_register(&strptime_function);
- res |= ast_custom_function_register(&eval_function);
- res |= ast_custom_function_register(&keypadhash_function);
- res |= ast_custom_function_register(&sprintf_function);
- res |= ast_custom_function_register(&hashkeys_function);
- res |= ast_custom_function_register(&hash_function);
+ res |= ast_custom_function_register(&fieldqty_function, ast_module_info->self);
+ res |= ast_custom_function_register(&filter_function, ast_module_info->self);
+ res |= ast_custom_function_register(®ex_function, ast_module_info->self);
+ res |= ast_custom_function_register(&array_function, ast_module_info->self);
+ res |= ast_custom_function_register("e_function, ast_module_info->self);
+ res |= ast_custom_function_register(&len_function, ast_module_info->self);
+ res |= ast_custom_function_register(&strftime_function, ast_module_info->self);
+ res |= ast_custom_function_register(&strptime_function, ast_module_info->self);
+ res |= ast_custom_function_register(&eval_function, ast_module_info->self);
+ res |= ast_custom_function_register(&keypadhash_function, ast_module_info->self);
+ res |= ast_custom_function_register(&sprintf_function, ast_module_info->self);
+ res |= ast_custom_function_register(&hashkeys_function, ast_module_info->self);
+ res |= ast_custom_function_register(&hash_function, ast_module_info->self);
res |= ast_register_application(app_clearhash, exec_clearhash, syn_clearhash, desc_clearhash, ast_module_info->self);
return res;
Modified: team/file/usecnt-cleanup/funcs/func_timeout.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_timeout.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_timeout.c (original)
+++ team/file/usecnt-cleanup/funcs/func_timeout.c Sun Feb 11 17:31:08 2007
@@ -181,7 +181,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&timeout_function);
+ return ast_custom_function_register(&timeout_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Channel timeout dialplan functions");
Modified: team/file/usecnt-cleanup/funcs/func_uri.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_uri.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_uri.c (original)
+++ team/file/usecnt-cleanup/funcs/func_uri.c Sun Feb 11 17:31:08 2007
@@ -95,8 +95,8 @@
static int load_module(void)
{
- return ast_custom_function_register(&urldecode_function)
- || ast_custom_function_register(&urlencode_function);
+ return ast_custom_function_register(&urldecode_function, ast_module_info->self)
+ || ast_custom_function_register(&urlencode_function, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "URI encode/decode dialplan functions");
Modified: team/file/usecnt-cleanup/funcs/func_version.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_version.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_version.c (original)
+++ team/file/usecnt-cleanup/funcs/func_version.c Sun Feb 11 17:31:08 2007
@@ -108,7 +108,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&acf_version);
+ return ast_custom_function_register(&acf_version, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Get Asterisk Version/Build Info");
Modified: team/file/usecnt-cleanup/funcs/func_vmcount.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/funcs/func_vmcount.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/funcs/func_vmcount.c (original)
+++ team/file/usecnt-cleanup/funcs/func_vmcount.c Sun Feb 11 17:31:08 2007
@@ -93,7 +93,7 @@
static int load_module(void)
{
- return ast_custom_function_register(&acf_vmcount);
+ return ast_custom_function_register(&acf_vmcount, ast_module_info->self);
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Indicator for whether a voice mailbox has messages in a given folder.");
Modified: team/file/usecnt-cleanup/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/include/asterisk/pbx.h?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/include/asterisk/pbx.h (original)
+++ team/file/usecnt-cleanup/include/asterisk/pbx.h Sun Feb 11 17:31:08 2007
@@ -826,7 +826,7 @@
/*!
* \brief Reigster a custom function
*/
-int ast_custom_function_register(struct ast_custom_function *acf);
+int ast_custom_function_register(struct ast_custom_function *acf, struct ast_module *mod);
/*!
* \brief Retrieve the number of active calls
Modified: team/file/usecnt-cleanup/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/main/pbx.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/main/pbx.c (original)
+++ team/file/usecnt-cleanup/main/pbx.c Sun Feb 11 17:31:08 2007
@@ -1350,7 +1350,7 @@
return acf ? 0 : -1;
}
-int ast_custom_function_register(struct ast_custom_function *acf)
+int ast_custom_function_register(struct ast_custom_function *acf, struct ast_module *mod)
{
struct ast_custom_function *cur;
@@ -1379,6 +1379,8 @@
AST_RWLIST_INSERT_TAIL(&acf_root, acf, acflist);
AST_RWLIST_UNLOCK(&acf_root);
+
+ acf->module = mod;
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Registered custom function %s\n", acf->name);
@@ -1411,7 +1413,6 @@
char *copy = ast_strdupa(function);
char *args = func_args(copy);
struct ast_custom_function *acfptr = ast_custom_function_find(copy);
- struct ast_module_user *u;
int res;
if (acfptr == NULL)
@@ -1420,10 +1421,10 @@
ast_log(LOG_ERROR, "Function %s cannot be read\n", copy);
else {
if (acfptr->module)
- u = __ast_module_user_add(acfptr->module, chan);
+ ast_module_ref(acfptr->module);
res = acfptr->read(chan, copy, args, workspace, len);
if (acfptr->module)
- __ast_module_user_remove(acfptr->module, u);
+ ast_module_unref(acfptr->module);
return res;
}
return -1;
@@ -1434,7 +1435,6 @@
char *copy = ast_strdupa(function);
char *args = func_args(copy);
struct ast_custom_function *acfptr = ast_custom_function_find(copy);
- struct ast_module_user *u;
int res;
if (acfptr == NULL)
@@ -1443,10 +1443,10 @@
ast_log(LOG_ERROR, "Function %s cannot be written to\n", copy);
else {
if (acfptr->module)
- u = __ast_module_user_add(acfptr->module, chan);
+ ast_module_ref(acfptr->module);
res = acfptr->write(chan, copy, args, value);
if (acfptr->module)
- __ast_module_user_remove(acfptr->module, u);
+ ast_module_unref(acfptr->module);
return res;
}
return -1;
Modified: team/file/usecnt-cleanup/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/team/file/usecnt-cleanup/pbx/pbx_dundi.c?view=diff&rev=53976&r1=53975&r2=53976
==============================================================================
--- team/file/usecnt-cleanup/pbx/pbx_dundi.c (original)
+++ team/file/usecnt-cleanup/pbx/pbx_dundi.c Sun Feb 11 17:31:08 2007
@@ -4560,7 +4560,7 @@
ast_cli_register_multiple(cli_dundi, sizeof(cli_dundi) / sizeof(*cli_dundi));
if (ast_register_switch(&dundi_switch))
ast_log(LOG_ERROR, "Unable to register DUNDi switch\n");
- ast_custom_function_register(&dundi_function);
+ ast_custom_function_register(&dundi_function, ast_module_info->self);
if (option_verbose > 1) {
ast_verbose(VERBOSE_PREFIX_2 "DUNDi Ready and Listening on %s port %d\n",
More information about the asterisk-commits
mailing list