diff options
author | Steve Davies <steve@one47.co.uk> | 2015-11-11 10:16:22 +0000 |
---|---|---|
committer | Steve Davies <steve@one47.co.uk> | 2015-11-12 11:46:43 +0000 |
commit | d982b99e71abd84cb668dfee23021422ffceed9a (patch) | |
tree | b6c12d409d976d3e574f10ffcef05b40bff07a26 /channels/chan_iax2.c | |
parent | c1abe8906dd4696bc85697cfbbff2c9fca6af4d6 (diff) |
Further fixes to improper usage of scheduler
When ASTERISK-25449 was closed, a number of scheduler issues mentioned in
the comments were missed. These have since beed raised in ASTERISK-25476
and elsewhere.
This patch attempts to collect all of the scheduler issues discovered so
far and address them sensibly.
ASTERISK-25476 #close
Change-Id: I87a77d581e2e0d91d33b4b2fbff80f64a566d05b
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index dd1bc4ca6..42ccbd5fd 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -7101,7 +7101,7 @@ static char *handle_cli_iax2_unregister(struct ast_cli_entry *e, int cmd, struct p = find_peer(a->argv[2], 1); if (p) { - if (p->expire > 0) { + if (p->expire > -1) { struct iax2_peer *peer; peer = ao2_find(peers, a->argv[2], OBJ_KEY); @@ -7133,8 +7133,8 @@ static char *complete_iax2_unregister(const char *line, const char *word, int po if (pos == 2) { struct ao2_iterator i = ao2_iterator_init(peers, 0); while ((p = ao2_iterator_next(&i))) { - if (!strncasecmp(p->name, word, wordlen) && - ++which > state && p->expire > 0) { + if (!strncasecmp(p->name, word, wordlen) && + ++which > state && p->expire > -1) { res = ast_strdup(p->name); peer_unref(p); break; |