Browse Source

Added missing parts for Route HF.

Jan Janak 24 years ago
parent
commit
7ff8b055bd
2 changed files with 6 additions and 0 deletions
  1. 5 0
      msg_parser.c
  2. 1 0
      msg_parser.h

+ 5 - 0
msg_parser.c

@@ -249,6 +249,7 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
 		case HDR_FROM:
 		case HDR_CALLID:
 		case HDR_CONTACT:
+	        case HDR_ROUTE:   /* janakj, HDR_ROUTE was missing here */
 		case HDR_OTHER:
 			/* just skip over it */
 			hdr->body.s=tmp;
@@ -589,6 +590,10 @@ int parse_headers(struct sip_msg* msg, int flags)
 				if (msg->contact==0) msg->contact=hf;
 				msg->parsed_flag|=HDR_CONTACT;
 				break;
+		        case HDR_ROUTE:
+				if (msg->route==0) msg->route=hf;
+				msg->parsed_flag|=HDR_ROUTE;
+				break;
 			case HDR_VIA:
 				msg->parsed_flag|=HDR_VIA;
 				DBG("parse_headers: Via1 found, flags=%d\n", flags);

+ 1 - 0
msg_parser.h

@@ -157,6 +157,7 @@ struct sip_msg{
 	struct hdr_field* cseq;
 	struct hdr_field* from;
 	struct hdr_field* contact;
+	struct hdr_field* route;    /* janakj, was missing here */
 	char* eoh; /* pointer to the end of header (if found) or null */
 
 	char* unparsed; /* here we stopped parsing*/