Browse code

Added missing parts for Route HF.

Jan Janak authored on 16/01/2002 10:57:02
Showing 2 changed files
... ...
@@ -249,6 +249,7 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
249 249
 		case HDR_FROM:
250 250
 		case HDR_CALLID:
251 251
 		case HDR_CONTACT:
252
+	        case HDR_ROUTE:   /* janakj, HDR_ROUTE was missing here */
252 253
 		case HDR_OTHER:
253 254
 			/* just skip over it */
254 255
 			hdr->body.s=tmp;
... ...
@@ -589,6 +590,10 @@ int parse_headers(struct sip_msg* msg, int flags)
589 590
 				if (msg->contact==0) msg->contact=hf;
590 591
 				msg->parsed_flag|=HDR_CONTACT;
591 592
 				break;
593
+		        case HDR_ROUTE:
594
+				if (msg->route==0) msg->route=hf;
595
+				msg->parsed_flag|=HDR_ROUTE;
596
+				break;
592 597
 			case HDR_VIA:
593 598
 				msg->parsed_flag|=HDR_VIA;
594 599
 				DBG("parse_headers: Via1 found, flags=%d\n", flags);
... ...
@@ -157,6 +157,7 @@ struct sip_msg{
157 157
 	struct hdr_field* cseq;
158 158
 	struct hdr_field* from;
159 159
 	struct hdr_field* contact;
160
+	struct hdr_field* route;    /* janakj, was missing here */
160 161
 	char* eoh; /* pointer to the end of header (if found) or null */
161 162
 
162 163
 	char* unparsed; /* here we stopped parsing*/