diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-13 20:20:01 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-11-13 20:20:01 +0000 |
commit | 1f8040192eacc180eb952adb54204356841e4d8d (patch) | |
tree | 4cfb2acc5eb9277fc0d2ab9fdd1ec361776ec611 /channels | |
parent | 0b844dd6022bc6da0c383ef75ee25f3904ee388d (diff) |
Merged revisions 47580 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r47580 | tilghman | 2006-11-13 14:18:30 -0600 (Mon, 13 Nov 2006) | 2 lines
Having more than 255 old messages caused corruption in the new/old count
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47581 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 716a10fec..2aa779367 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9861,7 +9861,7 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, struct message print_group(fd, peer->pickupgroup, 0); ast_cli(fd, " Mailbox : %s\n", peer->mailbox); ast_cli(fd, " VM Extension : %s\n", peer->vmexten); - ast_cli(fd, " LastMsgsSent : %d\n", peer->lastmsgssent); + ast_cli(fd, " LastMsgsSent : %d/%d\n", (peer->lastmsgssent & 0x7fff0000) >> 16, peer->lastmsgssent & 0xffff); ast_cli(fd, " Call limit : %d\n", peer->call_limit); ast_cli(fd, " Dynamic : %s\n", (ast_test_flag(&peer->flags[1], SIP_PAGE2_DYNAMIC)?"Yes":"No")); ast_cli(fd, " Callerid : %s\n", ast_callerid_merge(cbuf, sizeof(cbuf), peer->cid_name, peer->cid_num, "<unspecified>")); @@ -14570,12 +14570,12 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer) peer->lastmsgcheck = time(NULL); /* Return now if it's the same thing we told them last time */ - if (((newmsgs << 8) | (oldmsgs)) == peer->lastmsgssent) { + if (((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs)) == peer->lastmsgssent) { return 0; } - peer->lastmsgssent = ((newmsgs << 8) | (oldmsgs)); + peer->lastmsgssent = ((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs)); if (peer->mwipvt) { /* Base message on subscription */ |