[asterisk-commits] branch tilghman/res_odbc_rewrite r20039 - in /team/tilghman/res_odbc_rewrite:...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 14 10:55:10 MST 2006


Author: tilghman
Date: Fri Apr 14 12:54:41 2006
New Revision: 20039

URL: http://svn.digium.com/view/asterisk?rev=20039&view=rev
Log:
Merged revisions 20003,20035 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r20003 | rizzo | 2006-04-14 09:08:19 -0500 (Fri, 14 Apr 2006) | 23 lines

This rather large commit changes the way modules are loaded. 
 
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!


................
r20035 | kpfleming | 2006-04-14 12:01:07 -0500 (Fri, 14 Apr 2006) | 10 lines

Merged revisions 20034 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r20034 | kpfleming | 2006-04-14 12:00:32 -0500 (Fri, 14 Apr 2006) | 2 lines

update text to match actual prompts being distributed (thanks to Kinsey in the support department for reviewing all the prompts!)

........

................

Modified:
    team/tilghman/res_odbc_rewrite/   (props changed)
    team/tilghman/res_odbc_rewrite/apps/app_adsiprog.c
    team/tilghman/res_odbc_rewrite/apps/app_alarmreceiver.c
    team/tilghman/res_odbc_rewrite/apps/app_amd.c
    team/tilghman/res_odbc_rewrite/apps/app_authenticate.c
    team/tilghman/res_odbc_rewrite/apps/app_cdr.c
    team/tilghman/res_odbc_rewrite/apps/app_chanisavail.c
    team/tilghman/res_odbc_rewrite/apps/app_channelredirect.c
    team/tilghman/res_odbc_rewrite/apps/app_chanspy.c
    team/tilghman/res_odbc_rewrite/apps/app_controlplayback.c
    team/tilghman/res_odbc_rewrite/apps/app_db.c
    team/tilghman/res_odbc_rewrite/apps/app_dial.c
    team/tilghman/res_odbc_rewrite/apps/app_dictate.c
    team/tilghman/res_odbc_rewrite/apps/app_directed_pickup.c
    team/tilghman/res_odbc_rewrite/apps/app_directory.c
    team/tilghman/res_odbc_rewrite/apps/app_disa.c
    team/tilghman/res_odbc_rewrite/apps/app_dumpchan.c
    team/tilghman/res_odbc_rewrite/apps/app_echo.c
    team/tilghman/res_odbc_rewrite/apps/app_exec.c
    team/tilghman/res_odbc_rewrite/apps/app_externalivr.c
    team/tilghman/res_odbc_rewrite/apps/app_festival.c
    team/tilghman/res_odbc_rewrite/apps/app_flash.c
    team/tilghman/res_odbc_rewrite/apps/app_forkcdr.c
    team/tilghman/res_odbc_rewrite/apps/app_getcpeid.c
    team/tilghman/res_odbc_rewrite/apps/app_hasnewvoicemail.c
    team/tilghman/res_odbc_rewrite/apps/app_ices.c
    team/tilghman/res_odbc_rewrite/apps/app_image.c
    team/tilghman/res_odbc_rewrite/apps/app_ivrdemo.c
    team/tilghman/res_odbc_rewrite/apps/app_lookupblacklist.c
    team/tilghman/res_odbc_rewrite/apps/app_lookupcidname.c
    team/tilghman/res_odbc_rewrite/apps/app_macro.c
    team/tilghman/res_odbc_rewrite/apps/app_meetme.c
    team/tilghman/res_odbc_rewrite/apps/app_milliwatt.c
    team/tilghman/res_odbc_rewrite/apps/app_mixmonitor.c
    team/tilghman/res_odbc_rewrite/apps/app_morsecode.c
    team/tilghman/res_odbc_rewrite/apps/app_mp3.c
    team/tilghman/res_odbc_rewrite/apps/app_nbscat.c
    team/tilghman/res_odbc_rewrite/apps/app_osplookup.c
    team/tilghman/res_odbc_rewrite/apps/app_page.c
    team/tilghman/res_odbc_rewrite/apps/app_parkandannounce.c
    team/tilghman/res_odbc_rewrite/apps/app_playback.c
    team/tilghman/res_odbc_rewrite/apps/app_privacy.c
    team/tilghman/res_odbc_rewrite/apps/app_queue.c
    team/tilghman/res_odbc_rewrite/apps/app_random.c
    team/tilghman/res_odbc_rewrite/apps/app_read.c
    team/tilghman/res_odbc_rewrite/apps/app_readfile.c
    team/tilghman/res_odbc_rewrite/apps/app_realtime.c
    team/tilghman/res_odbc_rewrite/apps/app_record.c
    team/tilghman/res_odbc_rewrite/apps/app_rpt.c
    team/tilghman/res_odbc_rewrite/apps/app_sayunixtime.c
    team/tilghman/res_odbc_rewrite/apps/app_senddtmf.c
    team/tilghman/res_odbc_rewrite/apps/app_sendtext.c
    team/tilghman/res_odbc_rewrite/apps/app_setcallerid.c
    team/tilghman/res_odbc_rewrite/apps/app_setcdruserfield.c
    team/tilghman/res_odbc_rewrite/apps/app_settransfercapability.c
    team/tilghman/res_odbc_rewrite/apps/app_skel.c
    team/tilghman/res_odbc_rewrite/apps/app_sms.c
    team/tilghman/res_odbc_rewrite/apps/app_softhangup.c
    team/tilghman/res_odbc_rewrite/apps/app_speech_utils.c
    team/tilghman/res_odbc_rewrite/apps/app_stack.c
    team/tilghman/res_odbc_rewrite/apps/app_system.c
    team/tilghman/res_odbc_rewrite/apps/app_talkdetect.c
    team/tilghman/res_odbc_rewrite/apps/app_test.c
    team/tilghman/res_odbc_rewrite/apps/app_transfer.c
    team/tilghman/res_odbc_rewrite/apps/app_url.c
    team/tilghman/res_odbc_rewrite/apps/app_userevent.c
    team/tilghman/res_odbc_rewrite/apps/app_verbose.c
    team/tilghman/res_odbc_rewrite/apps/app_voicemail.c
    team/tilghman/res_odbc_rewrite/apps/app_waitforring.c
    team/tilghman/res_odbc_rewrite/apps/app_waitforsilence.c
    team/tilghman/res_odbc_rewrite/apps/app_while.c
    team/tilghman/res_odbc_rewrite/apps/app_zapateller.c
    team/tilghman/res_odbc_rewrite/apps/app_zapbarge.c
    team/tilghman/res_odbc_rewrite/apps/app_zapras.c
    team/tilghman/res_odbc_rewrite/apps/app_zapscan.c
    team/tilghman/res_odbc_rewrite/asterisk.c
    team/tilghman/res_odbc_rewrite/cdr.c
    team/tilghman/res_odbc_rewrite/cdr/cdr_csv.c
    team/tilghman/res_odbc_rewrite/cdr/cdr_custom.c
    team/tilghman/res_odbc_rewrite/cdr/cdr_manager.c
    team/tilghman/res_odbc_rewrite/channels/chan_agent.c
    team/tilghman/res_odbc_rewrite/channels/chan_features.c
    team/tilghman/res_odbc_rewrite/channels/chan_iax2.c
    team/tilghman/res_odbc_rewrite/channels/chan_local.c
    team/tilghman/res_odbc_rewrite/channels/chan_mgcp.c
    team/tilghman/res_odbc_rewrite/channels/chan_oss.c
    team/tilghman/res_odbc_rewrite/channels/chan_phone.c
    team/tilghman/res_odbc_rewrite/channels/chan_sip.c
    team/tilghman/res_odbc_rewrite/channels/chan_skinny.c
    team/tilghman/res_odbc_rewrite/channels/chan_zap.c
    team/tilghman/res_odbc_rewrite/cli.c
    team/tilghman/res_odbc_rewrite/codecs/codec_a_mu.c
    team/tilghman/res_odbc_rewrite/codecs/codec_adpcm.c
    team/tilghman/res_odbc_rewrite/codecs/codec_alaw.c
    team/tilghman/res_odbc_rewrite/codecs/codec_g723_1.c
    team/tilghman/res_odbc_rewrite/codecs/codec_g726.c
    team/tilghman/res_odbc_rewrite/codecs/codec_gsm.c
    team/tilghman/res_odbc_rewrite/codecs/codec_ilbc.c
    team/tilghman/res_odbc_rewrite/codecs/codec_lpc10.c
    team/tilghman/res_odbc_rewrite/codecs/codec_speex.c
    team/tilghman/res_odbc_rewrite/codecs/codec_ulaw.c
    team/tilghman/res_odbc_rewrite/file.c
    team/tilghman/res_odbc_rewrite/formats/format_g723.c
    team/tilghman/res_odbc_rewrite/formats/format_g726.c
    team/tilghman/res_odbc_rewrite/formats/format_g729.c
    team/tilghman/res_odbc_rewrite/formats/format_gsm.c
    team/tilghman/res_odbc_rewrite/formats/format_h263.c
    team/tilghman/res_odbc_rewrite/formats/format_h264.c
    team/tilghman/res_odbc_rewrite/formats/format_ilbc.c
    team/tilghman/res_odbc_rewrite/formats/format_jpeg.c
    team/tilghman/res_odbc_rewrite/formats/format_ogg_vorbis.c
    team/tilghman/res_odbc_rewrite/formats/format_pcm.c
    team/tilghman/res_odbc_rewrite/formats/format_sln.c
    team/tilghman/res_odbc_rewrite/formats/format_vox.c
    team/tilghman/res_odbc_rewrite/formats/format_wav.c
    team/tilghman/res_odbc_rewrite/formats/format_wav_gsm.c
    team/tilghman/res_odbc_rewrite/funcs/func_base64.c
    team/tilghman/res_odbc_rewrite/funcs/func_callerid.c
    team/tilghman/res_odbc_rewrite/funcs/func_cdr.c
    team/tilghman/res_odbc_rewrite/funcs/func_channel.c
    team/tilghman/res_odbc_rewrite/funcs/func_curl.c
    team/tilghman/res_odbc_rewrite/funcs/func_cut.c
    team/tilghman/res_odbc_rewrite/funcs/func_db.c
    team/tilghman/res_odbc_rewrite/funcs/func_enum.c
    team/tilghman/res_odbc_rewrite/funcs/func_env.c
    team/tilghman/res_odbc_rewrite/funcs/func_groupcount.c
    team/tilghman/res_odbc_rewrite/funcs/func_language.c
    team/tilghman/res_odbc_rewrite/funcs/func_logic.c
    team/tilghman/res_odbc_rewrite/funcs/func_math.c
    team/tilghman/res_odbc_rewrite/funcs/func_md5.c
    team/tilghman/res_odbc_rewrite/funcs/func_moh.c
    team/tilghman/res_odbc_rewrite/funcs/func_odbc.c
    team/tilghman/res_odbc_rewrite/funcs/func_rand.c
    team/tilghman/res_odbc_rewrite/funcs/func_sha1.c
    team/tilghman/res_odbc_rewrite/funcs/func_strings.c
    team/tilghman/res_odbc_rewrite/funcs/func_timeout.c
    team/tilghman/res_odbc_rewrite/funcs/func_uri.c
    team/tilghman/res_odbc_rewrite/include/asterisk.h
    team/tilghman/res_odbc_rewrite/include/asterisk/file.h
    team/tilghman/res_odbc_rewrite/include/asterisk/module.h
    team/tilghman/res_odbc_rewrite/include/asterisk/translate.h
    team/tilghman/res_odbc_rewrite/loader.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_ael.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_config.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_dundi.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_loopback.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_realtime.c
    team/tilghman/res_odbc_rewrite/pbx/pbx_spool.c
    team/tilghman/res_odbc_rewrite/res/res_adsi.c
    team/tilghman/res_odbc_rewrite/res/res_agi.c
    team/tilghman/res_odbc_rewrite/res/res_clioriginate.c
    team/tilghman/res_odbc_rewrite/res/res_config_odbc.c
    team/tilghman/res_odbc_rewrite/res/res_config_pgsql.c
    team/tilghman/res_odbc_rewrite/res/res_convert.c
    team/tilghman/res_odbc_rewrite/res/res_crypto.c
    team/tilghman/res_odbc_rewrite/res/res_features.c
    team/tilghman/res_odbc_rewrite/res/res_indications.c
    team/tilghman/res_odbc_rewrite/res/res_monitor.c
    team/tilghman/res_odbc_rewrite/res/res_musiconhold.c
    team/tilghman/res_odbc_rewrite/res/res_odbc.c
    team/tilghman/res_odbc_rewrite/res/res_smdi.c
    team/tilghman/res_odbc_rewrite/res/res_speech.c
    team/tilghman/res_odbc_rewrite/sounds.txt
    team/tilghman/res_odbc_rewrite/translate.c

Propchange: team/tilghman/res_odbc_rewrite/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/tilghman/res_odbc_rewrite/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/tilghman/res_odbc_rewrite/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Apr 14 12:54:41 2006
@@ -1,1 +1,1 @@
-/trunk:1-20001
+/trunk:1-20035

Modified: team/tilghman/res_odbc_rewrite/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_adsiprog.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_adsiprog.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_adsiprog.c Fri Apr 14 12:54:41 2006
@@ -58,8 +58,6 @@
 static char *descrip =
 "  ADSIProg(script): This application programs an ADSI Phone with the given\n"
 "script. If nothing is specified, the default script (asterisk.adsi) is used.\n";
-
-LOCAL_USER_DECL;
 
 struct adsi_event {
 	int id;
@@ -1568,35 +1566,32 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
+
+	STANDARD_HANGUP_LOCALUSERS;
 
 	res = ast_unregister_application(app);	
 	
-	STANDARD_HANGUP_LOCALUSERS;
 
 	return res;
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	return ast_register_application(app, adsi_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Asterisk ADSI Programming Application";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_alarmreceiver.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_alarmreceiver.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_alarmreceiver.c Fri Apr 14 12:54:41 2006
@@ -96,8 +96,6 @@
 /* Misc variables */
 	
 static char event_file[14] = "/event-XXXXXX";
-
-LOCAL_USER_DECL;
 
 /*
 * Attempt to access a database variable and increment it,
@@ -818,7 +816,7 @@
 */
 
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -829,25 +827,21 @@
 	return res;
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	load_config();
 	return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Alarm Receiver for Asterisk";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_amd.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_amd.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_amd.c Fri Apr 14 12:54:41 2006
@@ -72,9 +72,6 @@
 "               MAXWORDS-<%d wordsCount>-<%d maximumNumberOfWords>\n"
 "               LONGGREETING-<%d voiceDuration>-<%d greeting>\n";
 
-
-LOCAL_USER_DECL;
-
 #define STATE_IN_WORD       1
 #define STATE_IN_SILENCE    2
 
@@ -392,38 +389,33 @@
 	return;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	STANDARD_HANGUP_LOCALUSERS;
 	return ast_unregister_application(app);
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	load_config();
 	return ast_register_application(app, amd_exec, synopsis, descrip);
 }
 
-int reload(void)
+static int reload(void *mod)
 {
 	load_config();
 	return 0;
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Answering Machine Detection Application";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
 
+STD_MOD(MOD_1, reload, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_authenticate.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_authenticate.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_authenticate.c Fri Apr 14 12:54:41 2006
@@ -90,8 +90,6 @@
 "         press the '#' key).\n"
 "         Defaults to 0 - no limit - wait for the user press the '#' key.\n"
 ;
-
-LOCAL_USER_DECL;
 
 static int auth_exec(struct ast_channel *chan, void *data)
 {
@@ -235,35 +233,31 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
+	STANDARD_HANGUP_LOCALUSERS;
+
 	res = ast_unregister_application(app);
 
-	STANDARD_HANGUP_LOCALUSERS;
 	
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, auth_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Authentication Application";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_cdr.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_cdr.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_cdr.c Fri Apr 14 12:54:41 2006
@@ -27,8 +27,6 @@
 
 #include <sys/types.h>
 #include <stdlib.h>
-
-#define STATIC_MODULE
 
 #include "asterisk.h"
 
@@ -63,7 +61,7 @@
 	return 0;
 }
 
-STATIC_MODULE int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -74,24 +72,17 @@
 	return res;
 }
 
-STATIC_MODULE int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
 }
 
-STATIC_MODULE const char *description(void)
+static const char *description(void)
 {
 	return "Tell Asterisk to not maintain a CDR for the current call";
 }
 
-STATIC_MODULE int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-STATIC_MODULE const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }

Modified: team/tilghman/res_odbc_rewrite/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_chanisavail.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_chanisavail.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_chanisavail.c Fri Apr 14 12:54:41 2006
@@ -155,7 +155,7 @@
 	return 0;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res = 0;
 
@@ -166,24 +166,20 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
+	__mod_desc = mod;
 	return ast_register_application(app, chanavail_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Check channel availability";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_channelredirect.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_channelredirect.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_channelredirect.c Fri Apr 14 12:54:41 2006
@@ -120,7 +120,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -131,26 +131,20 @@
 	return res;	
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
+	__mod_desc = mod;
 	return ast_register_application(app, asyncgoto_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Channel Redirect";
 }
 
-int usecount(void)
-{
-	int res;
-
-	STANDARD_USECOUNT(res);
-
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_chanspy.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_chanspy.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_chanspy.c Fri Apr 14 12:54:41 2006
@@ -554,7 +554,7 @@
 	ALL_DONE(u, res);
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -565,24 +565,20 @@
 	return res;
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	return ast_register_application(app, chanspy_exec, synopsis, desc);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return (char *) synopsis;
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_controlplayback.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_controlplayback.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_controlplayback.c Fri Apr 14 12:54:41 2006
@@ -154,36 +154,26 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
-
 	res = ast_unregister_application(app);
-
-	STANDARD_HANGUP_LOCALUSERS;
-
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, controlplayback_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Control Playback Application";
 }
 
-int usecount(void)
-{
-	int res;
-
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_db.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_db.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_db.c Fri Apr 14 12:54:41 2006
@@ -143,41 +143,35 @@
 	return 0;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int retval;
 
 	retval = ast_unregister_application(dt_app);
 	retval |= ast_unregister_application(d_app);
 
-	STANDARD_HANGUP_LOCALUSERS;
-
 	return retval;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	int retval;
 
+	__mod_desc = mod;
 	retval = ast_register_application(d_app, del_exec, d_synopsis, d_descrip);
 	retval |= ast_register_application(dt_app, deltree_exec, dt_synopsis, dt_descrip);
 	
 	return retval;
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return "Database Access Functions";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_dial.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_dial.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_dial.c Fri Apr 14 12:54:41 2006
@@ -35,7 +35,6 @@
 #include <sys/signal.h>
 #include <netinet/in.h>
 
-#define STATIC_MODULE
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -1729,7 +1728,7 @@
 
 }
 
-STATIC_MODULE int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -1741,30 +1740,24 @@
 	return res;
 }
 
-STATIC_MODULE int load_module(void)
+static int load_module(void *mod)
 {
 	int res;
 
+	__mod_desc = mod;
 	res = ast_register_application(app, dial_exec, synopsis, descrip);
 	res |= ast_register_application(rapp, retrydial_exec, rsynopsis, rdescrip);
 	
 	return res;
 }
 
-STATIC_MODULE const char *description(void)
+static const char *description(void)
 {
 	return "Dialing Application";
 
 }
 
-STATIC_MODULE int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-STATIC_MODULE const char *key(void)
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }

Modified: team/tilghman/res_odbc_rewrite/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_dictate.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_dictate.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_dictate.c Fri Apr 14 12:54:41 2006
@@ -46,7 +46,6 @@
 #include "asterisk/lock.h"
 #include "asterisk/app.h"
 
-static char *tdesc = "Virtual Dictation Machine";
 static char *app = "Dictate";
 static char *synopsis = "Virtual Dictation Machine";
 static char *desc = "  Dictate([<base_dir>[|<filename>]])\n"
@@ -336,36 +335,27 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
-
 	res = ast_unregister_application(app);
-	
-	STANDARD_HANGUP_LOCALUSERS;
-	
 	return res;
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	return ast_register_application(app, dictate_exec, synopsis, desc);
 }
 
-const char *description(void)
-{
-	return tdesc;
-}
-
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *description(void)
+{
+	return "Virtual Dictation Machine";
+}
+
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
 
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_directed_pickup.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_directed_pickup.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_directed_pickup.c Fri Apr 14 12:54:41 2006
@@ -42,7 +42,6 @@
 #include "asterisk/lock.h"
 #include "asterisk/app.h"
 
-static const char *tdesc = "Directed Call Pickup Application";
 static const char *app = "Pickup";
 static const char *synopsis = "Directed Call Pickup";
 static const char *descrip =
@@ -134,37 +133,29 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
 	res = ast_unregister_application(app);
 	
-	STANDARD_HANGUP_LOCALUSERS;
-
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
+	__mod_desc = mod;
 	return ast_register_application(app, pickup_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return (char *) tdesc;
+	return "Directed Call Pickup Application";
 }
 
-int usecount(void)
-{
-	int res;
-
-	STANDARD_USECOUNT(res);
-
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD(MOD_1, NULL, NULL, NULL);

Modified: team/tilghman/res_odbc_rewrite/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_directory.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_directory.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_directory.c Fri Apr 14 12:54:41 2006
@@ -45,7 +45,6 @@
 #include "asterisk/utils.h"
 #include "asterisk/app.h"
 
-static char *tdesc = "Extension Directory";
 static char *app = "Directory";
 
 static char *synopsis = "Provide directory of voicemail extensions";
@@ -517,35 +516,27 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
-
 	res = ast_unregister_application(app);
-
-	STANDARD_HANGUP_LOCALUSERS;
-
 	return res;
 }
 
-int load_module(void)
-{
+static int load_module(void *mod)
+{
+	__mod_desc = mod;
 	return ast_register_application(app, directory_exec, synopsis, descrip);
 }
 
-const char *description(void)
-{
-	return tdesc;
-}
-
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *description(void)
+{
+	return "Extension Directory";
+}
+
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_disa.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_disa.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_disa.c Fri Apr 14 12:54:41 2006
@@ -48,8 +48,6 @@
 #include "asterisk/ulaw.h"
 #include "asterisk/callerid.h"
 #include "asterisk/stringfields.h"
-
-static char *tdesc = "DISA (Direct Inward System Access) Application";
 
 static char *app = "DISA";
 
@@ -376,7 +374,7 @@
 	return -1;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -387,24 +385,19 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, disa_exec, synopsis, descrip);
 }
 
-const char *description(void)
-{
-	return tdesc;
-}
-
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key(void)
+static const char *description(void)
+{
+	return "DISA (Direct Inward System Access) Application";
+}
+
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_dumpchan.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_dumpchan.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_dumpchan.c Fri Apr 14 12:54:41 2006
@@ -46,7 +46,6 @@
 #include "asterisk/lock.h"
 #include "asterisk/utils.h"
 
-static char *tdesc = "Dump Info About The Calling Channel";
 static char *app = "DumpChan";
 static char *synopsis = "Dump Info About The Calling Channel";
 static char *desc = 
@@ -157,7 +156,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -168,25 +167,19 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, dumpchan_exec, synopsis, desc);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return tdesc;
+	return "Dump Info About The Calling Channel";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
 
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_echo.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_echo.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_echo.c Fri Apr 14 12:54:41 2006
@@ -95,7 +95,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -106,24 +106,19 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, echo_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return tdesc;
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_exec.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_exec.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_exec.c Fri Apr 14 12:54:41 2006
@@ -160,7 +160,7 @@
 	return 0;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -172,26 +172,21 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	int res = ast_register_application(app_exec, exec_exec, exec_synopsis, exec_descrip);
 	res |= ast_register_application(app_tryexec, tryexec_exec, tryexec_synopsis, tryexec_descrip);
 	return res;
 }
 
-const char *description(void)
+static const char *description(void)
 {
 	return tdesc;
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_externalivr.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_externalivr.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_externalivr.c Fri Apr 14 12:54:41 2006
@@ -51,7 +51,6 @@
 #include "asterisk/app.h"
 #include "asterisk/utils.h"
 
-static const char *tdesc = "External IVR Interface Application";
 
 static const char *app = "ExternalIVR";
 
@@ -551,7 +550,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -562,26 +561,19 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, app_exec, synopsis, descrip);
 }
 
-const char *description(void)
-{
-	return (char *) tdesc;
-}
-
-int usecount(void)
-{
-	int res;
-
-	STANDARD_USECOUNT(res);
-
-	return res;
-}
-
-const char *key()
+static const char *description(void)
+{
+	return "External IVR Interface Application";
+}
+
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_festival.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_festival.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_festival.c Fri Apr 14 12:54:41 2006
@@ -57,8 +57,6 @@
 #include "asterisk/lock.h"
 
 #define FESTIVAL_CONFIG "festival.conf"
-
-static char *tdesc = "Simple Festival Interface";
 
 static char *app = "Festival";
 
@@ -501,7 +499,7 @@
 
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -512,25 +510,20 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
-	
 	return ast_register_application(app, festival_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return tdesc;
-}
-
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+	return "Simple Festival Interface";
+
+}
+
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_flash.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_flash.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_flash.c Fri Apr 14 12:54:41 2006
@@ -49,8 +49,6 @@
 #include "asterisk/translate.h"
 #include "asterisk/image.h"
 #include "asterisk/options.h"
-
-static char *tdesc = "Flash zap trunk application";
 
 static char *app = "Flash";
 
@@ -107,7 +105,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -118,24 +116,19 @@
 	return res;
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, flash_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return tdesc;
+	return "Flash zap trunk application";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_forkcdr.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_forkcdr.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_forkcdr.c Fri Apr 14 12:54:41 2006
@@ -42,7 +42,6 @@
 #include "asterisk/cdr.h"
 #include "asterisk/module.h"
 
-static char *tdesc = "Fork The CDR into 2 separate entities.";
 static char *app = "ForkCDR";
 static char *synopsis = 
 "Forks the Call Data Record";
@@ -98,7 +97,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -109,24 +108,19 @@
 	return res;	
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, forkcdr_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return tdesc;
+	return "Fork The CDR into 2 separate entities.";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_getcpeid.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_getcpeid.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_getcpeid.c (original)
+++ team/tilghman/res_odbc_rewrite/apps/app_getcpeid.c Fri Apr 14 12:54:41 2006
@@ -42,8 +42,6 @@
 #include "asterisk/module.h"
 #include "asterisk/adsi.h"
 #include "asterisk/options.h"
-
-static char *tdesc = "Get ADSI CPE ID";
 
 static char *app = "GetCPEID";
 
@@ -133,7 +131,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -144,24 +142,19 @@
 	return res;	
 }
 
-int load_module(void)
+static int load_module(void *mod)
 {
 	return ast_register_application(app, cpeid_exec, synopsis, descrip);
 }
 
-const char *description(void)
+static const char *description(void)
 {
-	return tdesc;
+	return "Get ADSI CPE ID";
 }
 
-int usecount(void)
-{
-	int res;
-	STANDARD_USECOUNT(res);
-	return res;
-}
-
-const char *key()
+static const char *key(void)
 {
 	return ASTERISK_GPL_KEY;
 }
+
+STD_MOD1;

Modified: team/tilghman/res_odbc_rewrite/apps/app_hasnewvoicemail.c
URL: http://svn.digium.com/view/asterisk/team/tilghman/res_odbc_rewrite/apps/app_hasnewvoicemail.c?rev=20039&r1=20038&r2=20039&view=diff
==============================================================================
--- team/tilghman/res_odbc_rewrite/apps/app_hasnewvoicemail.c (original)

[... 8743 lines stripped ...]


More information about the asterisk-commits mailing list