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

Author: Richard Fuchs <[email protected]>
Committer: Richard Fuchs <[email protected]>
Date:   Mon Dec 17 11:56:24 2012 -0500

parser/digest: use next_sibling_hdr() instead of hand-rolling it

---

 parser/digest/digest.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/parser/digest/digest.c b/parser/digest/digest.c
index 512ce31..9b87efd 100644
--- a/parser/digest/digest.c
+++ b/parser/digest/digest.c
@@ -301,12 +301,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;
                }


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to