Browse code

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 authored on 18/04/2012 12:03:10
Showing 6 changed files
... ...
@@ -56,36 +56,6 @@
56 56
 	}
57 57
 
58 58
 
59
-#define on_CASE                                            \
60
-        if (LOWER_BYTE(*p) == 'o') {                       \
61
-                p++;                                       \
62
-                if (LOWER_BYTE(*p) == 'n') {               \
63
-                        hdr->type = HDR_ACCEPTDISPOSITION_T; \
64
-                        p++;                               \
65
-                        goto dc_end;                       \
66
-                }                                          \
67
-        }
68
-
69
-
70
-#define siti_CASE                  \
71
-        switch(LOWER_DWORD(val)) { \
72
-        case _siti_:               \
73
-                p += 4;            \
74
-                val = READ(p);     \
75
-                on_CASE;           \
76
-                goto other;        \
77
-        }
78
-
79
-
80
-#define ispo_CASE                  \
81
-        switch(LOWER_DWORD(val)) { \
82
-        case _ispo_:               \
83
-                p += 4;            \
84
-                val = READ(p);     \
85
-                siti_CASE;         \
86
-                goto other;        \
87
-        }
88
-
89 59
 #define accept_contact_ct_CASE                             \
90 60
         if (LOWER_BYTE(*p) == 'c') {                       \
91 61
                 p++;                                       \
... ...
@@ -114,11 +84,6 @@
114 114
 		angu_CASE;         \
115 115
 		goto other;        \
116 116
                                    \
117
-        case _pt_d_:               \
118
-                p += 4;            \
119
-                val = READ(p);     \
120
-                ispo_CASE;         \
121
-                goto other;        \
122 117
         case _pt_c_:               \
123 118
                 p += 4;            \
124 119
                 val = READ(p);     \
... ...
@@ -190,7 +190,6 @@ void clean_hdr_field(struct hdr_field* hf)
190 190
 		case HDR_SUBJECT_T:
191 191
 		case HDR_USERAGENT_T:
192 192
 		case HDR_SERVER_T:
193
-		case HDR_ACCEPTDISPOSITION_T:
194 193
 		case HDR_MIN_SE_T:
195 194
 		case HDR_ACCEPTCONTACT_T:
196 195
 		case HDR_ALLOWEVENTS_T:
... ...
@@ -95,7 +95,6 @@ enum _hdr_types_t {
95 95
 	HDR_SUBJECT_T				       /*!< Subject header field */,
96 96
 	HDR_USERAGENT_T				       /*!< User-Agent header field */,
97 97
 	HDR_SERVER_T				       /*!< Server header field */,
98
-	HDR_ACCEPTDISPOSITION_T		       /*!< Accept-Disposition hdr field */,
99 98
 	HDR_CONTENTDISPOSITION_T	       /*!< Content-Disposition hdr field */,
100 99
 	HDR_DIVERSION_T				       /*!< Diversion header field */,
101 100
 	HDR_RPID_T					       /*!< Remote-Party-ID header field */,
... ...
@@ -168,7 +167,6 @@ typedef unsigned long long hdr_flags_t;
168 168
 #define HDR_SUBJECT_F				HDR_F_DEF(SUBJECT)
169 169
 #define HDR_USERAGENT_F				HDR_F_DEF(USERAGENT)
170 170
 #define HDR_SERVER_F				HDR_F_DEF(SERVER)
171
-#define HDR_ACCEPTDISPOSITION_F		HDR_F_DEF(ACCEPTDISPOSITION)
172 171
 #define HDR_CONTENTDISPOSITION_F	HDR_F_DEF(CONTENTDISPOSITION)
173 172
 #define HDR_DIVERSION_F				HDR_F_DEF(DIVERSION)
174 173
 #define HDR_RPID_F					HDR_F_DEF(RPID)
... ...
@@ -239,7 +239,6 @@ char* get_hdr_field(char* buf, char* end, struct hdr_field* hdr)
239 239
 		case HDR_USERAGENT_T:
240 240
 		case HDR_SERVER_T:
241 241
 		case HDR_CONTENTDISPOSITION_T:
242
-		case HDR_ACCEPTDISPOSITION_T:
243 242
 		case HDR_DIVERSION_T:
244 243
 		case HDR_RPID_T:
245 244
 		case HDR_SIPIFMATCH_T:
... ...
@@ -481,10 +480,6 @@ int parse_headers(struct sip_msg* msg, hdr_flags_t flags, int next)
481 481
 				if (msg->content_disposition==0) msg->content_disposition = hf;
482 482
 				msg->parsed_flag|=HDR_CONTENTDISPOSITION_F;
483 483
 				break;
484
-			case HDR_ACCEPTDISPOSITION_T:
485
-				if (msg->accept_disposition==0) msg->accept_disposition = hf;
486
-				msg->parsed_flag|=HDR_ACCEPTDISPOSITION_F;
487
-				break;
488 484
 			case HDR_DIVERSION_T:
489 485
 				if (msg->diversion==0) msg->diversion = hf;
490 486
 				msg->parsed_flag|=HDR_DIVERSION_F;
... ...
@@ -298,7 +298,6 @@ typedef struct sip_msg {
298 298
 	struct hdr_field* user_agent;
299 299
 	struct hdr_field* server;
300 300
 	struct hdr_field* content_disposition;
301
-	struct hdr_field* accept_disposition;
302 301
 	struct hdr_field* diversion;
303 302
 	struct hdr_field* rpid;
304 303
 	struct hdr_field* refer_to;
... ...
@@ -463,7 +463,6 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
463 463
 		case HDR_SUBJECT_T:
464 464
 		case HDR_USERAGENT_T:
465 465
 		case HDR_SERVER_T:
466
-		case HDR_ACCEPTDISPOSITION_T:
467 466
 		case HDR_CONTENTDISPOSITION_T:
468 467
 		case HDR_DIVERSION_T:
469 468
 		case HDR_RPID_T:
... ...
@@ -836,11 +835,6 @@ struct sip_msg*  sip_msg_shm_clone( struct sip_msg *org_msg, int *sip_msg_len,
836 836
 				new_msg->server = new_hdr;
837 837
 			}
838 838
 			break;
839
-		case HDR_ACCEPTDISPOSITION_T:
840
-			if (!HOOK_SET(accept_disposition)) {
841
-				new_msg->accept_disposition = new_hdr;
842
-			}
843
-			break;
844 839
 		case HDR_CONTENTDISPOSITION_T:
845 840
 			if (!HOOK_SET(content_disposition)) {
846 841
 				new_msg->content_disposition = new_hdr;