Browse Source

parser: removed accept_disposition hdr hook from sip_msg_t

- it was not used at all, just hooked and cloned for no good reason
Daniel-Constantin Mierla 13 years ago
parent
commit
0700573b50
6 changed files with 0 additions and 50 deletions
  1. 0 35
      parser/case_acce.h
  2. 0 1
      parser/hf.c
  3. 0 2
      parser/hf.h
  4. 0 5
      parser/msg_parser.c
  5. 0 1
      parser/msg_parser.h
  6. 0 6
      sip_msg_clone.c

+ 0 - 35
parser/case_acce.h

@@ -56,36 +56,6 @@
 	}
 
 
-#define on_CASE                                            \
-        if (LOWER_BYTE(*p) == 'o') {                       \
-                p++;                                       \
-                if (LOWER_BYTE(*p) == 'n') {               \
-                        hdr->type = HDR_ACCEPTDISPOSITION_T; \
-                        p++;                               \
-                        goto dc_end;                       \
-                }                                          \
-        }
-
-
-#define siti_CASE                  \
-        switch(LOWER_DWORD(val)) { \
-        case _siti_:               \
-                p += 4;            \
-                val = READ(p);     \
-                on_CASE;           \
-                goto other;        \
-        }
-
-
-#define ispo_CASE                  \
-        switch(LOWER_DWORD(val)) { \
-        case _ispo_:               \
-                p += 4;            \
-                val = READ(p);     \
-                siti_CASE;         \
-                goto other;        \
-        }
-
 #define accept_contact_ct_CASE                             \
         if (LOWER_BYTE(*p) == 'c') {                       \
                 p++;                                       \
@@ -114,11 +84,6 @@
 		angu_CASE;         \
 		goto other;        \
                                    \
-        case _pt_d_:               \
-                p += 4;            \
-                val = READ(p);     \
-                ispo_CASE;         \
-                goto other;        \
         case _pt_c_:               \
                 p += 4;            \
                 val = READ(p);     \

+ 0 - 1
parser/hf.c

@@ -190,7 +190,6 @@ void clean_hdr_field(struct hdr_field* hf)
 		case HDR_SUBJECT_T:
 		case HDR_USERAGENT_T:
 		case HDR_SERVER_T:
-		case HDR_ACCEPTDISPOSITION_T:
 		case HDR_MIN_SE_T:
 		case HDR_ACCEPTCONTACT_T:
 		case HDR_ALLOWEVENTS_T:

+ 0 - 2
parser/hf.h

@@ -95,7 +95,6 @@ enum _hdr_types_t {
 	HDR_SUBJECT_T				       /*!< Subject header field */,
 	HDR_USERAGENT_T				       /*!< User-Agent header field */,
 	HDR_SERVER_T				       /*!< Server header field */,
-	HDR_ACCEPTDISPOSITION_T		       /*!< Accept-Disposition hdr field */,
 	HDR_CONTENTDISPOSITION_T	       /*!< Content-Disposition hdr field */,
 	HDR_DIVERSION_T				       /*!< Diversion header field */,
 	HDR_RPID_T					       /*!< Remote-Party-ID header field */,
@@ -168,7 +167,6 @@ typedef unsigned long long hdr_flags_t;
 #define HDR_SUBJECT_F				HDR_F_DEF(SUBJECT)
 #define HDR_USERAGENT_F				HDR_F_DEF(USERAGENT)
 #define HDR_SERVER_F				HDR_F_DEF(SERVER)
-#define HDR_ACCEPTDISPOSITION_F		HDR_F_DEF(ACCEPTDISPOSITION)
 #define HDR_CONTENTDISPOSITION_F	HDR_F_DEF(CONTENTDISPOSITION)
 #define HDR_DIVERSION_F				HDR_F_DEF(DIVERSION)
 #define HDR_RPID_F					HDR_F_DEF(RPID)

+ 0 - 5
parser/msg_parser.c

@@ -239,7 +239,6 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
 		case HDR_USERAGENT_T:
 		case HDR_SERVER_T:
 		case HDR_CONTENTDISPOSITION_T:
-		case HDR_ACCEPTDISPOSITION_T:
 		case HDR_DIVERSION_T:
 		case HDR_RPID_T:
 		case HDR_SIPIFMATCH_T:
@@ -481,10 +480,6 @@ int parse_headers(struct sip_msg* msg, hdr_flags_t flags, int next)
 				if (msg->content_disposition==0) msg->content_disposition = hf;
 				msg->parsed_flag|=HDR_CONTENTDISPOSITION_F;
 				break;
-			case HDR_ACCEPTDISPOSITION_T:
-				if (msg->accept_disposition==0) msg->accept_disposition = hf;
-				msg->parsed_flag|=HDR_ACCEPTDISPOSITION_F;
-				break;
 			case HDR_DIVERSION_T:
 				if (msg->diversion==0) msg->diversion = hf;
 				msg->parsed_flag|=HDR_DIVERSION_F;

+ 0 - 1
parser/msg_parser.h

@@ -298,7 +298,6 @@ typedef struct sip_msg {
 	struct hdr_field* user_agent;
 	struct hdr_field* server;
 	struct hdr_field* content_disposition;
-	struct hdr_field* accept_disposition;
 	struct hdr_field* diversion;
 	struct hdr_field* rpid;
 	struct hdr_field* refer_to;

+ 0 - 6
sip_msg_clone.c

@@ -463,7 +463,6 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
 		case HDR_SUBJECT_T:
 		case HDR_USERAGENT_T:
 		case HDR_SERVER_T:
-		case HDR_ACCEPTDISPOSITION_T:
 		case HDR_CONTENTDISPOSITION_T:
 		case HDR_DIVERSION_T:
 		case HDR_RPID_T:
@@ -836,11 +835,6 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
 				new_msg->server = new_hdr;
 			}
 			break;
-		case HDR_ACCEPTDISPOSITION_T:
-			if (!HOOK_SET(accept_disposition)) {
-				new_msg->accept_disposition = new_hdr;
-			}
-			break;
 		case HDR_CONTENTDISPOSITION_T:
 			if (!HOOK_SET(content_disposition)) {
 				new_msg->content_disposition = new_hdr;