[asterisk-commits] branch oej/rtcp r32113 - in /team/oej/rtcp: ./ channels/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Jun 4 12:22:18 MST 2006


Author: oej
Date: Sun Jun  4 14:22:18 2006
New Revision: 32113

URL: http://svn.digium.com/view/asterisk?rev=32113&view=rev
Log:
Reset automerge

Modified:
    team/oej/rtcp/   (props changed)
    team/oej/rtcp/channel.c
    team/oej/rtcp/channels/chan_sip.c
    team/oej/rtcp/rtp.c

Propchange: team/oej/rtcp/
------------------------------------------------------------------------------
    automerge = http://edvina.net/training/

Propchange: team/oej/rtcp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jun  4 14:22:18 2006
@@ -1,1 +1,1 @@
-/trunk:1-32078
+/trunk:1-32111

Modified: team/oej/rtcp/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/channel.c?rev=32113&r1=32112&r2=32113&view=diff
==============================================================================
--- team/oej/rtcp/channel.c (original)
+++ team/oej/rtcp/channel.c Sun Jun  4 14:22:18 2006
@@ -2097,7 +2097,7 @@
 int ast_internal_timing_enabled(struct ast_channel *chan)
 {
 	int ret = ast_opt_internal_timing && chan->timingfd > -1;
-	if (option_debug > 20)
+	if (option_debug > 4)
 		ast_log(LOG_DEBUG, "Internal timing is %s (option_internal_timing=%d chan->timingfd=%d)\n", ret? "enabled": "disabled", ast_opt_internal_timing, chan->timingfd);
 	return ret;
 }

Modified: team/oej/rtcp/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/channels/chan_sip.c?rev=32113&r1=32112&r2=32113&view=diff
==============================================================================
--- team/oej/rtcp/channels/chan_sip.c (original)
+++ team/oej/rtcp/channels/chan_sip.c Sun Jun  4 14:22:18 2006
@@ -805,7 +805,8 @@
 	int jointcapability;			/*!< Supported capability at both ends (codecs ) */
 	int peercapability;			/*!< Supported peer capability */
 	int prefcodec;				/*!< Preferred codec (outbound only) */
-	int noncodeccapability;
+	int noncodeccapability;			/*!< DTMF RFC2833 telephony-event */
+	int redircodecs;			/*!< Redirect codecs */
 	int maxcallbitrate;			/*!< Maximum Call Bitrate for Video Calls */	
 	int callingpres;			/*!< Calling presentation */
 	int authtries;				/*!< Times we've tried to authenticate */
@@ -817,7 +818,6 @@
 	struct sockaddr_in sa;			/*!< Our peer */
 	struct sockaddr_in redirip;		/*!< Where our RTP should be going if not to us */
 	struct sockaddr_in vredirip;		/*!< Where our Video RTP should be going if not to us */
-	int redircodecs;			/*!< Redirect codecs */
 	struct sockaddr_in recv;		/*!< Received as */
 	struct in_addr ourip;			/*!< Our IP */
 	struct ast_channel *owner;		/*!< Who owns us */
@@ -7329,12 +7329,8 @@
 			ast_uri_decode(referdata->replaces_callid);
 			if ((ptr = strchr(referdata->replaces_callid, ';'))) 	/* Remove options */ {
 				*ptr = '\0';
+				ptr++;
 			}
-			/*
-			 * XXX don't know what was the intention but this code is
-			 * definitely wrong, as ptr can be NULL here.
-			 */
-			ptr++;
 
 			/* Find the different tags before we destroy the string */
 			to = strcasestr(ptr, "to-tag=");
@@ -11223,7 +11219,8 @@
 			ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		return -1;
 	} else {
-		/* XXX reduce nesting depth */
+		/* Save nesting depth for now, since there might be other events we will
+			support in the future */
 
 		/* Handle REFER notifications */
 
@@ -11323,13 +11320,6 @@
 		transmit_response(p, "200 OK", req);
 		return res;
 	};
-
-	/* XXX hey, we never reach this code! */
-	/* THis could be voicemail notification */
-	transmit_response(p, "200 OK", req);
-	if (!p->lastinvite) 
-		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
-	return res;
 }
 
 /*! \brief Handle incoming OPTIONS request */
@@ -11607,15 +11597,6 @@
 		/* Skip leading whitespace */
 		replace_id = ast_skip_blanks(replace_id);
 
-		/* XXX there are several bugs in the code below,
-		 * because 'ptr' can be NULL so all the dereferences in strcasestr()
-		 * would cause panics.
-		 * I think we should do something like the code below, which also has
-		 * the advantage of not depending on the order of headers.
-		 * Please test if it works, and in case remove the block in #else / #endif
-		 */
-#if 1	/* proposed replacement */
-
 		start = replace_id;
 		while ( (ptr = strsep(&start, ";")) ) {
 			ptr = ast_skip_blanks(ptr); /* XXX maybe unnecessary ? */
@@ -11626,34 +11607,6 @@
 				fromtag = strsep(&fromtag, "&"); /* trim what ? */
 			}
 		}
-#else	/* original code, buggy */
-		if ((ptr = strchr(replace_id, ';'))) {
-			*ptr = '\0';
-			ptr++;
-		}
-		start = ptr;
-
-		to = strcasestr(ptr, "to-tag=");
-		if (to) {
-			ptr = to + 7;
-			totag = ptr;
-			if ((to = strchr(ptr, ';')))
-				*to = '\0';
-			/* XXX this code is also wrong as to can be NULL */
-			to++;
-			ptr = to;
-		}
-
-		to = strcasestr(ptr, "from-tag=");
-		if (to) {
-			ptr = to + 9;
-			fromtag = ptr;
-			if ((to = strchr(ptr, '&')))
-				*to = '\0';
-			if ((to = strchr(ptr, ';')))
-				*to = '\0';
-		}
-#endif
 
 		if (sipdebug && option_debug > 3) 
 			ast_log(LOG_DEBUG,"Invite/replaces: Will use Replace-Call-ID : %s Fromtag: %s Totag: %s\n", replace_id, fromtag ? fromtag : "<no from tag>", totag ? totag : "<no to tag>");

Modified: team/oej/rtcp/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/rtp.c?rev=32113&r1=32112&r2=32113&view=diff
==============================================================================
--- team/oej/rtcp/rtp.c (original)
+++ team/oej/rtcp/rtp.c Sun Jun  4 14:22:18 2006
@@ -1053,8 +1053,8 @@
 		rtp->themssrc = ntohl(rtpheader[2]); /* Record their SSRC to put in future RR */
 	
 	if(rtp_debug_test_addr(&sin))
-		ast_verbose("Got RTP packet from %s:%d (type %d, seq %d, ts %d, len %d)\n"
-			, ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port), payloadtype, seqno, timestamp,res - hdrlen);
+		ast_verbose("Got  RTP packet from %s:%d (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
+			ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port), payloadtype, seqno, timestamp,res - hdrlen);
 
 	rtpPT = ast_rtp_lookup_pt(rtp, payloadtype);
 	if (!rtpPT.isAstFormat) {
@@ -1890,7 +1890,7 @@
 					ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr),
 					ntohs(rtp->them.sin_port), strerror(errno));
 			if (rtp_debug_test_addr(&rtp->them))
-				ast_verbose("Sent RTP packet to %s:%d (type %d, seq %u, ts %u, len %u)\n",
+				ast_verbose("Sent RTP DTMF packet to %s:%d (type %-2.2d, seq %-6.6u, ts %-6.6u, len %-6.6u)\n",
 					    ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr),
 					    ntohs(rtp->them.sin_port), payload, rtp->seqno, rtp->lastdigitts, res - hdrlen);
 		}



More information about the asterisk-commits mailing list