Browse code

Proper printing of contacts in 3xx responses

Jan Janak authored on 18/06/2004 11:10:56
Showing 1 changed files
... ...
@@ -404,12 +404,22 @@ static int _reply( struct cell *trans, struct sip_msg* p_msg,
404 404
 	unsigned int code, char * text, int lock )
405 405
 {
406 406
 	unsigned int len;
407
-	char * buf;
407
+	char* buf, *dset;
408 408
 	struct bookmark bm;
409
+	int dset_len;
409 410
 
410 411
 	if (code>=200) set_kr(REQ_RPLD);
411 412
 	/* compute the buffer in private memory prior to entering lock;
412 413
 	 * create to-tag if needed */
414
+
415
+	     /* if that is a redirection message, dump current message set to it */
416
+	if (code>=300 && code<400) {
417
+		dset=print_dset(p_msg, &dset_len);
418
+		if (dset) {
419
+			add_lump_rpl(p_msg, dset, dset_len, LUMP_RPL_HDR);
420
+		}
421
+	}
422
+	
413 423
 	if (code>=180 && p_msg->to 
414 424
 				&& (get_to(p_msg)->tag_value.s==0 
415 425
 			    || get_to(p_msg)->tag_value.len==0)) {