[asterisk-commits] branch oej/test-this-branch r20265 - in /team/oej/test-this-branch: ./ apps/ ...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Apr 15 01:13:01 MST 2006


Author: oej
Date: Sat Apr 15 03:10:15 2006
New Revision: 20265

URL: http://svn.digium.com/view/asterisk?rev=20265&view=rev
Log:
Second commit from Tokoyo: Resolve conflict, reset automerge

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

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/test-this-branch/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sat Apr 15 03:10:15 2006
@@ -1,1 +1,1 @@
-/trunk:1-19999
+/trunk:1-20263

Modified: team/oej/test-this-branch/app.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/app.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/app.c (original)
+++ team/oej/test-this-branch/app.c Sat Apr 15 03:10:15 2006
@@ -739,19 +739,13 @@
 	for (x=0;x<fmtcnt;x++) {
 		if (!others[x])
 			break;
-		if (res > 0) {
-			if (totalsilence)
-				ast_stream_rewind(others[x], totalsilence-200);
-			else
-				ast_stream_rewind(others[x], 200);
-		}
+		if (res > 0)
+			ast_stream_rewind(others[x], totalsilence ? totalsilence-200 : 200);
 		ast_truncstream(others[x]);
 		ast_closestream(others[x]);
 	}
-	if (rfmt) {
-		if (ast_set_read_format(chan, rfmt)) {
-			ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
-		}
+	if (rfmt && ast_set_read_format(chan, rfmt)) {
+		ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
 	}
 	if (outmsg > 1) {
 		/* Let them know recording is stopped */
@@ -982,17 +976,13 @@
 			ast_filedelete(prependfile, sfmt[x]);
 		}
 	}
-	if (rfmt) {
-		if (ast_set_read_format(chan, rfmt)) {
-			ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
-		}
-	}
-	if (outmsg) {
-		if (outmsg > 1) {
-			/* Let them know it worked */
-			ast_streamfile(chan, "auth-thankyou", chan->language);
-			ast_waitstream(chan, "");
-		}
+	if (rfmt && ast_set_read_format(chan, rfmt)) {
+		ast_log(LOG_WARNING, "Unable to restore format %s to channel '%s'\n", ast_getformatname(rfmt), chan->name);
+	}
+	if (outmsg > 1) {
+		/* Let them know it worked */
+		ast_streamfile(chan, "auth-thankyou", chan->language);
+		ast_waitstream(chan, "");
 	}	
 	return res;
 }

Modified: team/oej/test-this-branch/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_adsiprog.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_adsiprog.c (original)
+++ team/oej/test-this-branch/apps/app_adsiprog.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_alarmreceiver.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_alarmreceiver.c (original)
+++ team/oej/test-this-branch/apps/app_alarmreceiver.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_amd.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_amd.c (original)
+++ team/oej/test-this-branch/apps/app_amd.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_authenticate.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_authenticate.c (original)
+++ team/oej/test-this-branch/apps/app_authenticate.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_cdr.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_cdr.c (original)
+++ team/oej/test-this-branch/apps/app_cdr.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_chanisavail.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_chanisavail.c (original)
+++ team/oej/test-this-branch/apps/app_chanisavail.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_channelredirect.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_channelredirect.c (original)
+++ team/oej/test-this-branch/apps/app_channelredirect.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_chanspy.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_chanspy.c (original)
+++ team/oej/test-this-branch/apps/app_chanspy.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_controlplayback.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_controlplayback.c (original)
+++ team/oej/test-this-branch/apps/app_controlplayback.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_db.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_db.c (original)
+++ team/oej/test-this-branch/apps/app_db.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_dial.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_dial.c (original)
+++ team/oej/test-this-branch/apps/app_dial.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_dictate.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_dictate.c (original)
+++ team/oej/test-this-branch/apps/app_dictate.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_directed_pickup.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_directed_pickup.c (original)
+++ team/oej/test-this-branch/apps/app_directed_pickup.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_directory.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_directory.c (original)
+++ team/oej/test-this-branch/apps/app_directory.c Sat Apr 15 03:10:15 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";
@@ -177,16 +176,14 @@
 		/* If Option 'e' was specified, also read the extension number with the name */
 		if (readext) {
 			res = ast_streamfile(chan, "vm-extension", chan->language);
-			if (!res) {
+			if (!res)
 				res = ast_waitstream(chan, AST_DIGIT_ANY);
-			}
 			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
 		}
 	} else if (ast_fileexists(fn2, NULL, chan->language) > 0) {
 		res = ast_streamfile(chan, fn2, chan->language);
-		if (!res) {
+		if (!res)
 			res = ast_waitstream(chan, AST_DIGIT_ANY);
-		}
 		ast_stopstream(chan);
 		/* If Option 'e' was specified, also read the extension number with the name */
 		if (readext) {
@@ -201,23 +198,19 @@
 					AST_DIGIT_ANY, chan->language);
 		if (!ast_strlen_zero(name) && readext) {
 			res = ast_streamfile(chan, "vm-extension", chan->language);
-			if (!res) {
+			if (!res)
 				res = ast_waitstream(chan, AST_DIGIT_ANY);
-			}
 			res = ast_say_character_str(chan, ext, AST_DIGIT_ANY, chan->language);
 		}
 	}
 
 	while (loop) {
-		if (!res) {
+		if (!res)
 			res = ast_streamfile(chan, "dir-instr", chan->language);
-		}
-		if (!res) {
+		if (!res)
 			res = ast_waitstream(chan, AST_DIGIT_ANY);
-		}
-		if (!res) {
+		if (!res)
 			res = ast_waitfordigit(chan, 3000);
-		}
 		ast_stopstream(chan);
 	
 		if (res > -1) {
@@ -295,8 +288,8 @@
 		ast_category_append(cfg, cat);
 	}
 
-	mailbox = ast_category_browse(rtdata, NULL);
-	while (mailbox) {
+	mailbox = NULL;
+	while ( (mailbox = ast_category_browse(rtdata, mailbox)) ) {
 		fullname = ast_variable_retrieve(rtdata, mailbox, "fullname");
 		hidefromdir = ast_variable_retrieve(rtdata, mailbox, "hidefromdir");
 		snprintf(tmp, sizeof(tmp), "no-password,%s,hidefromdir=%s",
@@ -307,7 +300,6 @@
 			ast_variable_append(cat, var);
 		else
 			ast_log(LOG_WARNING, "Out of memory adding mailbox '%s'\n", mailbox);
-		mailbox = ast_category_browse(rtdata, mailbox);
 	}
 	ast_config_destroy(rtdata);
 
@@ -421,10 +413,7 @@
 		}
 
 		if (lastuserchoice != '1') {
-			if (found) 
-				res = ast_streamfile(chan, "dir-nomore", chan->language);
-			else
-				res = ast_streamfile(chan, "dir-nomatch", chan->language);
+			res = ast_streamfile(chan, found ? "dir-nomore" : "dir-nomatch", chan->language);
 			if (!res)
 				res = 1;
 			return res;
@@ -482,12 +471,8 @@
 	dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro");
 	if (ast_strlen_zero(dirintro))
 		dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
-	if (ast_strlen_zero(dirintro)) {
-		if (last)
-			dirintro = "dir-intro";	
-		else
-			dirintro = "dir-intro-fn";
-	}
+	if (ast_strlen_zero(dirintro))
+		dirintro = last ? "dir-intro" : "dir-intro-fn";
 
 	if (chan->_state != AST_STATE_UP) 
 		res = ast_answer(chan);
@@ -505,9 +490,8 @@
 			if (res > 0) {
 				res = ast_waitstream(chan, AST_DIGIT_ANY);
 				ast_stopstream(chan);
-				if (res >= 0) {
+				if (res >= 0)
 					continue;
-				}
 			}
 		}
 		break;
@@ -517,35 +501,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/oej/test-this-branch/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_disa.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_disa.c (original)
+++ team/oej/test-this-branch/apps/app_disa.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_dumpchan.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_dumpchan.c (original)
+++ team/oej/test-this-branch/apps/app_dumpchan.c Sat Apr 15 03:10:15 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 = 
@@ -159,7 +158,7 @@
 	return res;
 }
 
-int unload_module(void)
+static int unload_module(void *mod)
 {
 	int res;
 
@@ -170,25 +169,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/oej/test-this-branch/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_echo.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_echo.c (original)
+++ team/oej/test-this-branch/apps/app_echo.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_exec.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_exec.c (original)
+++ team/oej/test-this-branch/apps/app_exec.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_externalivr.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_externalivr.c (original)
+++ team/oej/test-this-branch/apps/app_externalivr.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_festival.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_festival.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_festival.c (original)
+++ team/oej/test-this-branch/apps/app_festival.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_flash.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_flash.c (original)
+++ team/oej/test-this-branch/apps/app_flash.c Sat Apr 15 03:10:15 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/oej/test-this-branch/apps/app_forkcdr.c
URL: http://svn.digium.com/view/asterisk/team/oej/test-this-branch/apps/app_forkcdr.c?rev=20265&r1=20264&r2=20265&view=diff
==============================================================================
--- team/oej/test-this-branch/apps/app_forkcdr.c (original)
+++ team/oej/test-this-branch/apps/app_forkcdr.c Sat Apr 15 03:10:15 2006
@@ -42,7 +42,6 @@
 #include "asterisk/cdr.h"
 #include "asterisk/module.h"
 

[... 10158 lines stripped ...]


More information about the asterisk-commits mailing list