[asterisk-commits] branch oej/rtcp r26839 - in /team/oej/rtcp: ./ build_tools/ channels/ include/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 11 03:08:56 MST 2006


Author: oej
Date: Thu May 11 05:08:55 2006
New Revision: 26839

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

Added:
    team/oej/rtcp/build_tools/make_buildopts_h
      - copied unchanged from r26808, trunk/build_tools/make_buildopts_h
Modified:
    team/oej/rtcp/   (props changed)
    team/oej/rtcp/.cleancount
    team/oej/rtcp/Makefile
    team/oej/rtcp/build_tools/Makefile
    team/oej/rtcp/build_tools/cflags.xml
    team/oej/rtcp/channels/chan_sip.c
    team/oej/rtcp/configure.ac
    team/oej/rtcp/enum.c
    team/oej/rtcp/include/autoconfig.h.in
    team/oej/rtcp/rtp.c

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

Propchange: team/oej/rtcp/
------------------------------------------------------------------------------
Binary property 'branch-1.2-blocked' - no diff available.

Propchange: team/oej/rtcp/
------------------------------------------------------------------------------
Binary property 'branch-1.2-merged' - no diff available.

Propchange: team/oej/rtcp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu May 11 05:08:55 2006
@@ -1,1 +1,1 @@
-/trunk:1-26741
+/trunk:1-26837

Modified: team/oej/rtcp/.cleancount
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/.cleancount?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/.cleancount (original)
+++ team/oej/rtcp/.cleancount Thu May 11 05:08:55 2006
@@ -1,1 +1,1 @@
-15
+16

Modified: team/oej/rtcp/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/Makefile?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/Makefile (original)
+++ team/oej/rtcp/Makefile Thu May 11 05:08:55 2006
@@ -195,7 +195,6 @@
   include makeopts
 endif
 
-ASTCFLAGS+=$(MENUSELECT_CFLAGS)
 TOPDIR_CFLAGS=-include include/autoconfig.h -Iinclude
 MOD_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
 OTHER_SUBDIR_CFLAGS=-include ../include/autoconfig.h -I../include -I..
@@ -432,7 +431,7 @@
 	@echo " +               make install                +"  
 	@echo " +-------------------------------------------+"  
 
-all: config.status menuselect.makeopts cleantest depend asterisk subdirs
+all: cleantest config.status menuselect.makeopts depend asterisk subdirs
 
 config.status: configure
 	@CFLAGS="" ./configure
@@ -525,10 +524,17 @@
 	fi
 	@rm -f $@.tmp
 
+include/asterisk/buildopts.h: menuselect.makeopts
+	@build_tools/make_buildopts_h > $@.tmp
+	@if cmp -s $@.tmp $@ ; then echo; else \
+		mv $@.tmp $@ ; \
+	fi
+	@rm -f $@.tmp
+
 stdtime/libtime.a:
 	CFLAGS="$(MOD_SUBDIR_CFLAGS) $(ASTCFLAGS)" $(MAKE) -C stdtime libtime.a
 
-asterisk: editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
+asterisk: include/asterisk/buildopts.h editline/libedit.a db1-ast/libdb1.a stdtime/libtime.a $(OBJS)
 	build_tools/make_build_h > include/asterisk/build.h.tmp
 	if cmp -s include/asterisk/build.h.tmp include/asterisk/build.h ; then echo ; else \
 		mv include/asterisk/build.h.tmp include/asterisk/build.h ; \
@@ -567,6 +573,7 @@
 	rm -f menuselect.makeopts makeopts makeopts.xml
 	rm -f config.log config.status
 	rm -f include/autoconfig.h
+	rm -f include/asterisk/buildopts.h
 	$(MAKE) -C mxml clean
 	$(MAKE) -C build_tools dist-clean
 
@@ -862,7 +869,7 @@
 
 rpm: __rpm
 
-__rpm: include/asterisk/version.h spec
+__rpm: include/asterisk/version.h include/asterisk/buildopts.h spec
 	rm -rf /tmp/asterisk ; \
 	mkdir -p /tmp/asterisk/redhat/RPMS/i386 ; \
 	$(MAKE) DESTDIR=/tmp/asterisk install ; \
@@ -911,10 +918,10 @@
 
 valgrind: dont-optimize
 
-depend: include/asterisk/version.h .depend defaults.h 
+depend: include/asterisk/version.h include/asterisk/buildopts.h .depend defaults.h 
 	@for x in $(SUBDIRS); do $(MAKE) -C $$x depend || exit 1 ; done
 
-.depend: include/asterisk/version.h defaults.h
+.depend: include/asterisk/version.h include/asterisk/buildopts.h defaults.h
 	build_tools/mkdep $(CFLAGS) $(wildcard *.c)
 
 .tags-depend:
@@ -958,7 +965,7 @@
 
 cleantest:
 	@if cmp -s .cleancount .lastclean ; then echo ; else \
-		$(MAKE) clean; cp -f .cleancount .lastclean;\
+		$(MAKE) dist-clean; cp -f .cleancount .lastclean;\
 	fi
 
 _uninstall:

Modified: team/oej/rtcp/build_tools/Makefile
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/build_tools/Makefile?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/build_tools/Makefile (original)
+++ team/oej/rtcp/build_tools/Makefile Thu May 11 05:08:55 2006
@@ -1,5 +1,5 @@
 MENUSELECT_OBJS=menuselect.o menuselect_curses.o
-MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -I../ -I../include/
+MENUSELECT_CFLAGS=-g -c -D_GNU_SOURCE -DMENUSELECT -I../ -I../include/
 MENUSELECT_LIBS=../mxml/libmxml.a
 
 ifeq ($(OSARCH),SunOS)

Modified: team/oej/rtcp/build_tools/cflags.xml
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/build_tools/cflags.xml?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/build_tools/cflags.xml (original)
+++ team/oej/rtcp/build_tools/cflags.xml Thu May 11 05:08:55 2006
@@ -1,20 +1,20 @@
 	<category name="MENUSELECT_CFLAGS" displayname="Compiler Flags" positive_output="yes" force_clean_on_change="yes">
-		<member name="-DDEBUG_SCHEDULER">
+		<member name="DEBUG_SCHEDULER">
 		</member>
-		<member name="-DDEBUG_THREADS">
+		<member name="DEBUG_THREADS">
 		</member>
-		<member name="-DDETECT_DEADLOCKS">
+		<member name="DETECT_DEADLOCKS">
 		</member>
-		<member name="-DDUMP_SCHEDULER">
+		<member name="DUMP_SCHEDULER">
 		</member>
-		<member name="-DLOW_MEMORY">
+		<member name="LOW_MEMORY">
 		</member>
-		<member name="-DMALLOC_DEBUG">
+		<member name="MALLOC_DEBUG">
 		</member>
-		<member name="-DRADIO_RELAX">
+		<member name="RADIO_RELAX">
 		</member>
-		<member name="-DTRACE_FRAMES">
+		<member name="TRACE_FRAMES">
 		</member>
-		<member name="-DMTX_PROFILE">
+		<member name="MTX_PROFILE">
 		</member>
 	</category>

Modified: team/oej/rtcp/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/channels/chan_sip.c?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/channels/chan_sip.c (original)
+++ team/oej/rtcp/channels/chan_sip.c Thu May 11 05:08:55 2006
@@ -1024,7 +1024,7 @@
 static int ourport;
 static struct sockaddr_in debugaddr;
 
-struct ast_config *notify_types;		/*!< The list of manual NOTIFY types we know how to send */
+static struct ast_config *notify_types;		/*!< The list of manual NOTIFY types we know how to send */
 
 /*---------------------------- Forward declarations of functions in chan_sip.c */
 /*! \note Sorted up from start to build_rpid.... Will continue categorization in order to
@@ -1188,7 +1188,7 @@
 static void initialize_initreq(struct sip_pvt *p, struct sip_request *req);
 static int init_req(struct sip_request *req, int sipmethod, const char *recip);
 static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, int seqno, int newbranch);
-static int init_resp(struct sip_request *req, const char *resp, struct sip_request *orig);
+static int init_resp(struct sip_request *resp, const char *msg);
 static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg, struct sip_request *req);
 static const struct sockaddr_in *sip_real_dst(const struct sip_pvt *p);
 static void build_via(struct sip_pvt *p);
@@ -1259,6 +1259,15 @@
 	.send_text = sip_sendtext,
 };
 
+/**--- some list management macros. **/
+ 
+#define UNLINK(element, head, prev) do {	\
+	if (prev)				\
+		(prev)->next = (element)->next;	\
+	else					\
+		(head) = (element)->next;	\
+	} while (0)
+
 /*! \brief Interface structure with callbacks used to connect to RTP module */
 static struct ast_rtp_protocol sip_rtp = {
 	type: "SIP",
@@ -1716,10 +1725,7 @@
 				p->pendinginvite = 0;
 			}
 			/* this is our baby */
-			if (prev)
-				prev->next = cur->next;
-			else
-				p->packets = cur->next;
+			UNLINK(cur, p->packets, prev);
 			if (cur->retransid > -1) {
 				if (sipdebug && option_debug > 3)
 					ast_log(LOG_DEBUG, "** SIP TIMER: Cancelling retransmit of packet (reply received) Retransid #%d\n", cur->retransid);
@@ -1738,27 +1744,20 @@
 }
 
 /*! \brief Pretend to ack all packets */
+/* maybe the lock on p is not strictly necessary but there might be a race */
 static int __sip_pretend_ack(struct sip_pvt *p)
 {
 	struct sip_pkt *cur = NULL;
 
 	while (p->packets) {
+		int method;
 		if (cur == p->packets) {
 			ast_log(LOG_WARNING, "Have a packet that doesn't want to give up! %s\n", sip_methods[cur->method].text);
 			return -1;
 		}
 		cur = p->packets;
-		if (cur->method)
-			__sip_ack(p, p->packets->seqno, (ast_test_flag(p->packets, FLAG_RESPONSE)), cur->method, FALSE);
-		else {	/* Unknown packet type */
-			char *c;
-			char method[128];
-
-			ast_copy_string(method, p->packets->data, sizeof(method));
-			c = ast_skip_blanks(method); /* XXX what ? */
-			*c = '\0';
-			__sip_ack(p, p->packets->seqno, (ast_test_flag(p->packets, FLAG_RESPONSE)), find_sip_method(method), FALSE);
-		}
+		method = (cur->method) ? cur->method : find_sip_method(cur->data);
+		__sip_ack(p, cur->seqno, ast_test_flag(cur, FLAG_RESPONSE), method, FALSE);
 	}
 	return 0;
 }
@@ -2494,10 +2493,7 @@
 
 	for (prev = NULL, cur = iflist; cur; prev = cur, cur = cur->next) {
 		if (cur == p) {
-			if (prev)
-				prev->next = cur->next;
-			else
-				iflist = cur->next;
+			UNLINK(cur, iflist, prev);
 			break;
 		}
 	}
@@ -2841,7 +2837,7 @@
 				__sip_pretend_ack(p);
 
 				/* Send a new request: CANCEL */
-				transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, XMIT_RELIABLE, 0);
+				transmit_request_with_auth(p, SIP_CANCEL, p->ocseq, XMIT_RELIABLE, FALSE);
 				/* Actually don't destroy us yet, wait for the 487 on our original 
 				   INVITE, but do set an autodestruct just in case we never get it. */
 				ast_clear_flag(&locflags, SIP_NEEDDESTROY);
@@ -4385,37 +4381,31 @@
 }
 
 /*! \brief Initialize SIP response, based on SIP request */
-static int init_resp(struct sip_request *req, const char *resp, struct sip_request *orig)
+static int init_resp(struct sip_request *resp, const char *msg)
 {
 	/* Initialize a response */
-	if (req->headers || req->len) {
-		ast_log(LOG_WARNING, "Request already initialized?!?\n");
-		return -1;
-	}
-	req->method = SIP_RESPONSE;
-	req->header[req->headers] = req->data + req->len;
-	snprintf(req->header[req->headers], sizeof(req->data) - req->len, "SIP/2.0 %s\r\n", resp);
-	req->len += strlen(req->header[req->headers]);
+	memset(resp, 0, sizeof(*resp));
+	resp->method = SIP_RESPONSE;
+	resp->header[0] = resp->data;
+	snprintf(resp->header[0], sizeof(resp->data), "SIP/2.0 %s\r\n", msg);
+	resp->len = strlen(resp->header[0]);
+	resp->headers++;
+	return 0;
+}
+
+/*! \brief Initialize SIP request */
+static int init_req(struct sip_request *req, int sipmethod, const char *recip)
+{
+	/* Initialize a request */
+	memset(req, 0, sizeof(*req));
+        req->method = sipmethod;
+	req->header[0] = req->data;
+	snprintf(req->header[0], sizeof(req->data), "%s %s SIP/2.0\r\n", sip_methods[sipmethod].text, recip);
+	req->len = strlen(req->header[0]);
 	req->headers++;
 	return 0;
 }
 
-/*! \brief Initialize SIP request */
-static int init_req(struct sip_request *req, int sipmethod, const char *recip)
-{
-	/* Initialize a response */
-	if (req->headers || req->len) {
-		ast_log(LOG_WARNING, "Request already initialized?!?\n");
-		return -1;
-	}
-	req->header[req->headers] = req->data + req->len;
-	snprintf(req->header[req->headers], sizeof(req->data) - req->len, "%s %s SIP/2.0\r\n", sip_methods[sipmethod].text, recip);
-	req->len += strlen(req->header[req->headers]);
-	req->headers++;
-	req->method = sipmethod;
-	return 0;
-}
-
 
 /*! \brief Prepare SIP response packet */
 static int respprep(struct sip_request *resp, struct sip_pvt *p, const char *msg, struct sip_request *req)
@@ -4423,8 +4413,7 @@
 	char newto[256];
 	const char *ot;
 
-	memset(resp, 0, sizeof(*resp));
-	init_resp(resp, msg, req);
+	init_resp(resp, msg);
 	copy_via_headers(p, resp, req, "Via");
 	if (msg[0] == '2')
 		copy_all_header(resp, req, "Record-Route");
@@ -5294,7 +5283,6 @@
 		snprintf(to, sizeof(to), "<%s>", p->uri);
 	}
 	
-	memset(req, 0, sizeof(struct sip_request));
 	init_req(req, sipmethod, p->uri);
 	snprintf(tmp, sizeof(tmp), "%d %s", ++p->ocseq, sip_methods[sipmethod].text);
 
@@ -5882,7 +5870,6 @@
 
 	p->branch ^= ast_random();
 
-	memset(&req, 0, sizeof(req));
 	init_req(&req, sipmethod, addr);
 
 	/* Add to CSEQ */
@@ -6814,6 +6801,9 @@
 				switch (parse_register_contact(p, peer, req)) {
 				case PARSE_REGISTER_FAILED:
 					ast_log(LOG_WARNING, "Failed to parse contact info\n");
+					transmit_response_with_date(p, "400 Bad Request", req);
+					peer->lastmsgssent = -1;
+					res = 0;
 					break;
 				case PARSE_REGISTER_QUERY:
 					transmit_response_with_date(p, "200 OK", req);
@@ -6837,11 +6827,13 @@
 		peer = temp_peer(name);
 		if (peer) {
 			ASTOBJ_CONTAINER_LINK(&peerl, peer);
-			peer->lastmsgssent = -1;
 			sip_cancel_destroy(p);
 			switch (parse_register_contact(p, peer, req)) {
 			case PARSE_REGISTER_FAILED:
 				ast_log(LOG_WARNING, "Failed to parse contact info\n");
+				transmit_response_with_date(p, "400 Bad Request", req);
+				peer->lastmsgssent = -1;
+				res = 0;
 				break;
 			case PARSE_REGISTER_QUERY:
 				transmit_response_with_date(p, "200 OK", req);
@@ -9932,7 +9924,7 @@
 {
 	/* Go ahead and send bye at this point */
 	if (ast_test_flag(&p->flags[0], SIP_PENDINGBYE)) {
-		transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
+		transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, TRUE);
 		ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
 		ast_clear_flag(&p->flags[0], SIP_NEEDREINVITE);	
 	} else if (ast_test_flag(&p->flags[0], SIP_NEEDREINVITE)) {
@@ -10044,13 +10036,13 @@
 				ast_set_flag(&p->flags[0], SIP_PENDINGBYE);	
 		}
 		/* If I understand this right, the branch is different for a non-200 ACK only */
-		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 1);
+		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, TRUE);
 		check_pendings(p);
 		break;
 	case 407: /* Proxy authentication */
 	case 401: /* Www auth */
 		/* First we ACK */
-		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 0);
+		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		if (p->options)
 			p->options->auth_type = (resp == 401 ? WWW_AUTH : PROXY_AUTH);
 
@@ -10070,7 +10062,7 @@
 		break;
 	case 403: /* Forbidden */
 		/* First we ACK */
-		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 0);
+		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		ast_log(LOG_WARNING, "Received response: \"Forbidden\" from '%s'\n", get_header(&p->initreq, "From"));
 		if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner)
 			ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
@@ -10078,7 +10070,7 @@
 		ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
 		break;
 	case 404: /* Not found */
-		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 0);
+		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		if (p->owner && !ast_test_flag(req, SIP_PKT_IGNORE))
 			ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
 		ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
@@ -10086,7 +10078,7 @@
 	case 481: /* Call leg does not exist */
 		/* Could be REFER or INVITE */
 		ast_log(LOG_WARNING, "Re-invite to non-existing call leg on other UA. SIP dialog '%s'. Giving up.\n", p->callid);
-		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 0);
+		transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 		break;
 	case 491: /* Pending */
 		/* we have to wait a while, then retransmit */
@@ -10454,7 +10446,7 @@
 		case 481: /* Call leg does not exist */
 			if (sipmethod == SIP_INVITE) {
 				/* First we ACK */
-				transmit_request(p, SIP_ACK, seqno, 0, 0);
+				transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 					ast_log(LOG_WARNING, "INVITE with REPLACEs failed to '%s'\n", get_header(&p->initreq, "From"));
 				if (owner)
 					ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
@@ -10567,7 +10559,7 @@
 				}
 				/* ACK on invite */
 				if (sipmethod == SIP_INVITE) 
-					transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, 0);
+					transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
 				ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
 				if (!p->owner)
 					ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);	
@@ -11423,7 +11415,7 @@
 			transmit_notify_with_sipfrag(p, seqno, "200 OK", 1);
 			/* Always increment on a BYE */
 			if (!nobye) {
-				transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, 1);
+				transmit_request_with_auth(p, SIP_BYE, 0, XMIT_RELIABLE, TRUE);
 				ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
 			}
 		}
@@ -11436,6 +11428,14 @@
 		
 	check_via(p, req);
 	ast_set_flag(&p->flags[0], SIP_ALREADYGONE);	
+	
+	if (p->owner && p->owner->_state == AST_STATE_UP) {
+		/* This call is up, cancel is ignored, we need a bye */
+		transmit_response(p, "200 OK", req);
+		if (option_debug)
+			ast_log(LOG_DEBUG, "Got CANCEL on an answered call. Ignoring... \n");
+		return 0;
+	}
 	if (p->rtp) {
 		/* Immediately stop RTP */
 		ast_rtp_stop(p->rtp);
@@ -12821,6 +12821,7 @@
 	ast_copy_flags(&user->flags[1], &global_flags[1], SIP_PAGE2_FLAGS_TO_COPY);
 	user->capability = global_capability;
 	user->allowtransfer = global_allowtransfer;
+	user->maxcallbitrate = default_maxcallbitrate;
 	user->prefs = default_prefs;
 	/* set default context */
 	strcpy(user->context, default_context);

Modified: team/oej/rtcp/configure.ac
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/configure.ac?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/configure.ac (original)
+++ team/oej/rtcp/configure.ac Thu May 11 05:08:55 2006
@@ -111,6 +111,10 @@
 AC_GNU_SOURCE
 
 AH_TOP(
+#ifndef MENUSELECT
+#include "asterisk/buildopts.h"
+#endif
+
 #ifndef _REENTRANT
 #define _REENTRANT
 #endif

Modified: team/oej/rtcp/enum.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/enum.c?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/enum.c (original)
+++ team/oej/rtcp/enum.c Thu May 11 05:08:55 2006
@@ -95,7 +95,7 @@
 } __attribute__ ((__packed__));
 
 /*! \brief Parse NAPTR record information elements */
-static int parse_ie(char *data, int maxdatalen, char *src, int srclen)
+static int parse_ie(unsigned char *data, int maxdatalen, unsigned char *src, int srclen)
 {
 	int len, olen;
 
@@ -113,7 +113,7 @@
 }
 
 /*! \brief Parse DNS NAPTR record used in ENUM ---*/
-static int parse_naptr(char *dst, int dstsize, char *tech, int techsize, char *answer, int len, char *naptrinput)
+static int parse_naptr(unsigned char *dst, int dstsize, char *tech, int techsize, unsigned char *answer, int len, unsigned char *naptrinput)
 {
 
 	char tech_return[80];

Modified: team/oej/rtcp/include/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/include/autoconfig.h.in?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/include/autoconfig.h.in (original)
+++ team/oej/rtcp/include/autoconfig.h.in Thu May 11 05:08:55 2006
@@ -1,4 +1,8 @@
 /* include/autoconfig.h.in.  Generated from configure.ac by autoheader.  */
+
+#ifndef MENUSELECT
+#include "asterisk/buildopts.h"
+#endif
 
 #ifndef _REENTRANT
 #define _REENTRANT

Modified: team/oej/rtcp/rtp.c
URL: http://svn.digium.com/view/asterisk/team/oej/rtcp/rtp.c?rev=26839&r1=26838&r2=26839&view=diff
==============================================================================
--- team/oej/rtcp/rtp.c (original)
+++ team/oej/rtcp/rtp.c Thu May 11 05:08:55 2006
@@ -116,6 +116,7 @@
 	unsigned char rawdata[8192 + AST_FRIENDLY_OFFSET];
 	unsigned int ssrc;		/*!< Synchronization source, RFC 3550, page 10. */
 	unsigned int themssrc;			/* Their SSRC */
+	unsigned int rxssrc;
 	unsigned int lastts;
 	unsigned int lastdigitts;
 	unsigned int lastrxts;
@@ -668,6 +669,7 @@
 	int ext;
 	int x;
 	char iabuf[INET_ADDRSTRLEN];
+	unsigned int ssrc;
 	unsigned int timestamp;
 	unsigned int *rtpheader;
 	struct rtpPayloadType rtpPT;
@@ -728,6 +730,14 @@
 	ext = seqno & (1 << 28);
 	seqno &= 0xffff;
 	timestamp = ntohl(rtpheader[1]);
+	ssrc = ntohl(rtpheader[2]);
+	
+	if (!mark && rtp->rxssrc && rtp->rxssrc != ssrc) {
+		ast_log(LOG_WARNING, "Forcing Marker bit, because SSRC has changed\n");
+		mark = 1;
+	}
+
+	rtp->rxssrc = ssrc;
 	
 	if (padding) {
 		/* Remove padding bytes */



More information about the asterisk-commits mailing list