Browse code

The list of branches is turned into the list of contacts and appended to 3xx replies.

Jan Janak authored on 23/04/2004 15:17:30
Showing 1 changed files
... ...
@@ -433,12 +433,22 @@ static int _reply( struct cell *trans, struct sip_msg* p_msg,
433 433
 	unsigned int code, char * text, int lock )
434 434
 {
435 435
 	unsigned int len;
436
-	char * buf;
436
+	char * buf, *dset;
437 437
 	struct bookmark bm;
438
+	int dset_len;
438 439
 
439 440
 	if (code>=200) set_kr(REQ_RPLD);
440 441
 	/* compute the buffer in private memory prior to entering lock;
441 442
 	 * create to-tag if needed */
443
+
444
+	/* if that is a redirection message, dump current message set to it */
445
+	if (code>=300 && code<400) {
446
+		dset=print_dset(p_msg, &dset_len);
447
+		if (dset) {
448
+			add_lump_rpl(p_msg, dset, dset_len, LUMP_RPL_HDR);
449
+		}
450
+	}
451
+
442 452
 	if (code>=180 && p_msg->to 
443 453
 				&& (get_to(p_msg)->tag_value.s==0 
444 454
 			    || get_to(p_msg)->tag_value.len==0)) {