浏览代码

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

Richard Fuchs 12 年之前
父节点
当前提交
5ece7e315e
共有 1 个文件被更改,包括 1 次插入6 次删除
  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");
 			return -4;
 		} else {
-			ptr = ptr->next;
-			while (ptr) {
-				if (ptr->type == hftype)
-					break;
-				ptr = ptr->next;
-			}
+			ptr = next_sibling_hdr(ptr);
 			if (!ptr)
 				break;
 		}