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

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Sun Nov 15 12:52:36 2009 +0100

uac(k): use type to detect www/proxy_authenticate hdrs

- reported by Mangust (mangust2), SF.net #2897594

---

 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 ba0e3fc..78f51d5 100644
--- a/modules_k/uac/auth.c
+++ b/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 ( 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)
+                               || (rpl_code==PROXY_AUTH_CODE
+                                       && hdr->type==HDR_PROXY_AUTHENTICATE_T))
                        return hdr;
        }
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to