[asterisk-commits] branch group/autoconf_and_menuselect r21003 - in
/team/group/autoconf_and_men...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Apr 17 10:58:18 MST 2006
Author: russell
Date: Mon Apr 17 12:57:26 2006
New Revision: 21003
URL: http://svn.digium.com/view/asterisk?rev=21003&view=rev
Log:
- resolve more conflicts and re-enable automerge
- move all of the MODULEINFO blocks to the top of files since it seems to make
more sense to have them there. This was inspired by all of the conflicts we
were getting due to the module loader changes. This should keep that from
happening.
Modified:
team/group/autoconf_and_menuselect/ (props changed)
team/group/autoconf_and_menuselect/apps/app_flash.c
team/group/autoconf_and_menuselect/apps/app_ivrdemo.c
team/group/autoconf_and_menuselect/apps/app_meetme.c
team/group/autoconf_and_menuselect/apps/app_osplookup.c
team/group/autoconf_and_menuselect/apps/app_page.c
team/group/autoconf_and_menuselect/apps/app_rpt.c
team/group/autoconf_and_menuselect/apps/app_skel.c
team/group/autoconf_and_menuselect/apps/app_zapbarge.c
team/group/autoconf_and_menuselect/apps/app_zapras.c
team/group/autoconf_and_menuselect/apps/app_zapscan.c
team/group/autoconf_and_menuselect/cdr/cdr_odbc.c
team/group/autoconf_and_menuselect/cdr/cdr_pgsql.c
team/group/autoconf_and_menuselect/cdr/cdr_sqlite.c
team/group/autoconf_and_menuselect/cdr/cdr_tds.c
team/group/autoconf_and_menuselect/channel.c
team/group/autoconf_and_menuselect/channels/chan_alsa.c
team/group/autoconf_and_menuselect/channels/chan_h323.c
team/group/autoconf_and_menuselect/channels/chan_misdn.c
team/group/autoconf_and_menuselect/channels/chan_nbs.c
team/group/autoconf_and_menuselect/channels/chan_oss.c
team/group/autoconf_and_menuselect/channels/chan_phone.c
team/group/autoconf_and_menuselect/channels/chan_vpb.c
team/group/autoconf_and_menuselect/channels/chan_zap.c
team/group/autoconf_and_menuselect/codecs/codec_speex.c
team/group/autoconf_and_menuselect/formats/format_ogg_vorbis.c
team/group/autoconf_and_menuselect/funcs/func_curl.c
team/group/autoconf_and_menuselect/funcs/func_odbc.c
team/group/autoconf_and_menuselect/include/asterisk/translate.h
team/group/autoconf_and_menuselect/pbx/pbx_dundi.c
team/group/autoconf_and_menuselect/pbx/pbx_gtkconsole.c
team/group/autoconf_and_menuselect/pbx/pbx_kdeconsole.cc
team/group/autoconf_and_menuselect/res/res_config_odbc.c
team/group/autoconf_and_menuselect/res/res_config_pgsql.c
team/group/autoconf_and_menuselect/res/res_crypto.c
team/group/autoconf_and_menuselect/res/res_musiconhold.c
team/group/autoconf_and_menuselect/res/res_odbc.c
team/group/autoconf_and_menuselect/res/res_osp.c
team/group/autoconf_and_menuselect/res/res_snmp.c
team/group/autoconf_and_menuselect/translate.c
Propchange: team/group/autoconf_and_menuselect/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/autoconf_and_menuselect/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Propchange: team/group/autoconf_and_menuselect/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Apr 17 12:57:26 2006
@@ -14,14 +14,3 @@
tags
TAGS
testexpr2
-makeopts
-menuselect.makeopts
-config.status
-config.log
-makeopts.xml
-aclocal.m4
-install-sh
-configure
-autom4te.cache
-missing
-mkinstalldirs
Propchange: team/group/autoconf_and_menuselect/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Apr 17 12:57:26 2006
@@ -1,1 +1,1 @@
-/trunk:1-20936
+/trunk:1-21002
Modified: team/group/autoconf_and_menuselect/apps/app_flash.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_flash.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_flash.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_flash.c Mon Apr 17 12:57:26 2006
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -133,6 +137,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_ivrdemo.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_ivrdemo.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_ivrdemo.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_ivrdemo.c Mon Apr 17 12:57:26 2006
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <defaultbuild>no</defaultbuild>
+ ***/
#include <stdio.h>
#include <stdlib.h>
@@ -138,6 +142,3 @@
STD_MOD1;
-/*** MODULEINFO
- <defaultbuild>no</defaultbuild>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_meetme.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_meetme.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_meetme.c Mon Apr 17 12:57:26 2006
@@ -25,6 +25,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <stdlib.h>
#include <stdio.h>
@@ -2473,6 +2477,3 @@
STD_MOD(MOD_1, reload, NULL, NULL);
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_osplookup.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_osplookup.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_osplookup.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_osplookup.c Mon Apr 17 12:57:26 2006
@@ -24,6 +24,11 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>libosptk</depend>
+ <depend>ssl</depend>
+ ***/
#include <stdio.h>
#include <stdlib.h>
@@ -638,7 +643,4 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>libosptk</depend>
- <depend>ssl</depend>
- ***/
+
Modified: team/group/autoconf_and_menuselect/apps/app_page.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_page.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_page.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_page.c Mon Apr 17 12:57:26 2006
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <stdio.h>
#include <stdlib.h>
@@ -231,6 +235,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_rpt.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_rpt.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_rpt.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_rpt.c Mon Apr 17 12:57:26 2006
@@ -94,6 +94,11 @@
*
*
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ <defaultbuild>no</defaultbuild>
+ ***/
/* The following is JUST GROSS!! There is some soft of underlying problem,
probably in channel_iax2.c, that causes an IAX2 connection to sometimes
@@ -7064,7 +7069,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- <defaultbuild>no</defaultbuild>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_skel.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_skel.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_skel.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_skel.c Mon Apr 17 12:57:26 2006
@@ -25,6 +25,10 @@
* This is a skeleton for development of an Asterisk application
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <defaultbuild>no</defaultbuild>
+ ***/
#include <stdio.h>
#include <stdlib.h>
@@ -142,6 +146,3 @@
STD_MOD1;
-/*** MODULEINFO
- <defaultbuild>no</defaultbuild>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_zapbarge.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_zapbarge.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_zapbarge.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_zapbarge.c Mon Apr 17 12:57:26 2006
@@ -30,6 +30,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <stdlib.h>
#include <stdio.h>
@@ -330,6 +334,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_zapras.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_zapras.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_zapras.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_zapras.c Mon Apr 17 12:57:26 2006
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <sys/ioctl.h>
#include <sys/wait.h>
@@ -268,6 +272,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/apps/app_zapscan.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/apps/app_zapscan.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/apps/app_zapscan.c (original)
+++ team/group/autoconf_and_menuselect/apps/app_zapscan.c Mon Apr 17 12:57:26 2006
@@ -29,6 +29,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <stdlib.h>
#include <stdio.h>
@@ -391,6 +395,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/cdr/cdr_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cdr/cdr_odbc.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cdr/cdr_odbc.c (original)
+++ team/group/autoconf_and_menuselect/cdr/cdr_odbc.c Mon Apr 17 12:57:26 2006
@@ -27,6 +27,10 @@
* \arg \ref Config_cdr
* \ingroup cdr_drivers
*/
+
+/*** MODULEINFO
+ <depend>unixodbc</depend>
+ ***/
#include <sys/types.h>
#include <stdio.h>
@@ -472,7 +476,3 @@
}
STD_MOD(MOD_0, reload, NULL, NULL);
-
-/*** MODULEINFO
- <depend>unixodbc</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/cdr/cdr_pgsql.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cdr/cdr_pgsql.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cdr/cdr_pgsql.c (original)
+++ team/group/autoconf_and_menuselect/cdr/cdr_pgsql.c Mon Apr 17 12:57:26 2006
@@ -31,6 +31,10 @@
* \arg http://www.postgresql.org/
* \ingroup cdr_drivers
*/
+
+/*** MODULEINFO
+ <depend>pgsql</depend>
+ ***/
#include <sys/types.h>
#include <stdio.h>
@@ -176,7 +180,7 @@
return 0;
}
-const char *description(void)
+static const char *description(void)
{
return desc;
}
@@ -326,38 +330,25 @@
return res;
}
-int load_module(void)
+static int load_module(void *mod)
{
return my_load_module();
}
-int unload_module(void)
+static int unload_module(void *mod)
{
return my_unload_module();
}
-int reload(void)
+static int reload(void *mod)
{
my_unload_module();
return my_load_module();
}
-int usecount(void)
-{
- /* To be able to unload the module */
- if ( ast_mutex_trylock(&pgsql_lock) ) {
- return 1;
- } else {
- ast_mutex_unlock(&pgsql_lock);
- return 0;
- }
-}
-
-const char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>pgsql</depend>
- ***/
+STD_MOD(MOD_0, reload, NULL, NULL);
Modified: team/group/autoconf_and_menuselect/cdr/cdr_sqlite.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cdr/cdr_sqlite.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cdr/cdr_sqlite.c (original)
+++ team/group/autoconf_and_menuselect/cdr/cdr_sqlite.c Mon Apr 17 12:57:26 2006
@@ -30,6 +30,10 @@
* Creates the database and table on-the-fly
* \ingroup cdr_drivers
*/
+
+/*** MODULEINFO
+ <depend>sqlite</depend>
+ ***/
#include <sys/types.h>
@@ -164,12 +168,12 @@
}
-const char *description(void)
+static const char *description(void)
{
return desc;
}
-int unload_module(void)
+static int unload_module(void *mod)
{
if (db)
sqlite_close(db);
@@ -177,7 +181,7 @@
return 0;
}
-int load_module(void)
+static int load_module(void *mod)
{
char *zErr;
char fn[PATH_MAX];
@@ -218,21 +222,14 @@
return -1;
}
-int reload(void)
+static int reload(void *mod)
{
return 0;
}
-int usecount(void)
-{
- return 0;
-}
-
-const char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>sqlite</depend>
- ***/
+STD_MOD(MOD_0, reload, NULL, NULL);
Modified: team/group/autoconf_and_menuselect/cdr/cdr_tds.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/cdr/cdr_tds.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/cdr/cdr_tds.c (original)
+++ team/group/autoconf_and_menuselect/cdr/cdr_tds.c Mon Apr 17 12:57:26 2006
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 2004 - 2005, Digium, Inc.
+ * Copyright (C) 2004 - 2006, Digium, Inc.
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
@@ -54,6 +54,10 @@
\endverbatim
*/
+
+/*** MODULEINFO
+ <depend>freetds</depend>
+ ***/
#include <sys/types.h>
#include <stdio.h>
@@ -293,7 +297,7 @@
}
}
-const char *description(void)
+static const char *description(void)
{
return desc;
}
@@ -499,38 +503,25 @@
return res;
}
-int reload(void)
+static int reload(void *mod)
{
tds_unload_module();
return tds_load_module();
}
-int load_module(void)
+static int load_module(void *mod)
{
return tds_load_module();
}
-int unload_module(void)
+static int unload_module(void *mod)
{
return tds_unload_module();
}
-int usecount(void)
-{
- /* Simplistic use count */
- if (ast_mutex_trylock(&tds_lock)) {
- return 1;
- } else {
- ast_mutex_unlock(&tds_lock);
- return 0;
- }
-}
-
-const char *key()
+static const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>freetds</depend>
- ***/
+STD_MOD(MOD_0, reload, NULL, NULL);
Modified: team/group/autoconf_and_menuselect/channel.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channel.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channel.c (original)
+++ team/group/autoconf_and_menuselect/channel.c Mon Apr 17 12:57:26 2006
@@ -2744,8 +2744,10 @@
/* if the best path is not 'pass through', then
transcoding is needed; if desired, force transcode path
- to use SLINEAR between channels */
- if ((src != dst) && ast_opt_transcode_via_slin)
+ to use SLINEAR between channels, but only if there is
+ no direct conversion available */
+ if ((src != dst) && ast_opt_transcode_via_slin &&
+ (ast_translate_path_steps(dst, src) != 1))
dst = AST_FORMAT_SLINEAR;
if (ast_set_read_format(chan, dst) < 0) {
ast_log(LOG_WARNING, "Unable to set read format on channel %s to %d\n", chan->name, dst);
@@ -2763,10 +2765,13 @@
ast_log(LOG_WARNING, "No path to translate from %s(%d) to %s(%d)\n", peer->name, src, chan->name, dst);
return -1;
}
+
/* if the best path is not 'pass through', then
transcoding is needed; if desired, force transcode path
- to use SLINEAR between channels */
- if ((src != dst) && ast_opt_transcode_via_slin)
+ to use SLINEAR between channels, but only if there is
+ no direct conversion available */
+ if ((src != dst) && ast_opt_transcode_via_slin &&
+ (ast_translate_path_steps(dst, src) != 1))
dst = AST_FORMAT_SLINEAR;
if (ast_set_read_format(peer, dst) < 0) {
ast_log(LOG_WARNING, "Unable to set read format on channel %s to %d\n", peer->name, dst);
Modified: team/group/autoconf_and_menuselect/channels/chan_alsa.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_alsa.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_alsa.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_alsa.c Mon Apr 17 12:57:26 2006
@@ -27,6 +27,9 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <depend>asound</depend>
+ ***/
#include <unistd.h>
#include <fcntl.h>
@@ -1042,7 +1045,7 @@
{ { "autoanswer", NULL }, console_autoanswer, "Sets/displays autoanswer", autoanswer_usage, autoanswer_complete }
};
-int load_module()
+int load_module(void)
{
int res;
int x;
@@ -1103,7 +1106,7 @@
-int unload_module()
+int unload_module(void)
{
int x;
@@ -1125,21 +1128,18 @@
return 0;
}
-const char *description()
+const char *description(void)
{
return (char *) desc;
}
-int usecount()
+int usecount(void)
{
return usecnt;
}
-const char *key()
+const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>asound</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_h323.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_h323.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_h323.c Mon Apr 17 12:57:26 2006
@@ -32,6 +32,10 @@
*
* \ingroup channel_drivers
*/
+
+/*** MODULEINFO
+ <depend>h323</depend>
+ ***/
#include <sys/socket.h>
#include <sys/signal.h>
@@ -2470,6 +2474,3 @@
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>h323</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_misdn.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_misdn.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_misdn.c Mon Apr 17 12:57:26 2006
@@ -3827,113 +3827,6 @@
static int g_config_initialized=0;
-int load_module(void)
-{
- int i;
-
- char ports[256]="";
-
- max_ports=misdn_lib_maxports_get();
-
- if (max_ports<=0) {
- ast_log(LOG_ERROR, "Unable to initialize mISDN\n");
- return -1;
- }
-
-
- misdn_cfg_init(max_ports);
- g_config_initialized=1;
-
- misdn_debug = (int *)malloc(sizeof(int) * (max_ports+1));
- misdn_cfg_get( 0, MISDN_GEN_DEBUG, &misdn_debug[0], sizeof(int));
- for (i = 1; i <= max_ports; i++)
- misdn_debug[i] = misdn_debug[0];
- misdn_debug_only = (int *)calloc(max_ports + 1, sizeof(int));
-
-
- {
- char tempbuf[BUFFERSIZE+1];
- misdn_cfg_get( 0, MISDN_GEN_TRACEFILE, tempbuf, BUFFERSIZE);
- if (strlen(tempbuf))
- tracing = 1;
- }
-
- ast_mutex_init(&cl_te_lock);
- ast_mutex_init(&release_lock_mutex);
-
-
- misdn_cfg_update_ptp();
- misdn_cfg_get_ports_string(ports);
-
- if (strlen(ports))
- chan_misdn_log(0, 0, "Got: %s from get_ports\n",ports);
-
- {
- struct misdn_lib_iface iface = {
- .cb_event = cb_events,
- .cb_log = chan_misdn_log,
- .cb_jb_empty = chan_misdn_jb_empty,
- };
- if (misdn_lib_init(ports, &iface, NULL))
- chan_misdn_log(0, 0, "No te ports initialized\n");
- }
-
-
- {
- if (ast_channel_register(&misdn_tech)) {
- ast_log(LOG_ERROR, "Unable to register channel class %s\n", misdn_type);
- unload_module();
- return -1;
- }
- }
-
- ast_cli_register(&cli_send_display);
- ast_cli_register(&cli_send_cd);
- ast_cli_register(&cli_send_digit);
- ast_cli_register(&cli_toggle_echocancel);
- ast_cli_register(&cli_set_tics);
-
- ast_cli_register(&cli_show_cls);
- ast_cli_register(&cli_show_cl);
- ast_cli_register(&cli_show_config);
- ast_cli_register(&cli_show_port);
- ast_cli_register(&cli_show_stacks);
-
- ast_cli_register(&cli_restart_port);
- ast_cli_register(&cli_port_up);
- ast_cli_register(&cli_port_down);
- ast_cli_register(&cli_set_debug);
- ast_cli_register(&cli_set_crypt_debug);
- ast_cli_register(&cli_reload);
-
-
- ast_register_application("misdn_set_opt", misdn_set_opt_exec, "misdn_set_flags",
- "misdn_set_opt(:<opt><optarg>:<opt><optarg>..):\n"
- "Sets mISDN opts. and optargs\n"
- "\n"
- );
-
-
- ast_register_application("misdn_facility", misdn_facility_exec, "misdn_facility",
- "misdn_facility(<FACILITY_TYPE>|<ARG1>|..)\n"
- "Sends the Facility Message FACILITY_TYPE with \n"
- "the given Arguments to the current ISDN Channel\n"
- "Supported Facilities are:\n"
- "\n"
- "type=calldeflect args=Nr where to deflect\n"
- "\n"
- );
-
-
- misdn_cfg_get( 0, MISDN_GEN_TRACEFILE, global_tracefile, BUFFERSIZE);
-
- chan_misdn_log(0, 0, "-- mISDN Channel Driver Registred -- (BE AWARE THIS DRIVER IS EXPERIMENTAL!)\n");
-
- return 0;
-}
-
-
-
int unload_module(void)
{
/* First, take us out of the channel loop */
@@ -3978,6 +3871,113 @@
return 0;
}
+
+int load_module(void)
+{
+ int i;
+
+ char ports[256]="";
+
+ max_ports=misdn_lib_maxports_get();
+
+ if (max_ports<=0) {
+ ast_log(LOG_ERROR, "Unable to initialize mISDN\n");
+ return -1;
+ }
+
+
+ misdn_cfg_init(max_ports);
+ g_config_initialized=1;
+
+ misdn_debug = (int *)malloc(sizeof(int) * (max_ports+1));
+ misdn_cfg_get( 0, MISDN_GEN_DEBUG, &misdn_debug[0], sizeof(int));
+ for (i = 1; i <= max_ports; i++)
+ misdn_debug[i] = misdn_debug[0];
+ misdn_debug_only = (int *)calloc(max_ports + 1, sizeof(int));
+
+
+ {
+ char tempbuf[BUFFERSIZE+1];
+ misdn_cfg_get( 0, MISDN_GEN_TRACEFILE, tempbuf, BUFFERSIZE);
+ if (strlen(tempbuf))
+ tracing = 1;
+ }
+
+ ast_mutex_init(&cl_te_lock);
+ ast_mutex_init(&release_lock_mutex);
+
+
+ misdn_cfg_update_ptp();
+ misdn_cfg_get_ports_string(ports);
+
+ if (strlen(ports))
+ chan_misdn_log(0, 0, "Got: %s from get_ports\n",ports);
+
+ {
+ struct misdn_lib_iface iface = {
+ .cb_event = cb_events,
+ .cb_log = chan_misdn_log,
+ .cb_jb_empty = chan_misdn_jb_empty,
+ };
+ if (misdn_lib_init(ports, &iface, NULL))
+ chan_misdn_log(0, 0, "No te ports initialized\n");
+ }
+
+
+ {
+ if (ast_channel_register(&misdn_tech)) {
+ ast_log(LOG_ERROR, "Unable to register channel class %s\n", misdn_type);
+ unload_module();
+ return -1;
+ }
+ }
+
+ ast_cli_register(&cli_send_display);
+ ast_cli_register(&cli_send_cd);
+ ast_cli_register(&cli_send_digit);
+ ast_cli_register(&cli_toggle_echocancel);
+ ast_cli_register(&cli_set_tics);
+
+ ast_cli_register(&cli_show_cls);
+ ast_cli_register(&cli_show_cl);
+ ast_cli_register(&cli_show_config);
+ ast_cli_register(&cli_show_port);
+ ast_cli_register(&cli_show_stacks);
+
+ ast_cli_register(&cli_restart_port);
+ ast_cli_register(&cli_port_up);
+ ast_cli_register(&cli_port_down);
+ ast_cli_register(&cli_set_debug);
+ ast_cli_register(&cli_set_crypt_debug);
+ ast_cli_register(&cli_reload);
+
+
+ ast_register_application("misdn_set_opt", misdn_set_opt_exec, "misdn_set_flags",
+ "misdn_set_opt(:<opt><optarg>:<opt><optarg>..):\n"
+ "Sets mISDN opts. and optargs\n"
+ "\n"
+ );
+
+
+ ast_register_application("misdn_facility", misdn_facility_exec, "misdn_facility",
+ "misdn_facility(<FACILITY_TYPE>|<ARG1>|..)\n"
+ "Sends the Facility Message FACILITY_TYPE with \n"
+ "the given Arguments to the current ISDN Channel\n"
+ "Supported Facilities are:\n"
+ "\n"
+ "type=calldeflect args=Nr where to deflect\n"
+ "\n"
+ );
+
+
+ misdn_cfg_get( 0, MISDN_GEN_TRACEFILE, global_tracefile, BUFFERSIZE);
+
+ chan_misdn_log(0, 0, "-- mISDN Channel Driver Registred -- (BE AWARE THIS DRIVER IS EXPERIMENTAL!)\n");
+
+ return 0;
+}
+
+
int reload(void)
{
Modified: team/group/autoconf_and_menuselect/channels/chan_nbs.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_nbs.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_nbs.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_nbs.c Mon Apr 17 12:57:26 2006
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster at digium.com>
*
@@ -24,6 +24,10 @@
*
* \ingroup channel_drivers
*/
+
+/*** MODULEINFO
+ <depend>nbs</depend>
+ ***/
#include <stdio.h>
#include <string.h>
@@ -297,7 +301,7 @@
return __unload_module();
}
-int load_module()
+int load_module(void)
{
/* Make sure we can register our channel type */
if (ast_channel_register(&nbs_tech)) {
@@ -308,21 +312,18 @@
return 0;
}
-int usecount()
+int usecount(void)
{
return usecnt;
}
-const char *description()
+const char *description(void)
{
return (char *) desc;
}
-const char *key()
+const char *key(void)
{
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>nbs</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_oss.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_oss.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_oss.c Mon Apr 17 12:57:26 2006
@@ -31,6 +31,10 @@
*
* \ingroup channel_drivers
*/
+
+/*** MODULEINFO
+ <depend>osssound</depend>
+ ***/
#include <stdio.h>
#include <ctype.h> /* for isalnum */
@@ -1533,6 +1537,4 @@
STD_MOD(MOD_1, NULL, NULL, NULL);
-/*** MODULEINFO
- <depend>osssound</depend>
- ***/
+
Modified: team/group/autoconf_and_menuselect/channels/chan_phone.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_phone.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_phone.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_phone.c Mon Apr 17 12:57:26 2006
@@ -24,6 +24,10 @@
*
* \ingroup channel_drivers
*/
+
+/*** MODULEINFO
+ <depend>ixjuser</depend>
+ ***/
#include <stdio.h>
#include <string.h>
@@ -1427,6 +1431,4 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>ixjuser</depend>
- ***/
+
Modified: team/group/autoconf_and_menuselect/channels/chan_vpb.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_vpb.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_vpb.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_vpb.c Mon Apr 17 12:57:26 2006
@@ -29,6 +29,9 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <depend>vpbapi</depend>
+ ***/
extern "C" {
@@ -2771,6 +2774,72 @@
/* return gain / (float)100; */
return gain;
+}
+
+
+int unload_module()
+{
+ struct vpb_pvt *p;
+ /* First, take us out of the channel loop */
+ if (use_ast_ind == 1){
+ ast_channel_unregister(&vpb_tech_indicate);
+ }
+ else {
+ ast_channel_unregister(&vpb_tech);
+ }
+
+ ast_mutex_lock(&iflock); {
+ /* Hangup all interfaces if they have an owner */
+ p = iflist;
+ while(p) {
+ if (p->owner)
+ ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD);
+ p = p->next;
+ }
+ iflist = NULL;
+ } ast_mutex_unlock(&iflock);
+
+ ast_mutex_lock(&monlock); {
+ if (mthreadactive > -1) {
+ pthread_cancel(monitor_thread);
+ pthread_join(monitor_thread, NULL);
+ }
+ mthreadactive = -2;
+ } ast_mutex_unlock(&monlock);
+
+ ast_mutex_lock(&iflock); {
+ /* Destroy all the interfaces and free their memory */
+
+ while(iflist) {
+ p = iflist;
+ ast_mutex_destroy(&p->lock);
+ pthread_cancel(p->readthread);
+ ast_mutex_destroy(&p->owner_lock);
+ ast_mutex_destroy(&p->record_lock);
+ ast_mutex_destroy(&p->play_lock);
+ ast_mutex_destroy(&p->play_dtmf_lock);
+ p->readthread = 0;
+
+ vpb_close(p->handle);
+
+ iflist = iflist->next;
+
+ free(p);
+ }
+ iflist = NULL;
+ } ast_mutex_unlock(&iflock);
+
+ ast_mutex_lock(&bridge_lock); {
+ memset(bridges, 0, sizeof bridges);
+ } ast_mutex_unlock(&bridge_lock);
+ ast_mutex_destroy(&bridge_lock);
+ for(int i = 0; i < max_bridges; i++ ) {
+ ast_mutex_destroy(&bridges[i].lock);
+ ast_cond_destroy(&bridges[i].cond);
+ }
+ free(bridges);
+
+ return 0;
}
int load_module()
@@ -2969,72 +3038,6 @@
return error;
}
-
-int unload_module()
-{
- struct vpb_pvt *p;
- /* First, take us out of the channel loop */
- if (use_ast_ind == 1){
- ast_channel_unregister(&vpb_tech_indicate);
- }
- else {
- ast_channel_unregister(&vpb_tech);
- }
-
- ast_mutex_lock(&iflock); {
- /* Hangup all interfaces if they have an owner */
- p = iflist;
- while(p) {
- if (p->owner)
- ast_softhangup(p->owner, AST_SOFTHANGUP_APPUNLOAD);
- p = p->next;
- }
- iflist = NULL;
- } ast_mutex_unlock(&iflock);
-
- ast_mutex_lock(&monlock); {
- if (mthreadactive > -1) {
- pthread_cancel(monitor_thread);
- pthread_join(monitor_thread, NULL);
- }
- mthreadactive = -2;
- } ast_mutex_unlock(&monlock);
-
- ast_mutex_lock(&iflock); {
- /* Destroy all the interfaces and free their memory */
-
- while(iflist) {
- p = iflist;
- ast_mutex_destroy(&p->lock);
- pthread_cancel(p->readthread);
- ast_mutex_destroy(&p->owner_lock);
- ast_mutex_destroy(&p->record_lock);
- ast_mutex_destroy(&p->play_lock);
- ast_mutex_destroy(&p->play_dtmf_lock);
- p->readthread = 0;
-
- vpb_close(p->handle);
-
- iflist = iflist->next;
-
- free(p);
- }
- iflist = NULL;
- } ast_mutex_unlock(&iflock);
-
- ast_mutex_lock(&bridge_lock); {
- memset(bridges, 0, sizeof bridges);
- } ast_mutex_unlock(&bridge_lock);
- ast_mutex_destroy(&bridge_lock);
- for(int i = 0; i < max_bridges; i++ ) {
- ast_mutex_destroy(&bridges[i].lock);
- ast_cond_destroy(&bridges[i].cond);
- }
- free(bridges);
-
- return 0;
-}
-
int usecount()
{
return usecnt;
@@ -3056,6 +3059,4 @@
#endif
/**/
-/*** MODULEINFO
- <depend>vpbapi</depend>
- ***/
+
Modified: team/group/autoconf_and_menuselect/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/channels/chan_zap.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/channels/chan_zap.c (original)
+++ team/group/autoconf_and_menuselect/channels/chan_zap.c Mon Apr 17 12:57:26 2006
@@ -34,8 +34,12 @@
*
* \ingroup channel_drivers
*
- * \todo Decprecate the "musiconhold" configuration option in v1.5dev
+ * \todo Decprecate the "musiconhold" configuration option post 1.4
*/
+
+/*** MODULEINFO
+ <depend>zaptel</depend>
+ ***/
#include <stdio.h>
#include <string.h>
@@ -11397,6 +11401,4 @@
STD_MOD(MOD_1, reload, NULL, NULL);
-/*** MODULEINFO
- <depend>zaptel</depend>
- ***/
+
Modified: team/group/autoconf_and_menuselect/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/codecs/codec_speex.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/codecs/codec_speex.c (original)
+++ team/group/autoconf_and_menuselect/codecs/codec_speex.c Mon Apr 17 12:57:26 2006
@@ -26,6 +26,10 @@
* hacked to be configurable by anthm and bkw 9/28/2004
* \ingroup codecs
*/
+
+/*** MODULEINFO
+ <depend>libspeex</depend>
+ ***/
#include <fcntl.h>
#include <stdlib.h>
@@ -520,6 +524,3 @@
STD_MOD(MOD_1, reload, NULL, NULL);
-/*** MODULEINFO
- <depend>libspeex</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/formats/format_ogg_vorbis.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/formats/format_ogg_vorbis.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/formats/format_ogg_vorbis.c (original)
+++ team/group/autoconf_and_menuselect/formats/format_ogg_vorbis.c Mon Apr 17 12:57:26 2006
@@ -20,6 +20,11 @@
* \arg File name extension: ogg
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <depend>libvorbis</depend>
+ <depend>ogg</depend>
+ ***/
#include <sys/types.h>
#include <netinet/in.h>
@@ -562,7 +567,3 @@
STD_MOD1;
-/*** MODULEINFO
- <depend>libvorbis</depend>
- <depend>ogg</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/funcs/func_curl.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/funcs/func_curl.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/funcs/func_curl.c (original)
+++ team/group/autoconf_and_menuselect/funcs/func_curl.c Mon Apr 17 12:57:26 2006
@@ -28,6 +28,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <depend>curl</depend>
+ ***/
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -187,6 +191,3 @@
STD_MOD(MOD_1 | NO_USECOUNT, NULL, NULL, NULL);
-/*** MODULEINFO
- <depend>curl</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/funcs/func_odbc.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/funcs/func_odbc.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/funcs/func_odbc.c (original)
+++ team/group/autoconf_and_menuselect/funcs/func_odbc.c Mon Apr 17 12:57:26 2006
@@ -23,6 +23,10 @@
*
* \author Tilghman Lesher <func_odbc__200508 at the-tilghman.com>
*/
+
+/*** MODULEINFO
+ <depend>unixodbc</depend>
+ ***/
#include <sys/types.h>
#include <stdio.h>
@@ -670,6 +674,3 @@
STD_MOD(MOD_1, reload, NULL, NULL);
-/*** MODULEINFO
- <depend>unixodbc</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/include/asterisk/translate.h?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/include/asterisk/translate.h (original)
+++ team/group/autoconf_and_menuselect/include/asterisk/translate.h Mon Apr 17 12:57:26 2006
@@ -1,7 +1,7 @@
/*
* Asterisk -- An open source telephony toolkit.
*
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
*
* Mark Spencer <markster at digium.com>
*
@@ -145,7 +145,7 @@
* \brief Register a translator
* \param t populated ast_translator structure
* This registers a codec translator with asterisk
- * Returns 0 on success, -1 on failure
+ * \return 0 on success, -1 on failure
*/
int ast_register_translator(struct ast_translator *t, void *module);
@@ -153,7 +153,7 @@
* \brief Unregister a translator
* \param t translator to unregister
* Unregisters the given tranlator
- * Returns 0 on success, -1 on failure
+ * \return 0 on success, -1 on failure
*/
int ast_unregister_translator(struct ast_translator *t);
@@ -171,7 +171,7 @@
* \param dest destination format
* \param source source format
* Build a path (possibly NULL) from source to dest
- * Returns ast_trans_pvt on success, NULL on failure
+ * \return ast_trans_pvt on success, NULL on failure
* */
struct ast_trans_pvt *ast_translator_build_path(int dest, int source);
@@ -189,9 +189,17 @@
* \param consume Whether or not to free the original frame
* Apply an input frame into the translator and receive zero or one output frames. Consume
* determines whether the original frame should be freed
- * Returns an ast_frame of the new translation format on success, NULL on failure
+ * \return an ast_frame of the new translation format on success, NULL on failure
*/
struct ast_frame *ast_translate(struct ast_trans_pvt *tr, struct ast_frame *f, int consume);
+
+/*!
+ * \brief Returns the number of steps required to convert from 'src' to 'dest'.
+ * \param dest Destination format
+ * \param src Source format
+ * \return the number of translation steps required, or -1 if no path is available
+ */
+unsigned int ast_translate_path_steps(unsigned int dest, unsigned int src);
#if defined(__cplusplus) || defined(c_plusplus)
}
Modified: team/group/autoconf_and_menuselect/pbx/pbx_dundi.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/pbx/pbx_dundi.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/pbx/pbx_dundi.c (original)
+++ team/group/autoconf_and_menuselect/pbx/pbx_dundi.c Mon Apr 17 12:57:26 2006
@@ -21,6 +21,10 @@
* \brief Distributed Universal Number Discovery (DUNDi)
*
*/
+
+/*** MODULEINFO
+ <depend>zlib</depend>
+ ***/
#include <stdlib.h>
#include <stdio.h>
@@ -4721,6 +4725,3 @@
STD_MOD(MOD_1 | NO_USECOUNT | NO_UNLOAD, reload, NULL, NULL);
-/*** MODULEINFO
- <depend>zlib</depend>
- ***/
Modified: team/group/autoconf_and_menuselect/pbx/pbx_gtkconsole.c
URL: http://svn.digium.com/view/asterisk/team/group/autoconf_and_menuselect/pbx/pbx_gtkconsole.c?rev=21003&r1=21002&r2=21003&view=diff
==============================================================================
--- team/group/autoconf_and_menuselect/pbx/pbx_gtkconsole.c (original)
+++ team/group/autoconf_and_menuselect/pbx/pbx_gtkconsole.c Mon Apr 17 12:57:26 2006
@@ -22,13 +22,10 @@
*
*/
-/*
- * I know this might seem somewhat pointless in its current phase, but one
- * of the most important parts of this module is demonstrate that modules
- * can require other external libraries and still be loaded (in this
- * case, a host of libraries involving gtk), so long as they are properly
- * linked (see the Makefile)
- */
+/*** MODULEINFO
+ <depend>gtk</depend>
+ <defaultbuild>no</defaultbuild>
+ ***/
#include <sys/types.h>
#include <stdlib.h>
@@ -517,7 +514,3 @@
return ASTERISK_GPL_KEY;
}
-/*** MODULEINFO
- <depend>gtk</depend>
- <defaultbuild>no</defaultbuild>
- ***/
[... 311 lines stripped ...]
More information about the asterisk-commits
mailing list