diff options
author | Olle Johansson <oej@edvina.net> | 2006-01-30 19:09:08 +0000 |
---|---|---|
committer | Olle Johansson <oej@edvina.net> | 2006-01-30 19:09:08 +0000 |
commit | f3f9230738d2fd843cd86d4c2070831f0f8932db (patch) | |
tree | fe075e394a3505d7672a0de17673d3dc78296794 /channels | |
parent | 81813b42a498fd9398fab14695698ba748d3abb8 (diff) |
Issue #6035 - Don't send 403 on bad auth (correcting one of my old mistakes...) Reported by maik.
Patch inspired by, but not the patch in the bug tracker.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4aade99dc..c8fa9b300 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6368,9 +6368,14 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, const char *us } if (good_response) /* Auth is OK */ return 0; + + /* Ok, we have a bad username/secret pair */ + /* Challenge again, and again, and again */ + transmit_response_with_auth(p, response, req, p->randdata, reliable, respheader, 0); + sip_scheddestroy(p, 32000); + return 1; /* Challenge sent */ + } - /* Failure */ - return -1; } /*! \brief Callback for the devicestate notification (SUBSCRIBE) support subsystem |