diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-07-02 21:27:53 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-07-02 21:27:53 +0000 |
commit | 885d17506b04b9988a1e8c66b272ce7c67619377 (patch) | |
tree | 507f4c47c1aefc693554b8df76781b4c44b0f75a /channels/chan_iax2.c | |
parent | 55e4daef88a20e99daa9a9729ad8728818602a40 (diff) |
Keep ast_app_inboxcount API compatible with 1.6.0.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127609 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r-- | channels/chan_iax2.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index f16c66c42..452a8e654 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -6948,7 +6948,7 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i iax_ie_append_addr(&ied, IAX_IE_APPARENT_ADDR, &p->addr); if (!ast_strlen_zero(p->mailbox)) { struct ast_event *event; - int new, old, urgent; + int new, old; char *mailbox, *context; context = mailbox = ast_strdupa(p->mailbox); @@ -6966,15 +6966,16 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i new = ast_event_get_ie_uint(event, AST_EVENT_IE_NEWMSGS); old = ast_event_get_ie_uint(event, AST_EVENT_IE_OLDMSGS); ast_event_destroy(event); - } else /* Fall back on checking the mailbox directly */ - ast_app_inboxcount(p->mailbox, &urgent, &new, &old); + } else { /* Fall back on checking the mailbox directly */ + ast_app_inboxcount(p->mailbox, &new, &old); + } - if (urgent > 255) - urgent = 255; - if (new > 255) + if (new > 255) { new = 255; - if (old > 255) + } + if (old > 255) { old = 255; + } msgcount = (old << 8) | new; iax_ie_append_short(&ied, IAX_IE_MSGCOUNT, msgcount); |