diff options
author | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-31 19:24:29 +0000 |
---|---|---|
committer | qwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-10-31 19:24:29 +0000 |
commit | 9e15a0e72bccc9f21dd009b1c8a6375f07420473 (patch) | |
tree | daa3437ec6e548a5cc02c05654c1b9993bfd0eef /formats | |
parent | d15b80b30e54c603f892bbeaa090ed27708674db (diff) |
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)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87889 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'formats')
-rw-r--r-- | formats/format_g723.c | 4 | ||||
-rw-r--r-- | formats/format_g726.c | 4 | ||||
-rw-r--r-- | formats/format_g729.c | 4 | ||||
-rw-r--r-- | formats/format_gsm.c | 4 | ||||
-rw-r--r-- | formats/format_h263.c | 4 | ||||
-rw-r--r-- | formats/format_h264.c | 4 | ||||
-rw-r--r-- | formats/format_ilbc.c | 4 | ||||
-rw-r--r-- | formats/format_jpeg.c | 4 | ||||
-rw-r--r-- | formats/format_ogg_vorbis.c | 4 | ||||
-rw-r--r-- | formats/format_pcm.c | 6 | ||||
-rw-r--r-- | formats/format_sln.c | 4 | ||||
-rw-r--r-- | formats/format_vox.c | 4 | ||||
-rw-r--r-- | formats/format_wav.c | 4 | ||||
-rw-r--r-- | formats/format_wav_gsm.c | 4 |
14 files changed, 42 insertions, 16 deletions
diff --git a/formats/format_g723.c b/formats/format_g723.c index dd5a1e6af..64883fe88 100644 --- a/formats/format_g723.c +++ b/formats/format_g723.c @@ -152,7 +152,9 @@ static const struct ast_format g723_1_f = { 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) diff --git a/formats/format_g726.c b/formats/format_g726.c index 09504bf6c..ffaaa367c 100644 --- a/formats/format_g726.c +++ b/formats/format_g726.c @@ -255,10 +255,10 @@ static int load_module(void) 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) diff --git a/formats/format_g729.c b/formats/format_g729.c index 3f46bcbff..5ad16d97e 100644 --- a/formats/format_g729.c +++ b/formats/format_g729.c @@ -148,7 +148,9 @@ static const struct ast_format g729_f = { 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) diff --git a/formats/format_gsm.c b/formats/format_gsm.c index f997af119..4bb49eb45 100644 --- a/formats/format_gsm.c +++ b/formats/format_gsm.c @@ -170,7 +170,9 @@ static const struct ast_format gsm_f = { 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) diff --git a/formats/format_h263.c b/formats/format_h263.c index a2537f037..90fedfb55 100644 --- a/formats/format_h263.c +++ b/formats/format_h263.c @@ -186,7 +186,9 @@ static const struct ast_format h263_f = { 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) diff --git a/formats/format_h264.c b/formats/format_h264.c index 4b471f84e..e2bc36c2e 100644 --- a/formats/format_h264.c +++ b/formats/format_h264.c @@ -175,7 +175,9 @@ static const struct ast_format h264_f = { 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) diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c index 78d117910..f7d37d557 100644 --- a/formats/format_ilbc.c +++ b/formats/format_ilbc.c @@ -146,7 +146,9 @@ static const struct ast_format ilbc_f = { 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) diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c index edef171d2..bb0661074 100644 --- a/formats/format_jpeg.c +++ b/formats/format_jpeg.c @@ -114,7 +114,9 @@ static struct ast_imager jpeg_format = { 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) diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c index 3868c5a76..14127588b 100644 --- a/formats/format_ogg_vorbis.c +++ b/formats/format_ogg_vorbis.c @@ -553,7 +553,9 @@ static const struct ast_format vorbis_f = { 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) diff --git a/formats/format_pcm.c b/formats/format_pcm.c index 6736ea996..5c31408e5 100644 --- a/formats/format_pcm.c +++ b/formats/format_pcm.c @@ -479,10 +479,12 @@ static int load_module(void) 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) diff --git a/formats/format_sln.c b/formats/format_sln.c index c8c5cc04b..8bb369c98 100644 --- a/formats/format_sln.c +++ b/formats/format_sln.c @@ -130,7 +130,9 @@ static const struct ast_format slin_f = { 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) diff --git a/formats/format_vox.c b/formats/format_vox.c index c729f3b5c..79cf093dc 100644 --- a/formats/format_vox.c +++ b/formats/format_vox.c @@ -135,7 +135,9 @@ static const struct ast_format vox_f = { 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) diff --git a/formats/format_wav.c b/formats/format_wav.c index d37b55cd4..c09c7ed1f 100644 --- a/formats/format_wav.c +++ b/formats/format_wav.c @@ -491,7 +491,9 @@ static const struct ast_format wav_f = { 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) diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c index fea08952e..6916ceaf4 100644 --- a/formats/format_wav_gsm.c +++ b/formats/format_wav_gsm.c @@ -559,7 +559,9 @@ static const struct ast_format wav49_f = { 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) |