diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 15:31:37 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-05 15:31:37 +0000 |
commit | a07c2c9944dc56f072d65f3d5ad5e56d8cdd9378 (patch) | |
tree | 866fd10a4bc5706fe350e50d850ea2071ec697c9 /include | |
parent | 9792167e6a5593f7cabe4cb9dd6f9593eeea95f9 (diff) |
Merged revisions 106036 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r106036 | tilghman | 2008-03-05 09:23:32 -0600 (Wed, 05 Mar 2008) | 15 lines
Merged revisions 106015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r106015 | tilghman | 2008-03-05 09:17:16 -0600 (Wed, 05 Mar 2008) | 7 lines
Correctly initialize retransid in SIP, and ensure that the warning when failing to delete a schedule entry can actually hit the log.
(closes issue #12140)
Reported by: slavon
Patches:
sch2.patch uploaded by slavon (license 288)
(Patch slightly modified by me)
........
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106037 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/sched.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h index caba02084..cd65a6887 100644 --- a/include/asterisk/sched.h +++ b/include/asterisk/sched.h @@ -38,8 +38,9 @@ extern "C" { #define AST_SCHED_DEL(sched, id) \ do { \ int _count = 0; \ - while (id > -1 && ast_sched_del(sched, id) && _count++ < 10) \ + while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \ usleep(1); \ + } \ if (_count == 10) \ ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \ id = -1; \ @@ -48,8 +49,9 @@ extern "C" { #define AST_SCHED_REPLACE_VARIABLE(id, sched, when, callback, data, variable) \ do { \ int _count = 0; \ - while (id > -1 && ast_sched_del(sched, id) && _count++ < 10) \ + while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \ usleep(1); \ + } \ if (_count == 10) \ ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \ id = ast_sched_add_variable(sched, when, callback, data, variable); \ |