[asterisk-commits] oej: branch oej/pinequality-manager-qos-reports-1.4 r240767 - /team/oej/pineq...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jan 18 06:32:51 CST 2010


Author: oej
Date: Mon Jan 18 06:32:49 2010
New Revision: 240767

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=240767
Log:
Make sure error message is not sent after success.

Modified:
    team/oej/pinequality-manager-qos-reports-1.4/channels/chan_sip.c

Modified: team/oej/pinequality-manager-qos-reports-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pinequality-manager-qos-reports-1.4/channels/chan_sip.c?view=diff&rev=240767&r1=240766&r2=240767
==============================================================================
--- team/oej/pinequality-manager-qos-reports-1.4/channels/chan_sip.c (original)
+++ team/oej/pinequality-manager-qos-reports-1.4/channels/chan_sip.c Mon Jan 18 06:32:49 2010
@@ -11127,6 +11127,7 @@
 	int all = FALSE;
 	struct ast_channel *chan = NULL;
 	struct sip_pvt *dialog;
+	int sentsuccess = FALSE;
 
 	actionid = astman_get_header(m,"ActionID");
 	channel = astman_get_header(m,"Channel");
@@ -11159,16 +11160,21 @@
 	   time to find out what they want
 	   ...and when my plane is about to leave from ARN */
 	datatype = astman_get_header(m,"Datatype");
-	if (ast_strlen_zero(channel) || !strcasecmp(datatype, "all")) {
+	if (ast_strlen_zero(datatype) || !strcasecmp(datatype, "all")) {
 		all = TRUE;
 	}
- 	astman_append(s, "Response: Success\r\n");
-	if (!ast_strlen_zero(actionid)) {
-                astman_append(s, "ActionID: %s\r\n",actionid);
-	}
 
 
 	if (all || !strcasecmp(datatype, "qos")) {
+		/* When merged with pinefrog, we need to check if RTCP is active at all and
+		   give a status message for rtcp. Otherwise, the reports are a bit silly */
+		if (!sentsuccess) {	/* Yes, it's kind of silly, but this section will be copied to new datatypes... */
+ 			astman_append(s, "Response: Success\r\n");
+			if (!ast_strlen_zero(actionid)) {
+                		astman_append(s, "ActionID: %s\r\n",actionid);
+			}
+			sentsuccess = TRUE;
+		}
 		if (dialog->rtp) {
 			manager_add_qos(s, "audio", dialog);
 		}




More information about the asterisk-commits mailing list