Просмотр исходного кода

Temporarily backout addition of Server header field parser until decision
is adapted on how to overcome current limit of max 32 headers. Just for the
record, I think that the easiest way out is to increase flags storage size
from 32bits to 64bits, which should be sufficiend at least for the next
year.

Requested by: Andrei Pelinescu-Onciul <[email protected]>

Maxim Sobolev 20 лет назад
Родитель
Сommit
b52b69c887
6 измененных файлов с 4 добавлено и 18 удалено
  1. 2 5
      parser/hf.c
  2. 1 2
      parser/hf.h
  3. 0 2
      parser/keys.h
  4. 0 5
      parser/msg_parser.c
  5. 0 1
      parser/msg_parser.h
  6. 1 3
      parser/parse_hname2.c

+ 2 - 5
parser/hf.c

@@ -130,10 +130,10 @@ void clean_hdr_field(struct hdr_field* hf)
 
 		case HDR_ACCEPTLANGUAGE:
 			break;
-
+			
 		case HDR_ORGANIZATION:
 			break;
-
+			
 		case HDR_PRIORITY:
 			break;
 
@@ -158,9 +158,6 @@ void clean_hdr_field(struct hdr_field* hf)
 			free_to(hf->parsed);
 			break;
 
-		case HDR_SERVER:
-			break;
-
 		default:
 			LOG(L_CRIT, "BUG: clean_hdr_field: unknown header type %d\n",
 			    hf->type);

+ 1 - 2
parser/hf.h

@@ -73,8 +73,7 @@
 #define HDR_CONTENTDISPOSITION (1 << 27)  /* Content-Disposition hdr field */
 #define HDR_DIVERSION          (1 << 28)  /* Diversion header field */
 #define HDR_RPID               (1 << 29)  /* Remote-Party-ID header field */
-#define HDR_SERVER             (1 << 30)  /* Server header field */
-#define HDR_OTHER              (1 << 31)  /* Some other header field */
+#define HDR_OTHER              (1 << 30)  /* Some other header field */
 
 
 /* returns true if the header links allocated memory on parse field */

+ 0 - 2
parser/keys.h

@@ -116,8 +116,6 @@
 #define _ispo_ 0x6f707369   /* "ispo" */
 #define _siti_ 0x69746973   /* "siti" */
 
-#define _serv_ 0x76726573   /* "serv" */
-
 #define _dive_ 0x65766964   /* "dive" */
 #define _rsio_ 0x6f697372   /* "rsio" */
 

+ 0 - 5
parser/msg_parser.c

@@ -204,7 +204,6 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
 	        case HDR_ACCEPTDISPOSITION:
 	        case HDR_DIVERSION:
 	        case HDR_RPID:
-	        case HDR_SERVER:
 		case HDR_OTHER:
 			/* just skip over it */
 			hdr->body.s=tmp;
@@ -408,10 +407,6 @@ int parse_headers(struct sip_msg* msg, int flags, int next)
 				if (msg->rpid==0) msg->rpid = hf;
 				msg->parsed_flag|=HDR_RPID;
 				break;
-		        case HDR_SERVER:
-				if (msg->server==0) msg->server = hf;
-				msg->parsed_flag|=HDR_SERVER;
-				break;
 			case HDR_VIA:
 				msg->parsed_flag|=HDR_VIA;
 				DBG("parse_headers: Via found, flags=%d\n", flags);

+ 0 - 1
parser/msg_parser.h

@@ -193,7 +193,6 @@ struct sip_msg {
 	struct hdr_field* accept_disposition;
 	struct hdr_field* diversion;
 	struct hdr_field* rpid;
-	struct hdr_field* server;
 
 	char* eoh;        /* pointer to the end of header (if found) or null */
 	char* unparsed;   /* here we stopped parsing*/

+ 1 - 3
parser/parse_hname2.c

@@ -84,7 +84,6 @@ static inline char* skip_ws(char* p, unsigned int size)
 #include "case_supp.h"     /* Supported */
 #include "case_dive.h"     /* Diversion */
 #include "case_remo.h"     /* Remote-Party-ID */
-#include "case_serv.h"     /* Server */
 
 
 #define READ(val) \
@@ -115,8 +114,7 @@ static inline char* skip_ws(char* p, unsigned int size)
         case _subj_: subj_CASE; \
         case _user_: user_CASE; \
         case _dive_: dive_CASE; \
-        case _remo_: remo_CASE; \
-        case _serv_: serv_CASE;
+        case _remo_: remo_CASE;
 
 
 #define PARSE_COMPACT(id)          \