[asterisk-commits] branch group/new_loader_completion r24835 - in
/team/group/new_loader_complet...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon May 8 04:10:41 MST 2006
Author: kpfleming
Date: Fri May 5 09:38:15 2006
New Revision: 24835
URL: http://svn.digium.com/view/asterisk?rev=24835&view=rev
Log:
first pass at updating applications (does not build yet)
Modified:
team/group/new_loader_completion/apps/app_adsiprog.c
team/group/new_loader_completion/apps/app_alarmreceiver.c
team/group/new_loader_completion/apps/app_amd.c
team/group/new_loader_completion/apps/app_authenticate.c
team/group/new_loader_completion/apps/app_cdr.c
team/group/new_loader_completion/apps/app_chanisavail.c
team/group/new_loader_completion/apps/app_channelredirect.c
team/group/new_loader_completion/apps/app_chanspy.c
team/group/new_loader_completion/apps/app_controlplayback.c
team/group/new_loader_completion/apps/app_db.c
team/group/new_loader_completion/apps/app_dial.c
team/group/new_loader_completion/apps/app_dictate.c
team/group/new_loader_completion/apps/app_directed_pickup.c
team/group/new_loader_completion/apps/app_directory.c
team/group/new_loader_completion/apps/app_disa.c
team/group/new_loader_completion/apps/app_dumpchan.c
team/group/new_loader_completion/apps/app_echo.c
team/group/new_loader_completion/apps/app_exec.c
team/group/new_loader_completion/apps/app_externalivr.c
team/group/new_loader_completion/apps/app_festival.c
team/group/new_loader_completion/apps/app_flash.c
team/group/new_loader_completion/apps/app_forkcdr.c
team/group/new_loader_completion/apps/app_getcpeid.c
team/group/new_loader_completion/apps/app_hasnewvoicemail.c
team/group/new_loader_completion/apps/app_ices.c
team/group/new_loader_completion/apps/app_image.c
team/group/new_loader_completion/apps/app_ivrdemo.c
team/group/new_loader_completion/apps/app_lookupblacklist.c
team/group/new_loader_completion/apps/app_lookupcidname.c
team/group/new_loader_completion/apps/app_macro.c
team/group/new_loader_completion/apps/app_meetme.c
team/group/new_loader_completion/apps/app_milliwatt.c
team/group/new_loader_completion/apps/app_mixmonitor.c
team/group/new_loader_completion/apps/app_morsecode.c
team/group/new_loader_completion/apps/app_mp3.c
team/group/new_loader_completion/apps/app_nbscat.c
team/group/new_loader_completion/apps/app_osplookup.c
team/group/new_loader_completion/apps/app_page.c
team/group/new_loader_completion/apps/app_parkandannounce.c
team/group/new_loader_completion/apps/app_playback.c
team/group/new_loader_completion/apps/app_privacy.c
team/group/new_loader_completion/apps/app_queue.c
team/group/new_loader_completion/apps/app_random.c
team/group/new_loader_completion/apps/app_read.c
team/group/new_loader_completion/apps/app_readfile.c
team/group/new_loader_completion/apps/app_realtime.c
team/group/new_loader_completion/apps/app_record.c
team/group/new_loader_completion/apps/app_rpt.c
team/group/new_loader_completion/apps/app_sayunixtime.c
team/group/new_loader_completion/apps/app_senddtmf.c
team/group/new_loader_completion/apps/app_sendtext.c
team/group/new_loader_completion/apps/app_setcallerid.c
team/group/new_loader_completion/apps/app_setcdruserfield.c
team/group/new_loader_completion/apps/app_settransfercapability.c
team/group/new_loader_completion/apps/app_skel.c
team/group/new_loader_completion/apps/app_sms.c
team/group/new_loader_completion/apps/app_softhangup.c
team/group/new_loader_completion/apps/app_speech_utils.c
team/group/new_loader_completion/apps/app_stack.c
team/group/new_loader_completion/apps/app_system.c
team/group/new_loader_completion/apps/app_talkdetect.c
team/group/new_loader_completion/apps/app_test.c
team/group/new_loader_completion/apps/app_transfer.c
team/group/new_loader_completion/apps/app_url.c
team/group/new_loader_completion/apps/app_userevent.c
team/group/new_loader_completion/apps/app_verbose.c
team/group/new_loader_completion/apps/app_voicemail.c
team/group/new_loader_completion/apps/app_waitforring.c
team/group/new_loader_completion/apps/app_waitforsilence.c
team/group/new_loader_completion/apps/app_while.c
team/group/new_loader_completion/apps/app_zapateller.c
team/group/new_loader_completion/apps/app_zapbarge.c
team/group/new_loader_completion/apps/app_zapras.c
team/group/new_loader_completion/apps/app_zapscan.c
team/group/new_loader_completion/funcs/func_odbc.c
team/group/new_loader_completion/funcs/func_rand.c
Modified: team/group/new_loader_completion/apps/app_adsiprog.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_adsiprog.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_adsiprog.c (original)
+++ team/group/new_loader_completion/apps/app_adsiprog.c Fri May 5 09:38:15 2006
@@ -1545,9 +1545,9 @@
static int adsi_exec(struct ast_channel *chan, void *data)
{
int res=0;
- struct localuser *u;
-
- LOCAL_USER_ADD(u);
+ struct ast_module_user *u;
+
+ u = ast_module_user_add(chan);
if (ast_strlen_zero(data))
data = "asterisk.adsi";
@@ -1561,16 +1561,16 @@
res = adsi_prog(chan, data);
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
res = ast_unregister_application(app);
@@ -1578,9 +1578,8 @@
return res;
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
return ast_register_application(app, adsi_exec, synopsis, descrip);
}
@@ -1594,4 +1593,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_alarmreceiver.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_alarmreceiver.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_alarmreceiver.c (original)
+++ team/group/new_loader_completion/apps/app_alarmreceiver.c Fri May 5 09:38:15 2006
@@ -624,13 +624,13 @@
static int alarmreceiver_exec(struct ast_channel *chan, void *data)
{
int res = 0;
- struct localuser *u;
+ struct ast_module_user *u;
event_node_t *elp, *efree;
char signalling_type[64] = "";
event_node_t *event_head = NULL;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
/* Set write and read formats to ULAW */
@@ -639,13 +639,13 @@
if (ast_set_write_format(chan,AST_FORMAT_ULAW)){
ast_log(LOG_WARNING, "AlarmReceiver: Unable to set write format to Mu-law on %s\n",chan->name);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
if (ast_set_read_format(chan,AST_FORMAT_ULAW)){
ast_log(LOG_WARNING, "AlarmReceiver: Unable to set read format to Mu-law on %s\n",chan->name);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -664,7 +664,7 @@
res = ast_answer(chan);
if (res) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
}
@@ -719,7 +719,7 @@
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -816,20 +816,19 @@
*/
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
load_config();
return ast_register_application(app, alarmreceiver_exec, synopsis, descrip);
}
@@ -844,4 +843,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_amd.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_amd.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_amd.c (original)
+++ team/group/new_loader_completion/apps/app_amd.c Fri May 5 09:38:15 2006
@@ -325,11 +325,11 @@
static int amd_exec(struct ast_channel *chan, void *data)
{
- struct localuser *u;
-
- LOCAL_USER_ADD(u);
+ struct ast_module_user *u;
+
+ u = ast_module_user_add(chan);
isAnsweringMachine(chan, data);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -389,20 +389,19 @@
return;
}
-static int unload_module(void *mod)
-{
- STANDARD_HANGUP_LOCALUSERS;
+static int unload_module(void)
+{
+ ast_module_user_hangup_all();
return ast_unregister_application(app);
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
load_config();
return ast_register_application(app, amd_exec, synopsis, descrip);
}
-static int reload(void *mod)
+static int reload(void)
{
load_config();
return 0;
Modified: team/group/new_loader_completion/apps/app_authenticate.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_authenticate.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_authenticate.c (original)
+++ team/group/new_loader_completion/apps/app_authenticate.c Fri May 5 09:38:15 2006
@@ -95,7 +95,7 @@
{
int res=0;
int retries;
- struct localuser *u;
+ struct ast_module_user *u;
char passwd[256];
char *prompt;
int maxdigits;
@@ -113,18 +113,18 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (chan->_state != AST_STATE_UP) {
res = ast_answer(chan);
if (res) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
}
if (!(argcopy = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -229,15 +229,15 @@
res = -1;
}
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
res = ast_unregister_application(app);
@@ -245,7 +245,7 @@
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, auth_exec, synopsis, descrip);
}
@@ -260,4 +260,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_cdr.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_cdr.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_cdr.c (original)
+++ team/group/new_loader_completion/apps/app_cdr.c Fri May 5 09:38:15 2006
@@ -43,36 +43,35 @@
static char *nocdr_app = "NoCDR";
static char *nocdr_synopsis = "Tell Asterisk to not maintain a CDR for the current call";
-LOCAL_USER_DECL;
static int nocdr_exec(struct ast_channel *chan, void *data)
{
- struct localuser *u;
+ struct ast_module_user *u;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (chan->cdr) {
ast_cdr_free(chan->cdr);
chan->cdr = NULL;
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(nocdr_app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(nocdr_app, nocdr_exec, nocdr_synopsis, nocdr_descrip);
}
@@ -87,4 +86,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_chanisavail.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_chanisavail.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_chanisavail.c (original)
+++ team/group/new_loader_completion/apps/app_chanisavail.c Fri May 5 09:38:15 2006
@@ -63,13 +63,12 @@
" s - Consider the channel unavailable if the channel is in use at all\n"
" j - Support jumping to priority n+101 if no channel is available\n";
-LOCAL_USER_DECL;
static int chanavail_exec(struct ast_channel *chan, void *data)
{
int res=-1, inuse=-1, option_state=0, priority_jump=0;
int status;
- struct localuser *u;
+ struct ast_module_user *u;
char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur;
struct ast_channel *tempchan;
AST_DECLARE_APP_ARGS(args,
@@ -82,7 +81,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
info = ast_strdupa(data);
@@ -108,7 +107,7 @@
number = strchr(tech, '/');
if (!number) {
ast_log(LOG_WARNING, "ChanIsAvail argument takes format ([technology]/[device])\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
*number = '\0';
@@ -145,30 +144,29 @@
pbx_builtin_setvar_helper(chan, "AVAILORIGCHAN", "");
if (priority_jump || ast_opt_priority_jumping) {
if (ast_goto_if_exists(chan, chan->context, chan->exten, chan->priority + 101)) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
}
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res = 0;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
- __mod_desc = mod;
return ast_register_application(app, chanavail_exec, synopsis, descrip);
}
@@ -182,4 +180,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_channelredirect.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_channelredirect.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_channelredirect.c (original)
+++ team/group/new_loader_completion/apps/app_channelredirect.c Fri May 5 09:38:15 2006
@@ -47,12 +47,11 @@
"ChannelRedirect(channel|[[context|]extension|]priority):\n"
" Sends the specified channel to the specified extension priority\n";
-LOCAL_USER_DECL;
static int asyncgoto_exec(struct ast_channel *chan, void *data)
{
int res = -1;
- struct localuser *u;
+ struct ast_module_user *u;
char *info, *context, *exten, *priority;
int prio = 1;
struct ast_channel *chan2 = NULL;
@@ -67,7 +66,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
info = ast_strdupa(data);
AST_STANDARD_APP_ARGS(args, info);
@@ -115,25 +114,24 @@
chanquit:
ast_mutex_unlock(&chan2->lock);
quit:
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
- __mod_desc = mod;
return ast_register_application(app, asyncgoto_exec, synopsis, descrip);
}
@@ -147,4 +145,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_chanspy.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_chanspy.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_chanspy.c (original)
+++ team/group/new_loader_completion/apps/app_chanspy.c Fri May 5 09:38:15 2006
@@ -53,7 +53,7 @@
AST_MUTEX_DEFINE_STATIC(modlock);
#define AST_NAME_STRLEN 256
-#define ALL_DONE(u, ret) LOCAL_USER_REMOVE(u); return ret;
+#define ALL_DONE(u, ret) ast_module_user_remove(u); return ret;
#define get_volfactor(x) x ? ((x > 0) ? (1 << x) : ((1 << abs(x)) * -1)) : 0
static const char *synopsis = "Listen to the audio of an active channel";
@@ -107,7 +107,6 @@
AST_APP_OPTION_ARG('r', OPTION_RECORD, OPT_ARG_RECORD),
});
-LOCAL_USER_DECL;
struct chanspy_translation_helper {
/* spy data */
@@ -356,7 +355,7 @@
static int chanspy_exec(struct ast_channel *chan, void *data)
{
- struct localuser *u;
+ struct ast_module_user *u;
struct ast_channel *peer=NULL, *prev=NULL;
char name[AST_NAME_STRLEN],
peer_name[AST_NAME_STRLEN + 5],
@@ -385,19 +384,19 @@
if (!(args = ast_strdupa(data)))
return -1;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
oldrf = chan->readformat;
oldwf = chan->writeformat;
if (ast_set_read_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Read Format.\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
if (ast_set_write_format(chan, AST_FORMAT_SLINEAR) < 0) {
ast_log(LOG_ERROR, "Could Not Set Write Format.\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -554,20 +553,19 @@
ALL_DONE(u, res);
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
return ast_register_application(app, chanspy_exec, synopsis, desc);
}
@@ -581,4 +579,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_controlplayback.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_controlplayback.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_controlplayback.c (original)
+++ team/group/new_loader_completion/apps/app_controlplayback.c Fri May 5 09:38:15 2006
@@ -66,7 +66,6 @@
" CPLAYBACKSTATUS - This variable contains the status of the attempt as a text\n"
" string, one of: SUCCESS | USERSTOPPED | ERROR\n";
-LOCAL_USER_DECL;
static int is_on_phonepad(char key)
{
@@ -77,7 +76,7 @@
{
int res = 0, priority_jump = 0;
int skipms = 0;
- struct localuser *u;
+ struct ast_module_user *u;
char *tmp;
int argc;
char *argv[8];
@@ -97,7 +96,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
tmp = ast_strdupa(data);
memset(argv, 0, sizeof(argv));
@@ -106,7 +105,7 @@
if (argc < 1) {
ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -149,19 +148,19 @@
pbx_builtin_setvar_helper(chan, "CPLAYBACKSTATUS", "SUCCESS");
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, controlplayback_exec, synopsis, descrip);
}
@@ -176,4 +175,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_db.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_db.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_db.c (original)
+++ team/group/new_loader_completion/apps/app_db.c Fri May 5 09:38:15 2006
@@ -62,17 +62,16 @@
static char *d_synopsis = "Delete a key from the database";
static char *dt_synopsis = "Delete a family or keytree from the database";
-LOCAL_USER_DECL;
static int deltree_exec(struct ast_channel *chan, void *data)
{
char *argv, *family, *keytree;
- struct localuser *u;
+ struct ast_module_user *u;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!(argv = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -81,7 +80,7 @@
keytree = strsep(&argv, "\0");
if (!family || !keytree) {
ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
if (ast_strlen_zero(keytree))
@@ -103,7 +102,7 @@
ast_verbose(VERBOSE_PREFIX_3 "DBdeltree: Error deleting key from database.\n");
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -111,12 +110,12 @@
static int del_exec(struct ast_channel *chan, void *data)
{
char *argv, *family, *key;
- struct localuser *u;
+ struct ast_module_user *u;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!(argv = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
@@ -125,7 +124,7 @@
key = strsep(&argv, "\0");
if (!family || !key) {
ast_log(LOG_DEBUG, "Ignoring; Syntax error in argument\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
if (option_verbose > 2)
@@ -138,12 +137,12 @@
ast_log(LOG_DEBUG, "Ignoring, no parameters\n");
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int retval;
@@ -153,11 +152,10 @@
return retval;
}
-static int load_module(void *mod)
+static int load_module(void)
{
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);
@@ -174,4 +172,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dial.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dial.c (original)
+++ team/group/new_loader_completion/apps/app_dial.c Fri May 5 09:38:15 2006
@@ -282,7 +282,6 @@
struct dial_localuser *next;
};
-LOCAL_USER_DECL;
static void hanguptree(struct dial_localuser *outgoing, struct ast_channel *exception)
{
@@ -728,7 +727,7 @@
static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags *peerflags)
{
int res = -1;
- struct localuser *u;
+ struct ast_module_user *u;
char *rest, *cur;
struct dial_localuser *outgoing = NULL;
struct ast_channel *peer;
@@ -772,7 +771,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!(parse = ast_strdupa(data)))
goto done;
@@ -1556,7 +1555,7 @@
res = 0;
done:
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
@@ -1572,7 +1571,7 @@
char *announce = NULL, *dialdata = NULL;
const char *context = NULL;
int sleep = 0, loops = 0, res = -1;
- struct localuser *u;
+ struct ast_module_user *u;
struct ast_flags peerflags;
if (ast_strlen_zero(data)) {
@@ -1580,7 +1579,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!(announce = ast_strdupa(data)))
goto done;
@@ -1662,23 +1661,23 @@
if (ast_test_flag(chan, AST_FLAG_MOH))
ast_moh_stop(chan);
done:
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
res |= ast_unregister_application(rapp);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
int res;
@@ -1698,4 +1697,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dictate.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dictate.c (original)
+++ team/group/new_loader_completion/apps/app_dictate.c Fri May 5 09:38:15 2006
@@ -51,7 +51,6 @@
static char *desc = " Dictate([<base_dir>[|<filename>]])\n"
"Start dictation machine using optional base dir for files.\n";
-LOCAL_USER_DECL;
typedef enum {
DFLAG_RECORD = (1 << 0),
@@ -90,7 +89,7 @@
struct ast_flags flags = {0};
struct ast_filestream *fs;
struct ast_frame *f = NULL;
- struct localuser *u;
+ struct ast_module_user *u;
int ffactor = 320 * 80,
res = 0,
done = 0,
@@ -103,7 +102,7 @@
maxlen = 0,
mode = 0;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
if (!ast_strlen_zero(data)) {
@@ -124,7 +123,7 @@
oldr = chan->readformat;
if ((res = ast_set_read_format(chan, AST_FORMAT_SLINEAR)) < 0) {
ast_log(LOG_WARNING, "Unable to set to linear mode.\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -331,20 +330,19 @@
if (oldr) {
ast_set_read_format(chan, oldr);
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
return res;
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
return ast_register_application(app, dictate_exec, synopsis, desc);
}
@@ -358,4 +356,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_directed_pickup.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_directed_pickup.c (original)
+++ team/group/new_loader_completion/apps/app_directed_pickup.c Fri May 5 09:38:15 2006
@@ -49,12 +49,11 @@
"that is calling the specified extension. If no context is specified, the current\n"
"context will be used.\n";
-LOCAL_USER_DECL;
static int pickup_exec(struct ast_channel *chan, void *data)
{
int res = 0;
- struct localuser *u = NULL;
+ struct ast_module_user *u = NULL;
struct ast_channel *origin = NULL, *target = NULL;
char *tmp = NULL, *exten = NULL, *context = NULL, *rest=data;
char workspace[256] = "";
@@ -64,7 +63,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
while (!target && (exten = rest) ) {
res = 0;
@@ -128,12 +127,12 @@
if (target)
ast_mutex_unlock(&target->lock);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
@@ -142,9 +141,8 @@
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
- __mod_desc = mod;
return ast_register_application(app, pickup_exec, synopsis, descrip);
}
@@ -158,4 +156,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD(MOD_1, NULL, NULL, NULL);
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_directory.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_directory.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_directory.c (original)
+++ team/group/new_loader_completion/apps/app_directory.c Fri May 5 09:38:15 2006
@@ -77,7 +77,6 @@
/* How many digits to read in */
#define NUMDIGITS 3
-LOCAL_USER_DECL;
static char *convert(char *lastname)
{
@@ -393,7 +392,7 @@
static int directory_exec(struct ast_channel *chan, void *data)
{
int res = 0;
- struct localuser *u;
+ struct ast_module_user *u;
struct ast_config *cfg;
int last = 1;
int readext = 0;
@@ -409,10 +408,10 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!(parse = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -431,7 +430,7 @@
cfg = realtime_directory(args.vmcontext);
if (!cfg) {
ast_log(LOG_ERROR, "Unable to read the configuration data!\n");
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -462,20 +461,19 @@
break;
}
ast_config_destroy(cfg);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
return res;
}
-static int load_module(void *mod)
-{
- __mod_desc = mod;
+static int load_module(void)
+{
return ast_register_application(app, directory_exec, synopsis, descrip);
}
@@ -489,4 +487,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_disa.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_disa.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_disa.c (original)
+++ team/group/new_loader_completion/apps/app_disa.c Fri May 5 09:38:15 2006
@@ -95,7 +95,6 @@
"exists in the context, it will be used. Also, if you set the 5th argument\n"
"to 'NOANSWER', the DISA application will not answer initially.\n";
-LOCAL_USER_DECL;
static void play_dialtone(struct ast_channel *chan, char *mailbox)
{
@@ -115,7 +114,7 @@
int i,j,k,x,did_ignore,special_noanswer;
int firstdigittimeout = 20000;
int digittimeout = 10000;
- struct localuser *u;
+ struct ast_module_user *u;
char *tmp, exten[AST_MAX_EXTENSION],acctcode[20]="";
char pwline[256];
char ourcidname[256],ourcidnum[256];
@@ -137,7 +136,7 @@
return -1;
}
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (chan->pbx) {
firstdigittimeout = chan->pbx->rtimeout*1000;
@@ -146,12 +145,12 @@
if (ast_set_write_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set write format to Mu-law on %s\n", chan->name);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
if (ast_set_read_format(chan,AST_FORMAT_ULAW)) {
ast_log(LOG_WARNING, "Unable to set read format to Mu-law on %s\n", chan->name);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -159,7 +158,7 @@
ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
if (!(tmp = ast_strdupa(data))) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
@@ -212,13 +211,13 @@
f = ast_read(chan);
if (f == NULL) {
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
if ((f->frametype == AST_FRAME_CONTROL) &&
(f->subclass == AST_CONTROL_HANGUP)) {
ast_frfree(f);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
if (f->frametype == AST_FRAME_VOICE) {
@@ -248,7 +247,7 @@
fp = fopen(args.passcode,"r");
if (!fp) {
ast_log(LOG_WARNING,"DISA password file %s not found on chan %s\n",args.passcode,chan->name);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
pwline[0] = 0;
@@ -349,7 +348,7 @@
if (special_noanswer) flags.flags = 0;
ast_cdr_reset(chan->cdr, &flags);
ast_explicit_goto(chan, args.context, exten, 1);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
}
@@ -370,22 +369,22 @@
ast_frfree(f);
}
ast_playtones_stop(chan);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return -1;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, disa_exec, synopsis, descrip);
}
@@ -400,4 +399,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_dumpchan.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_dumpchan.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_dumpchan.c (original)
+++ team/group/new_loader_completion/apps/app_dumpchan.c Fri May 5 09:38:15 2006
@@ -55,7 +55,6 @@
"displayed when the verbose level is currently set to that number\n"
"or greater. \n";
-LOCAL_USER_DECL;
static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
{
@@ -134,13 +133,13 @@
static int dumpchan_exec(struct ast_channel *chan, void *data)
{
int res=0;
- struct localuser *u;
+ struct ast_module_user *u;
char vars[1024];
char info[1024];
int level = 0;
static char *line = "================================================================================";
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
if (!ast_strlen_zero(data)) {
level = atoi(data);
@@ -151,23 +150,23 @@
if (option_verbose >= level)
ast_verbose("\nDumping Info For Channel: %s:\n%s\nInfo:\n%s\nVariables:\n%s%s\n",chan->name, line, info, vars, line);
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, dumpchan_exec, synopsis, desc);
}
@@ -182,4 +181,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_echo.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_echo.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_echo.c (original)
+++ team/group/new_loader_completion/apps/app_echo.c Fri May 5 09:38:15 2006
@@ -52,15 +52,14 @@
"the calling channel back to itself. If the DTMF digit '#' is received, the\n"
"application will exit.\n";
-LOCAL_USER_DECL;
static int echo_exec(struct ast_channel *chan, void *data)
{
int res = -1;
int format;
- struct localuser *u;
+ struct ast_module_user *u;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
format = ast_best_codec(chan->nativeformats);
ast_set_write_format(chan, format);
@@ -90,23 +89,23 @@
ast_frfree(f);
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, echo_exec, synopsis, descrip);
}
@@ -121,4 +120,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_exec.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_exec.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_exec.c (original)
+++ team/group/new_loader_completion/apps/app_exec.c Fri May 5 09:38:15 2006
@@ -83,16 +83,15 @@
" NOAPP if the application was not found or was not specified\n"
" NOMEMORY if there was not enough memory to execute.\n";
-LOCAL_USER_DECL;
static int exec_exec(struct ast_channel *chan, void *data)
{
int res=0;
- struct localuser *u;
+ struct ast_module_user *u;
char *s, *appname, *endargs, args[MAXRESULT] = "";
struct ast_app *app;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
/* Check and parse arguments */
if (data) {
@@ -117,18 +116,18 @@
res = -1;
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return res;
}
static int tryexec_exec(struct ast_channel *chan, void *data)
{
int res=0;
- struct localuser *u;
+ struct ast_module_user *u;
char *s, *appname, *endargs, args[MAXRESULT] = "";
struct ast_app *app;
- LOCAL_USER_ADD(u);
+ u = ast_module_user_add(chan);
/* Check and parse arguments */
if (data) {
@@ -156,23 +155,23 @@
}
}
- LOCAL_USER_REMOVE(u);
+ ast_module_user_remove(u);
return 0;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app_exec);
res |= ast_unregister_application(app_tryexec);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
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);
@@ -189,4 +188,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_externalivr.c
URL: http://svn.digium.com/view/asterisk/team/group/new_loader_completion/apps/app_externalivr.c?rev=24835&r1=24834&r2=24835&view=diff
==============================================================================
--- team/group/new_loader_completion/apps/app_externalivr.c (original)
+++ team/group/new_loader_completion/apps/app_externalivr.c Fri May 5 09:38:15 2006
@@ -84,7 +84,6 @@
int option_autoclear;
};
-LOCAL_USER_DECL;
struct gen_state {
struct ivr_localuser *u;
@@ -554,18 +553,18 @@
return res;
}
-static int unload_module(void *mod)
+static int unload_module(void)
{
int res;
res = ast_unregister_application(app);
- STANDARD_HANGUP_LOCALUSERS;
+ ast_module_user_hangup_all();
return res;
}
-static int load_module(void *mod)
+static int load_module(void)
{
return ast_register_application(app, app_exec, synopsis, descrip);
}
@@ -580,4 +579,4 @@
return ASTERISK_GPL_KEY;
}
-STD_MOD1;
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, XXX);
Modified: team/group/new_loader_completion/apps/app_festival.c
[... 4855 lines stripped ...]
More information about the asterisk-commits
mailing list