[asterisk-commits] bebuild: tag certified-1.8.15-cert1-rc2 r376503 - in /certified/tags/1.8.15-c...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 19 16:56:49 CST 2012


Author: bebuild
Date: Mon Nov 19 16:56:45 2012
New Revision: 376503

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=376503
Log:
Merge changes for 1.8.15-cert1-rc2

* Merge r376303, 376409, 376501
* Remove summaries
* Update ChangeLog, .version


Removed:
    certified/tags/1.8.15-cert1-rc2/certified-asterisk-1.8.15-cert1-rc1-summary.html
    certified/tags/1.8.15-cert1-rc2/certified-asterisk-1.8.15-cert1-rc1-summary.txt
Modified:
    certified/tags/1.8.15-cert1-rc2/   (props changed)
    certified/tags/1.8.15-cert1-rc2/.version
    certified/tags/1.8.15-cert1-rc2/ChangeLog
    certified/tags/1.8.15-cert1-rc2/apps/app_queue.c
    certified/tags/1.8.15-cert1-rc2/apps/app_senddtmf.c
    certified/tags/1.8.15-cert1-rc2/res/res_rtp_asterisk.c

Propchange: certified/tags/1.8.15-cert1-rc2/
            ('branch-1.6.2-blocked' removed)

Propchange: certified/tags/1.8.15-cert1-rc2/
            ('branch-1.6.2-merged' removed)

Propchange: certified/tags/1.8.15-cert1-rc2/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Propchange: certified/tags/1.8.15-cert1-rc2/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 19 16:56:45 2012
@@ -1,1 +1,3 @@
 /branches/1.8:371919
+/certified/branches/1.8.11:376302
+/certified/branches/1.8.15:376303,376409,376501

Modified: certified/tags/1.8.15-cert1-rc2/.version
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.15-cert1-rc2/.version?view=diff&rev=376503&r1=376502&r2=376503
==============================================================================
--- certified/tags/1.8.15-cert1-rc2/.version (original)
+++ certified/tags/1.8.15-cert1-rc2/.version Mon Nov 19 16:56:45 2012
@@ -1,1 +1,1 @@
-1.8.15-cert1-rc1
+1.8.15-cert1-rc2

Modified: certified/tags/1.8.15-cert1-rc2/ChangeLog
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.15-cert1-rc2/ChangeLog?view=diff&rev=376503&r1=376502&r2=376503
==============================================================================
--- certified/tags/1.8.15-cert1-rc2/ChangeLog (original)
+++ certified/tags/1.8.15-cert1-rc2/ChangeLog Mon Nov 19 16:56:45 2012
@@ -1,3 +1,34 @@
+2012-11-19   Asterisk Development Team <asteriskteam at digium.com>
+
+	* Asterisk 1.8.15-cert1-rc2 Released.
+
+	* Fix SendDTMF crash and channel reference leak using channel name
+	  parameter.
+
+	  The SendDTMF channel name parameter has two issues.
+	  1) Crashes if the channel name does not exist.
+	  2) Leaks a channel reference if the channel is the current channel.
+	  Problem introduced by ASTERISK-15956.
+
+	  * Updated SendDTMF documentation.
+
+	  * Renamed app to senddtmf_name and tweaked the type.
+
+	* Fix Incrementing Sequence Number For Retransmitted DTMF End Packets
+
+	  In Asterisk 1.4+, a fix was put in place to increment the sequence
+	  number for retransmitted DTMF end packets.  With the introduction
+	  of the RTP engine API in 1.8, the sequence number was no longer being
+	  incremented.  This patch fixes this regression as well as cleans up a
+	  few lines that were not doing anything.
+
+	* app_queue: Fix a lock that was being held forever caused by a merging
+	  mistake
+
+    	  r375591 merged with conflicts and an oversight resulted in an unlock
+	  being missed which resulted in a deadlock when updating realtime
+	  members in queues.  This patch adds that unlock back in.
+
 2012-11-02  Asterisk Development Team <asteriskteam at digium.com>
 
 	* Asterisk 1.8.15-cert1-rc1 Released.

Modified: certified/tags/1.8.15-cert1-rc2/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.15-cert1-rc2/apps/app_queue.c?view=diff&rev=376503&r1=376502&r2=376503
==============================================================================
--- certified/tags/1.8.15-cert1-rc2/apps/app_queue.c (original)
+++ certified/tags/1.8.15-cert1-rc2/apps/app_queue.c Mon Nov 19 16:56:45 2012
@@ -2509,6 +2509,7 @@
 			ao2_ref(m, -1);
 		}
 		ast_debug(3, "Queue %s has no realtime members defined. No need for update\n", q->name);
+		ao2_unlock(q);
 		return;
 	}
 

Modified: certified/tags/1.8.15-cert1-rc2/apps/app_senddtmf.c
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.15-cert1-rc2/apps/app_senddtmf.c?view=diff&rev=376503&r1=376502&r2=376503
==============================================================================
--- certified/tags/1.8.15-cert1-rc2/apps/app_senddtmf.c (original)
+++ certified/tags/1.8.15-cert1-rc2/apps/app_senddtmf.c Mon Nov 19 16:56:45 2012
@@ -21,14 +21,14 @@
  * \brief App to send DTMF digits
  *
  * \author Mark Spencer <markster at digium.com>
- * 
+ *
  * \ingroup applications
  */
 
 /*** MODULEINFO
 	<support_level>core</support_level>
  ***/
- 
+
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -46,7 +46,9 @@
 		</synopsis>
 		<syntax>
 			<parameter name="digits" required="true">
-				<para>List of digits 0-9,*#,abcd</para>
+				<para>List of digits 0-9,*#,a-d,A-D to send also w for a half second pause,
+				and f or F for a flash-hook if the channel supports
+				flash-hook.</para>
 			</parameter>
 			<parameter name="timeout_ms" required="false">
 				<para>Amount of time to wait in ms between tones. (defaults to .25s)</para>
@@ -54,13 +56,12 @@
 			<parameter name="duration_ms" required="false">
 				<para>Duration of each digit</para>
 			</parameter>
-                        <parameter name="channel" required="false">
-                                <para>Channel where digits will be played</para>
-                        </parameter>
+			<parameter name="channel" required="false">
+				<para>Channel where digits will be played</para>
+			</parameter>
 		</syntax>
 		<description>
-			<para>DTMF digits sent to a channel with half second pause</para>
-			<para>It will pass all digits or terminate if it encounters an error.</para>
+			<para>It will send all digits or terminate if it encounters an error.</para>
 		</description>
 		<see-also>
 			<ref type="application">Read</ref>
@@ -84,14 +85,17 @@
 		</description>
 	</manager>
  ***/
-static char *app = "SendDTMF";
+
+static const char senddtmf_name[] = "SendDTMF";
 
 static int senddtmf_exec(struct ast_channel *chan, const char *vdata)
 {
-	int res = 0;
+	int res;
 	char *data;
 	int dinterval = 0, duration = 0;
-	struct ast_channel *dchan;
+	struct ast_channel *chan_found = NULL;
+	struct ast_channel *chan_dest = chan;
+	struct ast_channel *chan_autoservice = NULL;
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(digits);
 		AST_APP_ARG(dinterval);
@@ -100,15 +104,17 @@
 	);
 
 	if (ast_strlen_zero(vdata)) {
-		ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#aAbBcCdD)\n");
+		ast_log(LOG_WARNING, "SendDTMF requires an argument\n");
 		return 0;
 	}
-
-	dchan = chan;
 
 	data = ast_strdupa(vdata);
 	AST_STANDARD_APP_ARGS(args, data);
 
+	if (ast_strlen_zero(args.digits)) {
+		ast_log(LOG_WARNING, "The digits argument is required (0-9,*#,a-d,A-D,wfF)\n");
+		return 0;
+	}
 	if (!ast_strlen_zero(args.dinterval)) {
 		ast_app_parse_timelen(args.dinterval, &dinterval, TIMELEN_MILLISECONDS);
 	}
@@ -116,18 +122,23 @@
 		ast_app_parse_timelen(args.duration, &duration, TIMELEN_MILLISECONDS);
 	}
 	if (!ast_strlen_zero(args.channel)) {
-		dchan = ast_channel_get_by_name(args.channel);
+		chan_found = ast_channel_get_by_name(args.channel);
+		if (!chan_found) {
+			ast_log(LOG_WARNING, "No such channel: %s\n", args.channel);
+			return 0;
+		}
+		chan_dest = chan_found;
+		if (chan_found != chan) {
+			chan_autoservice = chan;
+		}
 	}
-	if (dchan != chan) {
-		ast_autoservice_start(chan);
-	}
-	res = ast_dtmf_stream(dchan, NULL, args.digits, dinterval <= 0 ? 250 : dinterval, duration);
-	if (dchan != chan) {
-		ast_autoservice_stop(chan);
-		ast_channel_unref(dchan);
+	res = ast_dtmf_stream(chan_dest, chan_autoservice, args.digits,
+		dinterval <= 0 ? 250 : dinterval, duration);
+	if (chan_found) {
+		ast_channel_unref(chan_found);
 	}
 
-	return res;
+	return chan_autoservice ? 0 : res;
 }
 
 static int manager_play_dtmf(struct mansession *s, const struct message *m)
@@ -160,10 +171,10 @@
 {
 	int res;
 
-	res = ast_unregister_application(app);
+	res = ast_unregister_application(senddtmf_name);
 	res |= ast_manager_unregister("PlayDTMF");
 
-	return res;	
+	return res;
 }
 
 static int load_module(void)
@@ -171,7 +182,7 @@
 	int res;
 
 	res = ast_manager_register_xml("PlayDTMF", EVENT_FLAG_CALL, manager_play_dtmf);
-	res |= ast_register_application_xml(app, senddtmf_exec);
+	res |= ast_register_application_xml(senddtmf_name, senddtmf_exec);
 
 	return res;
 }

Modified: certified/tags/1.8.15-cert1-rc2/res/res_rtp_asterisk.c
URL: http://svnview.digium.com/svn/asterisk/certified/tags/1.8.15-cert1-rc2/res/res_rtp_asterisk.c?view=diff&rev=376503&r1=376502&r2=376503
==============================================================================
--- certified/tags/1.8.15-cert1-rc2/res/res_rtp_asterisk.c (original)
+++ certified/tags/1.8.15-cert1-rc2/res/res_rtp_asterisk.c Mon Nov 19 16:56:45 2012
@@ -717,11 +717,10 @@
 	}
 
 	/* Actually create the packet we will be sending */
-	rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno));
+	rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno));
 	rtpheader[1] = htonl(rtp->lastdigitts);
 	rtpheader[2] = htonl(rtp->ssrc);
 	rtpheader[3] = htonl((rtp->send_digit << 24) | (0xa << 16) | (rtp->send_duration));
-	rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno));
 
 	/* Boom, send it on out */
 	res = rtp_sendto(instance, (void *) rtpheader, hdrlen + 4, 0, &remote_address);
@@ -784,15 +783,16 @@
 	}
 
 	/* Construct the packet we are going to send */
-	rtpheader[0] = htonl((2 << 30) | (1 << 23) | (rtp->send_payload << 16) | (rtp->seqno));
 	rtpheader[1] = htonl(rtp->lastdigitts);
 	rtpheader[2] = htonl(rtp->ssrc);
 	rtpheader[3] = htonl((digit << 24) | (0xa << 16) | (rtp->send_duration));
 	rtpheader[3] |= htonl((1 << 23));
-	rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno));
 
 	/* Send it 3 times, that's the magical number */
 	for (i = 0; i < 3; i++) {
+
+		rtpheader[0] = htonl((2 << 30) | (rtp->send_payload << 16) | (rtp->seqno));
+
 		res = rtp_sendto(instance, (void *) rtpheader, hdrlen + 4, 0, &remote_address);
 		if (res < 0) {
 			ast_log(LOG_ERROR, "RTP Transmission error to %s: %s\n",
@@ -804,6 +804,8 @@
 				    ast_sockaddr_stringify(&remote_address),
 				    rtp->send_payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
 		}
+
+		rtp->seqno++;
 	}
 
 	/* Oh and we can't forget to turn off the stuff that says we are sending DTMF */




More information about the asterisk-commits mailing list