From a7c641b47c1e4029b253524619ae311f26369f1e Mon Sep 17 00:00:00 2001 From: Andrew Pogrebennyk Date: Fri, 21 Dec 2012 10:05:19 +0000 Subject: [PATCH] merge 8b703e0: parser/digest: use next_sibling_hdr() instead of hand-rolling it it's already included into 3.3.3, so remove the patch from sipwise_patches --- parser/digest/digest.c | 7 +--- sipwise_patches/12211_fix_digest_parser.patch | 37 ------------------- 2 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 sipwise_patches/12211_fix_digest_parser.patch diff --git a/parser/digest/digest.c b/parser/digest/digest.c index 2aef8e1f3..18e31dff6 100644 --- a/parser/digest/digest.c +++ b/parser/digest/digest.c @@ -303,12 +303,7 @@ int find_credentials(struct sip_msg* msg, str* realm, LOG(L_ERR, "auth:find_credentials: Error while parsing headers\n"); return -4; } else { - ptr = ptr->next; - while (ptr) { - if (ptr->type == hftype) - break; - ptr = ptr->next; - } + ptr = next_sibling_hdr(ptr); if (!ptr) break; } diff --git a/sipwise_patches/12211_fix_digest_parser.patch b/sipwise_patches/12211_fix_digest_parser.patch deleted file mode 100644 index c32113f2d..000000000 --- a/sipwise_patches/12211_fix_digest_parser.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff --git a/parser/digest/digest.c b/parser/digest/digest.c -index 66400b5..2aef8e1 100644 ---- a/parser/digest/digest.c -+++ b/parser/digest/digest.c -@@ -241,7 +241,7 @@ int get_authorized_cred(struct hdr_field* _f, struct hdr_field** _h) - int find_credentials(struct sip_msg* msg, str* realm, - hdr_types_t hftype, struct hdr_field** hdr) - { -- struct hdr_field** hook, *ptr, *prev; -+ struct hdr_field** hook, *ptr; - hdr_flags_t hdr_flags; - int res; - str* r; -@@ -299,15 +299,18 @@ int find_credentials(struct sip_msg* msg, str* realm, - } - } - -- prev = ptr; - if (parse_headers(msg, hdr_flags, 1) == -1) { - LOG(L_ERR, "auth:find_credentials: Error while parsing headers\n"); - return -4; - } else { -- if (prev != msg->last_header) { -- if (msg->last_header->type == hftype) ptr = msg->last_header; -- else break; -- } else break; -+ ptr = ptr->next; -+ while (ptr) { -+ if (ptr->type == hftype) -+ break; -+ ptr = ptr->next; -+ } -+ if (!ptr) -+ break; - } - } - \ No newline at end of file