Pārlūkot izejas kodu

uac(k): use header types for detection

Daniel-Constantin Mierla 15 gadi atpakaļ
vecāks
revīzija
369d759824
1 mainītis faili ar 3 papildinājumiem un 3 dzēšanām
  1. 3 3
      modules_k/uac/auth.c

+ 3 - 3
modules_k/uac/auth.c

@@ -232,9 +232,9 @@ static inline struct hdr_field *get_autenticate_hdr(struct sip_msg *rpl,
 	}
 	for( hdr=rpl->headers ; hdr ; hdr=hdr->next )
 	{
-		if((rpl_code==WWW_AUTH_CODE && hdr->type==HDR_WWW_AUTHENTICATE_T)
-				|| (rpl_code==PROXY_AUTH_CODE
-					&& hdr->type==HDR_PROXY_AUTHENTICATE_T))
+		if ( rpl_code==WWW_AUTH_CODE && hdr->type==HDR_WWW_AUTHENTICATE_T )
+			return hdr;
+		if ( rpl_code==PROXY_AUTH_CODE && hdr->type==HDR_PROXY_AUTHENTICATE_T )
 			return hdr;
 	}