codecs.conf really shouldn't be mandatory.. it never had been before, so let's go...
authorJason Parker <jparker@digium.com>
Fri, 21 Dec 2007 20:12:50 +0000 (20:12 +0000)
committerJason Parker <jparker@digium.com>
Fri, 21 Dec 2007 20:12:50 +0000 (20:12 +0000)
A big "thank you" to pnlarsson on IRC for allowing me access to his system to debug this.

Closes issue #11584.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94541 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/codec_adpcm.c
codecs/codec_alaw.c
codecs/codec_g722.c
codecs/codec_g726.c
codecs/codec_gsm.c
codecs/codec_lpc10.c
codecs/codec_speex.c
codecs/codec_ulaw.c
codecs/codec_zap.c

index 83e15c1..63a1ab1 100644 (file)
@@ -346,7 +346,7 @@ static int parse_config(int reload)
        struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
        struct ast_variable *var;
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var ; var = var->next) {
index f1a44d0..ba5808f 100644 (file)
@@ -129,7 +129,7 @@ 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);
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index 8e77e4c..a81b9b6 100644 (file)
@@ -231,7 +231,7 @@ static int parse_config(int reload)
        struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
 
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index 5a50d3b..c8a671e 100644 (file)
@@ -891,7 +891,7 @@ static int parse_config(int reload)
        struct ast_config *cfg = ast_config_load("codecs.conf", config_flags);
 
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index 27175cf..bb4af8c 100644 (file)
@@ -229,8 +229,8 @@ 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)
-               return -1;
+       if (cfg == NULL)
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED) 
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index dfede08..1e4ec37 100644 (file)
@@ -256,7 +256,7 @@ 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);
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index 46d9868..21c98a5 100644 (file)
@@ -373,8 +373,8 @@ static int parse_config(int reload)
        int res;
        float res_f;
 
-       if (cfg == NULL || cfg == CONFIG_STATUS_FILEUNCHANGED)
-               return -1;
+       if (cfg == NULL)
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
 
index b91213e..ebd1928 100644 (file)
@@ -142,7 +142,7 @@ 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);
        if (cfg == NULL)
-               return -1;
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;
        for (var = ast_variable_browse(cfg, "plc"); var; var = var->next) {
index 222b95a..b5b99d2 100644 (file)
@@ -377,8 +377,8 @@ 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);
 
-       if (!cfg)
-               return -1;
+       if (cfg == NULL)
+               return 0;
        if (cfg == CONFIG_STATUS_FILEUNCHANGED)
                return 0;