[asterisk-commits] qwell: trunk r87889 - in /trunk: codecs/ formats/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Oct 31 14:24:30 CDT 2007
Author: qwell
Date: Wed Oct 31 14:24:29 2007
New Revision: 87889
URL: http://svn.digium.com/view/asterisk?view=rev&rev=87889
Log:
More changes to change return values from load_module functions.
(issue #11096)
Patches:
codec_adpcm.c.patch uploaded by moy (license 222)
codec_alaw.c.patch uploaded by moy (license 222)
codec_a_mu.c.patch uploaded by moy (license 222)
codec_g722.c.patch uploaded by moy (license 222)
codec_g726.c.diff uploaded by moy (license 222)
codec_gsm.c.patch uploaded by moy (license 222)
codec_ilbc.c.patch uploaded by moy (license 222)
codec_lpc10.c.patch uploaded by moy (license 222)
codec_speex.c.patch uploaded by moy (license 222)
codec_ulaw.c.patch uploaded by moy (license 222)
codec_zap.c.patch uploaded by moy (license 222)
format_g723.c.patch uploaded by moy (license 222)
format_g726.c.patch uploaded by moy (license 222)
format_g729.c.patch uploaded by moy (license 222)
format_gsm.c.patch uploaded by moy (license 222)
format_h263.c.patch uploaded by moy (license 222)
format_h264.c.patch uploaded by moy (license 222)
format_ilbc.c.patch uploaded by moy (license 222)
format_jpeg.c.patch uploaded by moy (license 222)
format_ogg_vorbis.c.patch uploaded by moy (license 222)
format_pcm.c.patch uploaded by moy (license 222)
format_sln.c.patch uploaded by moy (license 222)
format_vox.c.patch uploaded by moy (license 222)
format_wav.c.patch uploaded by moy (license 222)
format_wav_gsm.c.patch uploaded by moy (license 222)
res_adsi.c.patch uploaded by eliel (license 64)
res_ael_share.c.patch uploaded by eliel (license 64)
res_clioriginate.c.patch uploaded by eliel (license 64)
res_convert.c.patch uploaded by eliel (license 64)
res_indications.c.patch uploaded by eliel (license 64)
res_musiconhold.c.patch uploaded by eliel (license 64)
res_smdi.c.patch uploaded by eliel (license 64)
res_speech.c.patch uploaded by eliel (license 64)
Modified:
trunk/codecs/codec_a_mu.c
trunk/codecs/codec_adpcm.c
trunk/codecs/codec_alaw.c
trunk/codecs/codec_g722.c
trunk/codecs/codec_g726.c
trunk/codecs/codec_gsm.c
trunk/codecs/codec_ilbc.c
trunk/codecs/codec_lpc10.c
trunk/codecs/codec_speex.c
trunk/codecs/codec_ulaw.c
trunk/codecs/codec_zap.c
trunk/formats/format_g723.c
trunk/formats/format_g726.c
trunk/formats/format_g729.c
trunk/formats/format_gsm.c
trunk/formats/format_h263.c
trunk/formats/format_h264.c
trunk/formats/format_ilbc.c
trunk/formats/format_jpeg.c
trunk/formats/format_ogg_vorbis.c
trunk/formats/format_pcm.c
trunk/formats/format_sln.c
trunk/formats/format_vox.c
trunk/formats/format_wav.c
trunk/formats/format_wav_gsm.c
trunk/res/res_adsi.c
trunk/res/res_ael_share.c
trunk/res/res_clioriginate.c
trunk/res/res_convert.c
trunk/res/res_indications.c
trunk/res/res_musiconhold.c
trunk/res/res_smdi.c
trunk/res/res_speech.c
Modified: trunk/codecs/codec_a_mu.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_a_mu.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_a_mu.c (original)
+++ trunk/codecs/codec_a_mu.c Wed Oct 31 14:24:29 2007
@@ -161,8 +161,9 @@
res = ast_register_translator(&ulawtoalaw);
else
ast_unregister_translator(&alawtoulaw);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "A-law and Mulaw direct Coder/Decoder");
Modified: trunk/codecs/codec_adpcm.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_adpcm.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_adpcm.c (original)
+++ trunk/codecs/codec_adpcm.c Wed Oct 31 14:24:29 2007
@@ -350,13 +350,15 @@
.buf_size = BUFFER_SAMPLES/ 2, /* 2 samples per byte */
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
struct ast_variable *var;
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var ; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
adpcmtolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -364,13 +366,15 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
/*! \brief standard module glue */
static int reload(void)
{
- parse_config(1);
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -387,14 +391,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res = ast_register_translator(&adpcmtolin);
if (!res)
res = ast_register_translator(&lintoadpcm);
else
ast_unregister_translator(&adpcmtolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Adaptive Differential PCM Coder/Decoder",
Modified: trunk/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_alaw.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_alaw.c (original)
+++ trunk/codecs/codec_alaw.c Wed Oct 31 14:24:29 2007
@@ -134,13 +134,15 @@
.buf_size = BUFFER_SAMPLES,
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
alawtolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -148,14 +150,16 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
/*! \brief standard module stuff */
static int reload(void)
{
- parse_config(1);
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -172,14 +176,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res = ast_register_translator(&alawtolin);
if (!res)
res = ast_register_translator(&lintoalaw);
else
ast_unregister_translator(&alawtolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "A-law Coder/Decoder",
Modified: trunk/codecs/codec_g722.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_g722.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_g722.c (original)
+++ trunk/codecs/codec_g722.c Wed Oct 31 14:24:29 2007
@@ -164,14 +164,16 @@
.buf_size = BUFFER_SAMPLES,
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
g722tolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -180,13 +182,14 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
static int reload(void)
{
- parse_config(1);
-
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -204,15 +207,18 @@
int res = 0;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res |= ast_register_translator(&g722tolin);
res |= ast_register_translator(&lintog722);
- if (res)
+ if (res) {
unload_module();
-
- return res;
+ return AST_MODULE_LOAD_FAILURE;
+ }
+
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ITU G.722-64kbps G722 Transcoder",
Modified: trunk/codecs/codec_g726.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_g726.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_g726.c (original)
+++ trunk/codecs/codec_g726.c Wed Oct 31 14:24:29 2007
@@ -894,14 +894,16 @@
.buf_size = BUFFER_SAMPLES,
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
g726tolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -910,13 +912,14 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
static int reload(void)
{
- parse_config(1);
-
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -940,7 +943,8 @@
int res = 0;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res |= ast_register_translator(&g726tolin);
res |= ast_register_translator(&lintog726);
@@ -951,10 +955,12 @@
res |= ast_register_translator(&g726aal2tog726);
res |= ast_register_translator(&g726tog726aal2);
- if (res)
+ if (res) {
unload_module();
-
- return res;
+ return AST_MODULE_LOAD_FAILURE;
+ }
+
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "ITU G.726-32kbps G726 Transcoder",
Modified: trunk/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_gsm.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_gsm.c (original)
+++ trunk/codecs/codec_gsm.c Wed Oct 31 14:24:29 2007
@@ -235,13 +235,15 @@
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (!cfg || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (!cfg)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
gsmtolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -249,13 +251,16 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
/*! \brief standard module glue */
static int reload(void)
{
- parse_config(1);
- return 0;
+ if (parse_config(1)) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -273,14 +278,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res = ast_register_translator(&gsmtolin);
if (!res)
res=ast_register_translator(&lintogsm);
else
ast_unregister_translator(&gsmtolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "GSM Coder/Decoder",
Modified: trunk/codecs/codec_ilbc.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_ilbc.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_ilbc.c (original)
+++ trunk/codecs/codec_ilbc.c Wed Oct 31 14:24:29 2007
@@ -237,8 +237,9 @@
res=ast_register_translator(&lintoilbc);
else
ast_unregister_translator(&ilbctolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "iLBC Coder/Decoder");
Modified: trunk/codecs/codec_lpc10.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_lpc10.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_lpc10.c (original)
+++ trunk/codecs/codec_lpc10.c Wed Oct 31 14:24:29 2007
@@ -261,13 +261,15 @@
.buf_size = LPC10_BYTES_IN_COMPRESSED_FRAME * (1 + BUFFER_SAMPLES / LPC10_SAMPLES_PER_FRAME),
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
lpc10tolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -276,13 +278,14 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
static int reload(void)
{
- parse_config(1);
-
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
@@ -300,14 +303,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res = ast_register_translator(&lpc10tolin);
if (!res)
res = ast_register_translator(&lintolpc10);
else
ast_unregister_translator(&lpc10tolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "LPC10 2.4kbps Coder/Decoder",
Modified: trunk/codecs/codec_speex.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_speex.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_speex.c (original)
+++ trunk/codecs/codec_speex.c Wed Oct 31 14:24:29 2007
@@ -375,7 +375,7 @@
.buf_size = BUFFER_SAMPLES * 2, /* XXX maybe a lot less ? */
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
@@ -384,7 +384,9 @@
float res_f;
if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "speex"); var; var = var->next) {
if (!strcasecmp(var->name, "quality")) {
@@ -467,13 +469,14 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
static int reload(void)
{
- parse_config(1);
-
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -490,14 +493,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res=ast_register_translator(&speextolin);
if (!res)
res=ast_register_translator(&lintospeex);
else
ast_unregister_translator(&speextolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Speex Coder/Decoder",
Modified: trunk/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_ulaw.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_ulaw.c (original)
+++ trunk/codecs/codec_ulaw.c Wed Oct 31 14:24:29 2007
@@ -147,13 +147,15 @@
.buffer_samples = BUFFER_SAMPLES,
};
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (cfg == NULL)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
ulawtolin.useplc = ast_true(var->value) ? 1 : 0;
@@ -161,13 +163,14 @@
}
}
ast_config_destroy(cfg);
+ return 0;
}
static int reload(void)
{
- parse_config(1);
-
- return 0;
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -184,14 +187,16 @@
{
int res;
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
res = ast_register_translator(&ulawtolin);
if (!res)
res = ast_register_translator(&lintoulaw);
else
ast_unregister_translator(&ulawtolin);
-
- return res;
+ if (res)
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "mu-Law Coder/Decoder",
Modified: trunk/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_zap.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/codecs/codec_zap.c (original)
+++ trunk/codecs/codec_zap.c Wed Oct 31 14:24:29 2007
@@ -380,14 +380,16 @@
AST_LIST_UNLOCK(&translators);
}
-static void parse_config(int reload)
+static int parse_config(int reload)
{
struct ast_variable *var;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
- if (!cfg || cfg == CONFIG_STATUS_FILEUNCHANGED)
- return;
+ if (!cfg)
+ return -1;
+ if (cfg == CONFIG_STATUS_FILEUNCHANGED)
+ return 0;
for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
if (!strcasecmp(var->name, "genericplc")) {
@@ -396,8 +398,8 @@
global_useplc ? "" : "not ");
}
}
-
ast_config_destroy(cfg);
+ return 0;
}
static void build_translators(struct format_map *map, unsigned int dstfmts, unsigned int srcfmts)
@@ -456,14 +458,15 @@
{
struct translator *cur;
- parse_config(1);
+ if (parse_config(1))
+ return AST_MODULE_LOAD_DECLINE;
AST_LIST_LOCK(&translators);
AST_LIST_TRAVERSE(&translators, cur, entry)
cur->t.useplc = global_useplc;
AST_LIST_UNLOCK(&translators);
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
@@ -476,11 +479,11 @@
static int load_module(void)
{
- parse_config(0);
+ if (parse_config(0))
+ return AST_MODULE_LOAD_DECLINE;
find_transcoders();
ast_cli_register_multiple(cli, sizeof(cli) / sizeof(cli[0]));
-
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Generic Zaptel Transcoder Codec Translator",
Modified: trunk/formats/format_g723.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_g723.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_g723.c (original)
+++ trunk/formats/format_g723.c Wed Oct 31 14:24:29 2007
@@ -152,7 +152,9 @@
static int load_module(void)
{
- return ast_format_register(&g723_1_f);
+ if (ast_format_register(&g723_1_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_g726.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_g726.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_g726.c (original)
+++ trunk/formats/format_g726.c Wed Oct 31 14:24:29 2007
@@ -255,10 +255,10 @@
for (i = 0; f[i].format ; i++) {
if (ast_format_register(&f[i])) { /* errors are fatal */
ast_log(LOG_WARNING, "Failed to register format %s.\n", f[i].name);
- return -1;
+ return AST_MODULE_LOAD_FAILURE;
}
}
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_g729.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_g729.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_g729.c (original)
+++ trunk/formats/format_g729.c Wed Oct 31 14:24:29 2007
@@ -148,7 +148,9 @@
static int load_module(void)
{
- return ast_format_register(&g729_f);
+ if (ast_format_register(&g729_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_gsm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_gsm.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_gsm.c (original)
+++ trunk/formats/format_gsm.c Wed Oct 31 14:24:29 2007
@@ -170,7 +170,9 @@
static int load_module(void)
{
- return ast_format_register(&gsm_f);
+ if (ast_format_register(&gsm_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_h263.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_h263.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_h263.c (original)
+++ trunk/formats/format_h263.c Wed Oct 31 14:24:29 2007
@@ -186,7 +186,9 @@
static int load_module(void)
{
- return ast_format_register(&h263_f);
+ if (ast_format_register(&h263_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_h264.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_h264.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_h264.c (original)
+++ trunk/formats/format_h264.c Wed Oct 31 14:24:29 2007
@@ -175,7 +175,9 @@
static int load_module(void)
{
- return ast_format_register(&h264_f);
+ if (ast_format_register(&h264_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_ilbc.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_ilbc.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_ilbc.c (original)
+++ trunk/formats/format_ilbc.c Wed Oct 31 14:24:29 2007
@@ -146,7 +146,9 @@
static int load_module(void)
{
- return ast_format_register(&ilbc_f);
+ if (ast_format_register(&ilbc_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_jpeg.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_jpeg.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_jpeg.c (original)
+++ trunk/formats/format_jpeg.c Wed Oct 31 14:24:29 2007
@@ -114,7 +114,9 @@
static int load_module(void)
{
- return ast_image_register(&jpeg_format);
+ if (ast_image_register(&jpeg_format))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_ogg_vorbis.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_ogg_vorbis.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_ogg_vorbis.c (original)
+++ trunk/formats/format_ogg_vorbis.c Wed Oct 31 14:24:29 2007
@@ -553,7 +553,9 @@
static int load_module(void)
{
- return ast_format_register(&vorbis_f);
+ if (ast_format_register(&vorbis_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_pcm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_pcm.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_pcm.c (original)
+++ trunk/formats/format_pcm.c Wed Oct 31 14:24:29 2007
@@ -479,10 +479,12 @@
for (index = 0; index < (sizeof(alaw_silence) / sizeof(alaw_silence[0])); index++)
alaw_silence[index] = AST_LIN2A(0);
- return ast_format_register(&pcm_f)
+ if ( ast_format_register(&pcm_f)
|| ast_format_register(&alaw_f)
|| ast_format_register(&au_f)
- || ast_format_register(&g722_f);
+ || ast_format_register(&g722_f) )
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_sln.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_sln.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_sln.c (original)
+++ trunk/formats/format_sln.c Wed Oct 31 14:24:29 2007
@@ -130,7 +130,9 @@
static int load_module(void)
{
- return ast_format_register(&slin_f);
+ if (ast_format_register(&slin_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_vox.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_vox.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_vox.c (original)
+++ trunk/formats/format_vox.c Wed Oct 31 14:24:29 2007
@@ -135,7 +135,9 @@
static int load_module(void)
{
- return ast_format_register(&vox_f);
+ if (ast_format_register(&vox_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_wav.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_wav.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_wav.c (original)
+++ trunk/formats/format_wav.c Wed Oct 31 14:24:29 2007
@@ -491,7 +491,9 @@
static int load_module(void)
{
- return ast_format_register(&wav_f);
+ if (ast_format_register(&wav_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/formats/format_wav_gsm.c
URL: http://svn.digium.com/view/asterisk/trunk/formats/format_wav_gsm.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/formats/format_wav_gsm.c (original)
+++ trunk/formats/format_wav_gsm.c Wed Oct 31 14:24:29 2007
@@ -559,7 +559,9 @@
static int load_module(void)
{
- return ast_format_register(&wav49_f);
+ if (ast_format_register(&wav49_f))
+ return AST_MODULE_LOAD_FAILURE;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/res/res_adsi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_adsi.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_adsi.c (original)
+++ trunk/res/res_adsi.c Wed Oct 31 14:24:29 2007
@@ -1106,7 +1106,7 @@
ast_adsi_input_control = _ast_adsi_input_control;
ast_adsi_input_format = _ast_adsi_input_format;
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/res/res_ael_share.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_ael_share.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_ael_share.c (original)
+++ trunk/res/res_ael_share.c Wed Oct 31 14:24:29 2007
@@ -52,7 +52,7 @@
static int load_module(void)
{
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "share-able code for AEL",
Modified: trunk/res/res_clioriginate.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_clioriginate.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_clioriginate.c (original)
+++ trunk/res/res_clioriginate.c Wed Oct 31 14:24:29 2007
@@ -190,7 +190,7 @@
static int load_module(void)
{
ast_cli_register_multiple(cli_cliorig, sizeof(cli_cliorig) / sizeof(struct ast_cli_entry));
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Call origination from the CLI");
Modified: trunk/res/res_convert.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_convert.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_convert.c (original)
+++ trunk/res/res_convert.c Wed Oct 31 14:24:29 2007
@@ -159,7 +159,7 @@
static int load_module(void)
{
ast_cli_register_multiple(cli_convert, sizeof(cli_convert) / sizeof(struct ast_cli_entry));
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "File format conversion CLI command");
Modified: trunk/res/res_indications.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_indications.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_indications.c (original)
+++ trunk/res/res_indications.c Wed Oct 31 14:24:29 2007
@@ -410,7 +410,7 @@
ast_register_application("PlayTones", handle_playtones, "Play a tone list", playtones_desc);
ast_register_application("StopPlayTones", handle_stopplaytones, "Stop playing a tone list","Stop playing a tone list");
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
/*! \brief Reload indications module */
Modified: trunk/res/res_musiconhold.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_musiconhold.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_musiconhold.c (original)
+++ trunk/res/res_musiconhold.c Wed Oct 31 14:24:29 2007
@@ -1322,7 +1322,7 @@
ast_install_music_functions(local_ast_moh_start, local_ast_moh_stop, local_ast_moh_cleanup);
}
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int reload(void)
Modified: trunk/res/res_smdi.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_smdi.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_smdi.c (original)
+++ trunk/res/res_smdi.c Wed Oct 31 14:24:29 2007
@@ -715,7 +715,7 @@
ast_log(LOG_WARNING, "No SMDI interfaces are available to listen on, not starting SMDI listener.\n");
return AST_MODULE_LOAD_DECLINE;
} else
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
Modified: trunk/res/res_speech.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_speech.c?view=diff&rev=87889&r1=87888&r2=87889
==============================================================================
--- trunk/res/res_speech.c (original)
+++ trunk/res/res_speech.c Wed Oct 31 14:24:29 2007
@@ -341,7 +341,7 @@
static int load_module(void)
{
- return 0;
+ return AST_MODULE_LOAD_SUCCESS;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS, "Generic Speech Recognition API",
More information about the asterisk-commits
mailing list