diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-16 10:55:16 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-05-16 10:55:16 +0000 |
commit | 55ce8c7c5be34acd360160090ed4a64548259260 (patch) | |
tree | a0cc10b2d2d4483ff34dfd49f0e0da1e0fe3ed92 | |
parent | 79041e3db5a4ff15d18711d88e1876d523f8c879 (diff) |
Fixing possible bug in auth of BYE
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@64603 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 92b49c27d..81a5c6891 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10177,10 +10177,11 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ if (sipmethod == SIP_INVITE) { handle_response_invite(p, resp, rest, req, ignore, seqno); } else if (sipmethod == SIP_BYE || sipmethod == SIP_REFER) { - if (ast_strlen_zero(p->authname)) + if (ast_strlen_zero(p->authname)) { ast_log(LOG_WARNING, "Asked to authenticate %s, to %s:%d but we have no matching peer!\n", msg, ast_inet_ntoa(iabuf, sizeof(iabuf), p->recv.sin_addr), ntohs(p->recv.sin_port)); ast_set_flag(p, SIP_NEEDDESTROY); + } if ((p->authtries == MAX_AUTHTRIES) || do_proxy_auth(p, req, "Proxy-Authenticate", "Proxy-Authorization", sipmethod, 0)) { ast_log(LOG_NOTICE, "Failed to authenticate on %s to '%s'\n", msg, get_header(&p->initreq, "From")); ast_set_flag(p, SIP_NEEDDESTROY); |