[svn-commits] branch oej/sdpcleanup r32114 - in /team/oej/sdpcleanup: ./ channels/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Jun 4 12:24:11 MST 2006


Author: oej
Date: Sun Jun  4 14:24:10 2006
New Revision: 32114

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

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

Propchange: team/oej/sdpcleanup/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jun  4 14:24:10 2006
@@ -1,1 +1,1 @@
-/trunk:1-32079
+/trunk:1-32112

Modified: team/oej/sdpcleanup/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/sdpcleanup/channel.c?rev=32114&r1=32113&r2=32114&view=diff
==============================================================================
--- team/oej/sdpcleanup/channel.c (original)
+++ team/oej/sdpcleanup/channel.c Sun Jun  4 14:24:10 2006
@@ -2099,7 +2099,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/sdpcleanup/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/sdpcleanup/channels/chan_sip.c?rev=32114&r1=32113&r2=32114&view=diff
==============================================================================
--- team/oej/sdpcleanup/channels/chan_sip.c (original)
+++ team/oej/sdpcleanup/channels/chan_sip.c Sun Jun  4 14:24:10 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;			/*!< RTP non-codec capabilities */
+	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 */
@@ -7487,12 +7487,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=");
@@ -11391,7 +11387,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 */
 
@@ -11491,13 +11488,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 */
@@ -11775,15 +11765,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 ? */
@@ -11794,34 +11775,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/sdpcleanup/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/sdpcleanup/rtp.c?rev=32114&r1=32113&r2=32114&view=diff
==============================================================================
--- team/oej/sdpcleanup/rtp.c (original)
+++ team/oej/sdpcleanup/rtp.c Sun Jun  4 14:24:10 2006
@@ -737,8 +737,8 @@
 	}
 
 	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) {
@@ -1523,7 +1523,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);
 		}
@@ -1669,8 +1669,8 @@
 		}
 				
 		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_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr), ntohs(rtp->them.sin_port), codec, rtp->seqno, rtp->lastts,res - hdrlen);
+			ast_verbose("Sent RTP packet to   %s:%d (type %d, seq %u, ts %u, len %u)\n",
+				ast_inet_ntoa(iabuf, sizeof(iabuf), rtp->them.sin_addr), ntohs(rtp->them.sin_port), codec, rtp->seqno, rtp->lastts,res - hdrlen);
 	}
 
 	rtp->seqno++;



More information about the svn-commits mailing list