diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-02 02:33:04 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-02 02:33:04 +0000 |
commit | 748f3cf4565a694398bca176faa409e0320c8a68 (patch) | |
tree | ee050a5776fcef01d006a9c4e447f3240686014f /main | |
parent | 927870cd7d4ae9cda8f269d1ca36373704999a8c (diff) |
Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115157 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/asterisk.c | 9 | ||||
-rw-r--r-- | main/config.c | 6 | ||||
-rw-r--r-- | main/sched.c | 10 |
3 files changed, 17 insertions, 8 deletions
diff --git a/main/asterisk.c b/main/asterisk.c index 99df3ef45..b6ba7d30f 100644 --- a/main/asterisk.c +++ b/main/asterisk.c @@ -1117,7 +1117,10 @@ static int ast_makesocket(void) ast_socket = -1; return -1; } - ast_register_verbose(network_verboser); + if (ast_register_verbose(network_verboser)) { + ast_log(LOG_WARNING, "Unable to register network verboser?\n"); + } + ast_pthread_create_background(<hread, NULL, listener, NULL); if (!ast_strlen_zero(ast_config_AST_CTL_OWNER)) { @@ -2914,7 +2917,9 @@ int main(int argc, char *argv[]) } if (ast_opt_console || option_verbose || (ast_opt_remote && !ast_opt_exec)) { - ast_register_verbose(console_verboser); + if (ast_register_verbose(console_verboser)) { + ast_log(LOG_WARNING, "Unable to register console verboser?\n"); + } WELCOME_MESSAGE; } diff --git a/main/config.c b/main/config.c index 69c70bf91..9f5fdc617 100644 --- a/main/config.c +++ b/main/config.c @@ -2130,7 +2130,8 @@ int ast_update_realtime(const char *family, const char *keyfield, const char *lo return res; } -int ast_store_realtime(const char *family, ...) { +int ast_store_realtime(const char *family, ...) +{ struct ast_config_engine *eng; int res = -1; char db[256]=""; @@ -2146,7 +2147,8 @@ int ast_store_realtime(const char *family, ...) { return res; } -int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup, ...) { +int ast_destroy_realtime(const char *family, const char *keyfield, const char *lookup, ...) +{ struct ast_config_engine *eng; int res = -1; char db[256]=""; diff --git a/main/sched.c b/main/sched.c index 6ef2972b7..d877417b6 100644 --- a/main/sched.c +++ b/main/sched.c @@ -252,8 +252,9 @@ static int sched_settime(struct timeval *tv, int when) int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) { /* 0 means the schedule item is new; do not delete */ - if (old_id > 0) - ast_sched_del(con, old_id); + if (old_id > 0) { + AST_SCHED_DEL(con, old_id); + } return ast_sched_add_variable(con, when, callback, data, variable); } @@ -295,8 +296,9 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) { - if (old_id > -1) - ast_sched_del(con, old_id); + if (old_id > -1) { + AST_SCHED_DEL(con, old_id); + } return ast_sched_add(con, when, callback, data); } |