[sr-dev] git:master: uac(k): use header types for detection

Daniel-Constantin Mierla miconda at gmail.com
Sun Jan 24 22:01:01 CET 2010


Module: sip-router
Branch: master
Commit: de3980f8ad8d774ef3b4c587e0bddcf4832d080b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=de3980f8ad8d774ef3b4c587e0bddcf4832d080b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sun Jan 24 21:21:59 2010 +0100

uac(k): use header types for detection

---

 modules_k/uac/auth.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules_k/uac/auth.c b/modules_k/uac/auth.c
index 69cbe96..2a2f7ec 100644
--- a/modules_k/uac/auth.c
+++ b/modules_k/uac/auth.c
@@ -231,9 +231,9 @@ struct hdr_field *get_autenticate_hdr(struct sip_msg *rpl, int rpl_code)
 	}
 	for( hdr=rpl->headers ; hdr ; hdr=hdr->next )
 	{
-		if ( hdr->type!=HDR_OTHER_T )
-			continue;
-		if (cmp_hdrname_str(&hdr->name, &hdr_name)==0)
+		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;
 	}
 




More information about the sr-dev mailing list