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:44:17 +0000 |
commit | 07583c288828a496cd7730b55112128fea31eaef (patch) | |
tree | 0bd898dc3cb69e5befdf43ecfd5c4fcea0c82a82 /channels/chan_iax2.c | |
parent | dac0bf063c756ce737aa84b246a7c4e6c317b696 (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 5af0bfe1d..42a538fd4 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -7114,7 +7114,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); @@ -7146,8 +7146,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; |