[asterisk-commits] irroot: branch irroot/app_queue-trunk r322325 - in /team/irroot/app_queue-tru...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jun 8 02:00:35 CDT 2011
Author: irroot
Date: Wed Jun 8 02:00:30 2011
New Revision: 322325
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=322325
Log:
Conflict Resolved Auto Merge On
Modified:
team/irroot/app_queue-trunk/ (props changed)
team/irroot/app_queue-trunk/channels/chan_sip.c
team/irroot/app_queue-trunk/configs/sip_notify.conf.sample
team/irroot/app_queue-trunk/include/asterisk/message.h
team/irroot/app_queue-trunk/res/res_jabber.c
Propchange: team/irroot/app_queue-trunk/
------------------------------------------------------------------------------
automerge = *
Propchange: team/irroot/app_queue-trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/irroot/app_queue-trunk/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jun 8 02:00:30 2011
@@ -1,1 +1,1 @@
-/trunk:1-322170
+/trunk:1-322323
Modified: team/irroot/app_queue-trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue-trunk/channels/chan_sip.c?view=diff&rev=322325&r1=322324&r2=322325
==============================================================================
--- team/irroot/app_queue-trunk/channels/chan_sip.c (original)
+++ team/irroot/app_queue-trunk/channels/chan_sip.c Wed Jun 8 02:00:30 2011
@@ -7411,7 +7411,7 @@
p->peercaps = ast_format_cap_destroy(p->peercaps);
p->redircaps = ast_format_cap_destroy(p->redircaps);
p->prefcaps = ast_format_cap_destroy(p->prefcaps);
- ao2_t_ref(p, -1, "Yuck, couldn't allocate cc_params struct. Get rid o' p");
+ ao2_t_ref(p, -1, "Yuck, couldn't allocate format capabilities. Get rid o' p");
return NULL;
}
@@ -24092,11 +24092,13 @@
if (ast_strlen_zero(event)) {
transmit_response(p, "489 Bad Event", req);
+ pvt_set_needdestroy(p, "missing Event: header");
return -1;
}
if (!(esc = get_esc(event))) {
transmit_response(p, "489 Bad Event", req);
+ pvt_set_needdestroy(p, "unknown event package in publish");
return -1;
}
@@ -24121,6 +24123,15 @@
}
publish_type = determine_sip_publish_type(req, event, etag, expires_str, &expires_int);
+
+ if (expires_int > max_expiry) {
+ expires_int = max_expiry;
+ } else if (expires_int < min_expiry && expires_int > 0) {
+ transmit_response_with_minexpires(p, "423 Interval too small", req);
+ pvt_set_needdestroy(p, "Expires is less that the min expires allowed.");
+ return 0;
+ }
+ p->expiry = expires_int;
/* It is the responsibility of these handlers to formulate any response
* sent for a PUBLISH
@@ -24145,6 +24156,11 @@
transmit_response(p, "400 Impossible Condition", req);
break;
}
+ if (!handler_result && p->expiry > 0) {
+ sip_scheddestroy(p, (p->expiry + 10) * 1000);
+ } else {
+ pvt_set_needdestroy(p, "forcing expiration");
+ }
return handler_result;
}
@@ -24527,8 +24543,7 @@
ast_log(LOG_WARNING, "Received subscription for extension \"%s\" context \"%s\" "
"with Expire header less that 'minexpire' limit. Received \"Expire: %d\" min is %d\n",
p->exten, p->context, p->expiry, min_expiry);
- p->expiry = min_expiry;
- pvt_set_needdestroy(p, "Expires is less that the min expires allowed. ");
+ pvt_set_needdestroy(p, "Expires is less that the min expires allowed.");
return 0;
}
Modified: team/irroot/app_queue-trunk/configs/sip_notify.conf.sample
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue-trunk/configs/sip_notify.conf.sample?view=diff&rev=322325&r1=322324&r2=322325
==============================================================================
--- team/irroot/app_queue-trunk/configs/sip_notify.conf.sample (original)
+++ team/irroot/app_queue-trunk/configs/sip_notify.conf.sample Wed Jun 8 02:00:30 2011
@@ -44,7 +44,7 @@
Event=>check-sync\;reboot=false
[snom-reboot]
-Event=>reboot
+Event=>check-sync\;reboot=true
; Cisco
Modified: team/irroot/app_queue-trunk/include/asterisk/message.h
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue-trunk/include/asterisk/message.h?view=diff&rev=322325&r1=322324&r2=322325
==============================================================================
--- team/irroot/app_queue-trunk/include/asterisk/message.h (original)
+++ team/irroot/app_queue-trunk/include/asterisk/message.h Wed Jun 8 02:00:30 2011
@@ -49,17 +49,17 @@
* A message technology is capable of transmitting text messages.
*/
struct ast_msg_tech {
- /*!
- * \brief Name of this message technology
- *
- * This is the name that comes at the beginning of a URI for messages
- * that should be sent to this message technology implementation.
- * For example, messages sent to "xmpp:rbryant at digium.com" would be
- * passed to the ast_msg_tech with a name of "xmpp".
- */
- const char * const name;
- /*!
- * \brief Send a message.
+ /*!
+ * \brief Name of this message technology
+ *
+ * This is the name that comes at the beginning of a URI for messages
+ * that should be sent to this message technology implementation.
+ * For example, messages sent to "xmpp:rbryant at digium.com" would be
+ * passed to the ast_msg_tech with a name of "xmpp".
+ */
+ const char * const name;
+ /*!
+ * \brief Send a message.
*
* \param msg the message to send
* \param to the URI of where the message is being sent
@@ -70,8 +70,8 @@
*
* \retval 0 success
* \retval non-zero failure
- */
- int (* const msg_send)(const struct ast_msg *msg, const char *to, const char *from);
+ */
+ int (* const msg_send)(const struct ast_msg *msg, const char *to, const char *from);
};
/*!
Modified: team/irroot/app_queue-trunk/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/app_queue-trunk/res/res_jabber.c?view=diff&rev=322325&r1=322324&r2=322325
==============================================================================
--- team/irroot/app_queue-trunk/res/res_jabber.c (original)
+++ team/irroot/app_queue-trunk/res/res_jabber.c Wed Jun 8 02:00:30 2011
@@ -2295,21 +2295,23 @@
ast_debug(3, "message comes from %s\n", insert->from);
}
- if ((msg = ast_msg_alloc())) {
- int res;
-
- res = ast_msg_set_to(msg, "xmpp:%s", client->user);
- res |= ast_msg_set_from(msg, "xmpp:%s", insert->from);
- res |= ast_msg_set_body(msg, "%s", insert->message);
- res |= ast_msg_set_context(msg, "%s", client->context);
-
- if (res) {
- ast_msg_destroy(msg);
- } else {
- ast_msg_queue(msg);
- }
-
- msg = NULL;
+ if (client->send_to_dialplan) {
+ if ((msg = ast_msg_alloc())) {
+ int res;
+
+ res = ast_msg_set_to(msg, "xmpp:%s", client->user);
+ res |= ast_msg_set_from(msg, "xmpp:%s", insert->from);
+ res |= ast_msg_set_body(msg, "%s", insert->message);
+ res |= ast_msg_set_context(msg, "%s", client->context);
+
+ if (res) {
+ ast_msg_destroy(msg);
+ } else {
+ ast_msg_queue(msg);
+ }
+
+ msg = NULL;
+ }
}
/* remove old messages received from this JID
More information about the asterisk-commits
mailing list