[asterisk-commits] irroot: branch irroot/distrotech-customers-trunk r329468 - in /team/irroot/di...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jul 25 10:33:21 CDT 2011
Author: irroot
Date: Mon Jul 25 10:33:14 2011
New Revision: 329468
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=329468
Log:
Merged revisions 329391,329432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r329391 | irroot | 2011-07-25 11:39:54 +0200 (Mon, 25 Jul 2011) | 11 lines
Remove lastmsgssent from sip it has not been working since 1.6
Clean up the return values to be consistant not currently used
Add doxygen returns
MWI Event is sent on Register
(closes issue ASTERISK-17866)
Reported by: one47
Tested by: irroot, mvanbaak
Review: https://reviewboard.asterisk.org/r/1172/
........
r329432 | irroot | 2011-07-25 16:07:01 +0200 (Mon, 25 Jul 2011) | 8 lines
dsp_process was enhanced to work with alaw and ulaw in addition to slin.
noticed that some functions could be refactored here it is.
Reported by: irroot
Tested by: irroot, mnicholson
Review: https://reviewboard.asterisk.org/r/1304/
........
Modified:
team/irroot/distrotech-customers-trunk/ (props changed)
team/irroot/distrotech-customers-trunk/channels/chan_sip.c
team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h
Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
automerge = *
Propchange: team/irroot/distrotech-customers-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul 25 10:33:14 2011
@@ -1,1 +1,1 @@
-/trunk:1-329385
+/trunk:1-329467
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=329468&r1=329467&r2=329468
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/chan_sip.c (original)
+++ team/irroot/distrotech-customers-trunk/channels/chan_sip.c Mon Jul 25 10:33:14 2011
@@ -1341,7 +1341,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 */
@@ -4916,8 +4915,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));
@@ -4954,13 +4951,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));
- }
}
}
}
@@ -14709,9 +14699,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) {
@@ -17374,7 +17362,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)
@@ -17489,7 +17476,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);
@@ -25565,7 +25551,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 */
@@ -25631,7 +25619,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.");
@@ -27197,7 +27184,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-trunk/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h?view=diff&rev=329468&r1=329467&r2=329468
==============================================================================
--- team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h (original)
+++ team/irroot/distrotech-customers-trunk/channels/sip/include/sip.h Mon Jul 25 10:33:14 2011
@@ -1228,7 +1228,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