Browse code

- added maxforwards support to sip_msg & parse_headers.

Andrei Pelinescu-Onciul authored on 22/01/2002 16:27:50
Showing 2 changed files
... ...
@@ -591,7 +591,11 @@ int parse_headers(struct sip_msg* msg, int flags)
591 591
 				if (msg->contact==0) msg->contact=hf;
592 592
 				msg->parsed_flag|=HDR_CONTACT;
593 593
 				break;
594
-		        case HDR_ROUTE:
594
+			case HDR_MAXFORWARDS:
595
+				if(msg->maxforwards==0) msg->maxforwards=hf;
596
+				msg->parsed_flag|=HDR_MAXFORWARDS;
597
+				break;
598
+			case HDR_ROUTE:
595 599
 				if (msg->route==0) msg->route=hf;
596 600
 				msg->parsed_flag|=HDR_ROUTE;
597 601
 				break;
... ...
@@ -157,7 +157,8 @@ 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
+	struct hdr_field* maxforwards;
161
+	struct hdr_field* route;
161 162
 	char* eoh; /* pointer to the end of header (if found) or null */
162 163
 
163 164
 	char* unparsed; /* here we stopped parsing*/