[svn-commits] irroot: branch irroot/distrotech-customers-1.8 r325802 - /team/irroot/distrot...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 30 07:15:51 CDT 2011


Author: irroot
Date: Thu Jun 30 07:15:46 2011
New Revision: 325802

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=325802
Log:
Check cached entries before counting mailbox

Modified:
    team/irroot/distrotech-customers-1.8/channels/chan_sip.c

Modified: team/irroot/distrotech-customers-1.8/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/channels/chan_sip.c?view=diff&rev=325802&r1=325801&r2=325802
==============================================================================
--- team/irroot/distrotech-customers-1.8/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-1.8/channels/chan_sip.c Thu Jun 30 07:15:46 2011
@@ -1325,6 +1325,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 */
@@ -4912,7 +4913,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 svn-commits mailing list