[Asterisk-cvs] asterisk/channels chan_sip.c,1.362,1.363

markster at lists.digium.com markster at lists.digium.com
Mon May 3 15:58:38 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv23555/channels

Modified Files:
	chan_sip.c 
Log Message:
Don't update route once it's set (bug #1491)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.362
retrieving revision 1.363
diff -u -d -r1.362 -r1.363
--- chan_sip.c	3 May 2004 05:14:52 -0000	1.362
+++ chan_sip.c	3 May 2004 20:06:38 -0000	1.363
@@ -253,6 +253,7 @@
 	char refer_contact[AST_MAX_EXTENSION];/* Place to store Contact info from a REFER extension */
 	struct sip_pvt *refer_call;			/* Call we are referring */
 	struct sip_route *route;			/* Head of linked list of routing steps (fm Record-Route) */
+	int route_persistant;				/* Is this the "real" route? */
 	char remote_party_id[256];
 	char from[256];
 	char context[AST_MAX_EXTENSION];
@@ -3747,10 +3748,19 @@
 	int len;
 	char *rr, *contact, *c;
 
+	/* Once a persistant route is set, don't fool with it */
+	if (p->route && p->route_persistant) {
+		ast_log(LOG_DEBUG, "build_route: Retaining previous route: <%s>\n", p->route->hop);
+		return;
+	}
+
 	if (p->route) {
 		free_old_route(p->route);
 		p->route = NULL;
 	}
+	
+	p->route_persistant = backwards;
+	
 	/* We build up head, then assign it to p->route when we're done */
 	head = NULL;  tail = head;
 	/* 1st we pass through all the hops in any Record-Route headers */




More information about the svn-commits mailing list