[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r325803 - /team/irroot/distr...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 30 07:16:00 CDT 2011
Author: irroot
Date: Thu Jun 30 07:15:57 2011
New Revision: 325803
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325803
Log:
Check cached entries before counting mailbox
Modified:
team/irroot/distrotech-customers-trunk/channels/chan_sip.c
Modified: team/irroot/distrotech-customers-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/chan_sip.c?view=diff&rev=325803&r1=325802&r2=325803
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Thu Jun 30 07:15:57 2011
@@ -1341,6 +1341,7 @@
static void *do_monitor(void *data);
static int restart_monitor(void);
static void peer_mailboxes_to_str(struct ast_str **mailbox_str, struct sip_peer *peer);
+static int get_cached_mwi(struct sip_peer *peer, int *new, int *old);
static struct ast_variable *copy_vars(struct ast_variable *src);
static int dialog_find_multiple(void *obj, void *arg, int flags);
/* static int sip_addrcmp(char *name, struct sockaddr_in *sin); Support for peer matching */
@@ -4948,7 +4949,7 @@
}
if (p->type & SIP_TYPE_PEER) {
peer_mailboxes_to_str(&mailbox_str, p);
- if (!ast_strlen_zero(mailbox_str->str)) {
+ if (!ast_strlen_zero(mailbox_str->str) && !get_cached_mwi(p, &newmsgs, &oldmsgs)) {
ast_app_inboxcount(mailbox_str->str, &newmsgs, &oldmsgs);
p->lastmsgssent = ((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs));
}
More information about the asterisk-commits
mailing list