[sr-dev] git:master: parser: removed accept_disposition hdr hook from sip_msg_t

Daniel-Constantin Mierla miconda at gmail.com
Wed Apr 18 20:03:08 CEST 2012


Module: sip-router
Branch: master
Commit: 0700573b500da94ca839c09f7c1f68768448114b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0700573b500da94ca839c09f7c1f68768448114b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Apr 18 14:03:10 2012 +0200

parser: removed accept_disposition hdr hook from sip_msg_t

- it was not used at all, just hooked and cloned for no good reason

---

 parser/case_acce.h  |   35 -----------------------------------
 parser/hf.c         |    1 -
 parser/hf.h         |    2 --
 parser/msg_parser.c |    5 -----
 parser/msg_parser.h |    1 -
 sip_msg_clone.c     |    6 ------
 6 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/parser/case_acce.h b/parser/case_acce.h
index 86750b5..a57ad9d 100644
--- a/parser/case_acce.h
+++ b/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);     \
diff --git a/parser/hf.c b/parser/hf.c
index 4d6de0b..4cf15a0 100644
--- a/parser/hf.c
+++ b/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:
diff --git a/parser/hf.h b/parser/hf.h
index a373836..83a9d3f 100644
--- a/parser/hf.h
+++ b/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)
diff --git a/parser/msg_parser.c b/parser/msg_parser.c
index fdbbd09..29495d9 100644
--- a/parser/msg_parser.c
+++ b/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;
diff --git a/parser/msg_parser.h b/parser/msg_parser.h
index 593c4b4..c633fed 100644
--- a/parser/msg_parser.h
+++ b/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;
diff --git a/sip_msg_clone.c b/sip_msg_clone.c
index 5d859db..28933b2 100644
--- a/sip_msg_clone.c
+++ b/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;




More information about the sr-dev mailing list