[sr-dev] git:master: parser/digest: use next_sibling_hdr() instead of hand-rolling it

Richard Fuchs rfuchs at sipwise.com
Mon Dec 17 17:57:16 CET 2012


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 <rfuchs at sipwise.com>
Committer: Richard Fuchs <rfuchs at sipwise.com>
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;
 		}




More information about the sr-dev mailing list