parser: removed accept_disposition hdr hook from sip_msg_t
authorDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 18 Apr 2012 12:03:10 +0000 (14:03 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Wed, 18 Apr 2012 17:58:45 +0000 (19:58 +0200)
- it was not used at all, just hooked and cloned for no good reason

parser/case_acce.h
parser/hf.c
parser/hf.h
parser/msg_parser.c
parser/msg_parser.h
sip_msg_clone.c

index 86750b5..a57ad9d 100644 (file)
        }
 
 
-#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++;                                       \
                angu_CASE;         \
                goto other;        \
                                    \
-        case _pt_d_:               \
-                p += 4;            \
-                val = READ(p);     \
-                ispo_CASE;         \
-                goto other;        \
         case _pt_c_:               \
                 p += 4;            \
                 val = READ(p);     \
index 4d6de0b..4cf15a0 100644 (file)
@@ -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:
index a373836..83a9d3f 100644 (file)
@@ -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)
index fdbbd09..29495d9 100644 (file)
@@ -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;
index 593c4b4..c633fed 100644 (file)
@@ -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;
index 5d859db..28933b2 100644 (file)
@@ -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;