2
0
Эх сурвалжийг харах

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

Richard Fuchs 12 жил өмнө
parent
commit
5ece7e315e

+ 1 - 6
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;
 		}