Skip to content

Commit

Permalink
sipreg/reg.c: stop retrying registers early after 401/407
Browse files Browse the repository at this point in the history
  • Loading branch information
maximilianfridrich committed Jun 14, 2024
1 parent 47a5d9a commit 202c1d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sipreg/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg)

case 401:
case 407:
if (reg->ls.failc > 1 &&
reg->ls.last_scode == msg->scode) {
reg->failc++;
goto out;
}

sip_auth_reset(reg->auth);
err = sip_auth_authenticate(reg->auth, msg);
if (err) {
Expand Down

0 comments on commit 202c1d3

Please sign in to comment.