[asterisk-commits] irroot: branch irroot/distrotech-customers-1.8 r329390 - in /team/irroot/dist...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 25 04:21:29 CDT 2011
Author: irroot
Date: Mon Jul 25 04:21:23 2011
New Revision: 329390
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=329390
Log:
Remove sip lastmsgssent
Modified:
team/irroot/distrotech-customers-1.8/channels/chan_sip.c
team/irroot/distrotech-customers-1.8/channels/sip/include/sip.h
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=329390&r1=329389&r2=329390
==============================================================================
--- team/irroot/distrotech-customers-1.8/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-1.8/channels/chan_sip.c Mon Jul 25 04:21:23 2011
@@ -1325,7 +1325,6 @@
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 */
@@ -4880,8 +4879,6 @@
{
struct sip_peer *p = NULL;
struct sip_peer tmp_peer;
- struct ast_str *mailbox_str = ast_str_alloca(512);
- int newmsgs = 0, oldmsgs = 0;
if (peer) {
ast_copy_string(tmp_peer.name, peer, sizeof(tmp_peer.name));
@@ -4918,13 +4915,6 @@
break;
case FINDALLDEVICES:
break;
- }
- if (p->type & SIP_TYPE_PEER) {
- peer_mailboxes_to_str(&mailbox_str, p);
- 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));
- }
}
}
}
@@ -14403,9 +14393,7 @@
sched_yield();
}
if (!res) {
- if (!sip_send_mwi_to_peer(peer, NULL, 0)) {
- peer->lastmsgssent = -1;
- }
+ sip_send_mwi_to_peer(peer, NULL, 0);
ast_devstate_changed(AST_DEVICE_UNKNOWN, "SIP/%s", peer->name);
}
if (res < 0) {
@@ -16904,7 +16892,6 @@
ast_cli(fd, " MOH Suggest : %s\n", peer->mohsuggest);
ast_cli(fd, " Mailbox : %s\n", mailbox_str->str);
ast_cli(fd, " VM Extension : %s\n", peer->vmexten);
- 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, " Max forwards : %d\n", peer->maxforwards);
if (peer->busy_level)
@@ -17019,7 +17006,6 @@
astman_append(s, "VoiceMailbox: %s\r\n", mailbox_str->str);
astman_append(s, "TransferMode: %s\r\n", transfermode2str(peer->allowtransfer));
astman_append(s, "Maxforwards: %d\r\n", peer->maxforwards);
- astman_append(s, "LastMsgsSent: %d\r\n", peer->lastmsgssent);
astman_append(s, "Maxforwards: %d\r\n", peer->maxforwards);
astman_append(s, "Call-limit: %d\r\n", peer->call_limit);
astman_append(s, "Busy-level: %d\r\n", peer->busy_level);
@@ -24929,7 +24915,9 @@
return in_cache;
}
-/*! \brief Send message waiting indication to alert peer that they've got voicemail */
+/*! \brief Send message waiting indication to alert peer that they've got voicemail
+ * \returns -1 on failure, 0 on success
+ */
static int sip_send_mwi_to_peer(struct sip_peer *peer, const struct ast_event *event, int cache_only)
{
/* Called with peerl lock, but releases it */
@@ -24995,7 +24983,6 @@
/* Send MWI */
ast_set_flag(&p->flags[0], SIP_OUTGOING);
- peer->lastmsgssent = ((newmsgs > 0x7fff ? 0x7fff0000 : (newmsgs << 16)) | (oldmsgs > 0xffff ? 0xffff : oldmsgs));
/* the following will decrement the refcount on p as it finishes */
transmit_notify_with_mwi(p, newmsgs, oldmsgs, peer->vmexten);
dialog_unref(p, "unref dialog ptr p just before it goes out of scope at the end of sip_send_mwi_to_peer.");
@@ -26537,7 +26524,6 @@
/* Note that our peer HAS had its reference count increased */
if (firstpass) {
- peer->lastmsgssent = -1;
oldha = peer->ha;
peer->ha = NULL;
olddirectmediaha = peer->directmediaha;
Modified: team/irroot/distrotech-customers-1.8/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/channels/sip/include/sip.h?view=diff&rev=329390&r1=329389&r2=329390
==============================================================================
--- team/irroot/distrotech-customers-1.8/channels/sip/include/sip.h (original)
+++ team/irroot/distrotech-customers-1.8/channels/sip/include/sip.h Mon Jul 25 04:21:23 2011
@@ -1220,7 +1220,6 @@
int maxforwards; /*!< SIP Loop prevention */
enum transfermodes allowtransfer; /*! SIP Refer restriction scheme */
struct ast_codec_pref prefs; /*!< codec prefs */
- int lastmsgssent;
unsigned int sipoptions; /*!< Supported SIP options */
struct ast_flags flags[3]; /*!< SIP_ flags */
More information about the asterisk-commits
mailing list