Fix the FRACK! warnings in chan_iax2 when POKE/LAGRQ packets are not answered.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150580 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Tilghman Lesher
2008-10-17 16:34:29 +00:00
parent 3d8c34bc80
commit b3bb9564d3
2 changed files with 24 additions and 2 deletions

View File

@@ -72,6 +72,22 @@ extern "C" {
id = -1; \
} while (0);
#define AST_SCHED_DEL_SPINLOCK(sched, id, lock) \
({ \
int _count = 0; \
int _sched_res = -1; \
while (id > -1 && (_sched_res = ast_sched_del(sched, id)) && ++_count < 10) { \
ast_mutex_unlock(lock); \
usleep(1); \
ast_mutex_lock(lock); \
} \
if (_count == 10 && option_debug > 2) { \
ast_log(LOG_DEBUG, "Unable to cancel schedule ID %d.\n", id); \
} \
id = -1; \
(_sched_res); \
})
#define AST_SCHED_REPLACE_VARIABLE(id, sched, when, callback, data, variable) \
do { \
int _count = 0; \