-- fix bug with supervised transfers
-- chan_h323
-- fix compilation problem
+ -- cdr_pgsql
+ -- fix memory leak when reading config
-- Numerous other minor bug fixes
Asterisk 1.0.2
-- Major bugfix release
return 0;
}
-static int my_load_module(void)
+static int process_my_load_module(struct ast_config *cfg)
{
int res;
- struct ast_config *cfg;
struct ast_variable *var;
char *pgerror;
char *tmp;
- cfg = ast_load(config);
- if (!cfg) {
- ast_log(LOG_WARNING, "Unable to load config for PostgreSQL CDR's: %s\n", config);
- return 0;
- }
-
var = ast_variable_browse(cfg, "global");
if (!var) {
/* nothing configured */
pgdbport = "5432";
}
- ast_destroy(cfg);
-
ast_log(LOG_DEBUG,"cdr_pgsql: got hostname of %s\n",pghostname);
ast_log(LOG_DEBUG,"cdr_pgsql: got port of %s\n",pgdbport);
if (pgdbsock)
return res;
}
+static int my_load_module(void)
+{
+ struct ast_config *cfg;
+ int res;
+ cfg = ast_load(config);
+ if (!cfg) {
+ ast_log(LOG_WARNING, "Unable to load config for PostgreSQL CDR's: %s\n", config);
+ return 0;
+ }
+ res = process_my_load_module(cfg);
+ ast_destroy(cfg);
+ return res;
+}
+
int load_module(void)
{
return my_load_module();