Quellcode durchsuchen

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

Richard Fuchs vor 12 Jahren
Ursprung
Commit
5ece7e315e
1 geänderte Dateien mit 1 neuen und 6 gelöschten Zeilen
  1. 1 6
      parser/digest/digest.c

+ 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");
 			LOG(L_ERR, "auth:find_credentials: Error while parsing headers\n");
 			return -4;
 			return -4;
 		} else {
 		} else {
-			ptr = ptr->next;
-			while (ptr) {
-				if (ptr->type == hftype)
-					break;
-				ptr = ptr->next;
-			}
+			ptr = next_sibling_hdr(ptr);
 			if (!ptr)
 			if (!ptr)
 				break;
 				break;
 		}
 		}