[asterisk-commits] tilghman: branch 1.4 r47581 - in /branches/1.4:
./ channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Mon Nov 13 13:20:01 MST 2006
Author: tilghman
Date: Mon Nov 13 14:20:01 2006
New Revision: 47581
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47581
Log:
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
........
Modified:
branches/1.4/ (props changed)
branches/1.4/channels/chan_sip.c
Propchange: branches/1.4/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.
Modified: branches/1.4/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=47581&r1=47580&r2=47581
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Mon Nov 13 14:20:01 2006
@@ -9861,7 +9861,7 @@
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 @@
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 */
More information about the asterisk-commits
mailing list