--- cdr/cdr_sqlite3_custom.c (Asterisk 16.9.0) +++ cdr/cdr_sqlite3_custom.c (working copy) @@ -171,7 +171,7 @@ if (!ast_variable_browse(cfg, "master")) { /* Nothing configured */ ast_config_destroy(cfg); - return -1; + return 1; } /* Mapping must have a table name */ @@ -302,9 +302,12 @@ char filename[PATH_MAX]; int res; char *sql; - - if (load_config(0)) { + + res = load_config(0); + if (res < 0) { return AST_MODULE_LOAD_DECLINE; + } else if (res > 0) { + return AST_MODULE_LOAD_SUCCESS; } /* is the database there? */ --- cel/cel_sqlite3_custom.c (Asterisk 16.9.0) +++ cel/cel_sqlite3_custom.c (working copy) @@ -177,7 +177,7 @@ if (!(mappingvar = ast_variable_browse(cfg, "master"))) { /* Nothing configured */ ast_config_destroy(cfg); - return -1; + return 1; } /* Mapping must have a table name */ @@ -304,8 +304,11 @@ int res; char *sql; - if (load_config(0)) { + res = load_config(0); + if (res < 0) { return AST_MODULE_LOAD_DECLINE; + } else if (res > 0) { + return AST_MODULE_LOAD_SUCCESS; } /* is the database there? */