X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=sip.cpp;h=43922fa348b782c4cfc8e8d3250b262da3a6e414;hp=3bd4fdfc9613e4994e4fc45e7afc71f09ce21667;hb=79bd731c0db3e3202cfeed2af3fb217ae744b70f;hpb=00675eb48be1313f6a10f342beec023a677edd30 diff --git a/sip.cpp b/sip.cpp index 3bd4fdf..43922fa 100644 --- a/sip.cpp +++ b/sip.cpp @@ -1851,7 +1851,7 @@ void Psip::i_invite(int status, char const *phrase, nua_t *nua, nua_magic_t *mag PDEBUG(DEBUG_SIP, "invite received (%s->%s)\n", from, to); sip_trace_header(this, inst->interface_name, "Authorization", DIRECTION_IN); - if (inst->auth_realm[0] || p_state != PORT_STATE_IDLE) { + if (inst->auth_realm[0] && p_state == PORT_STATE_IDLE) { /* only authenticate remote, if we have a realm set and we don't have re-invite */ authorization = sip->sip_proxy_authorization; status = check_authorization(authorization, "INVITE", inst->auth_user, inst->auth_password, inst->auth_realm, inst->auth_nonce, &auth_text);