[raop] Clear auth_key for device verification if verify request to device is denied

- should make it easier for user to setup a new pin
This commit is contained in:
ejurgensen 2017-07-01 08:33:11 +02:00
parent ed17d756be
commit a23bb0b7e2

View File

@ -4142,7 +4142,12 @@ raop_cb_verification_verify_step2(struct evrtsp_request *req, void *arg)
ret = raop_verification_response_process(5, req, rs);
if (ret < 0)
goto error;
{
// Clear auth_key, the device did not accept it
free(rs->device->auth_key);
rs->device->auth_key = NULL;
goto error;
}
DPRINTF(E_INFO, L_RAOP, "Verification of '%s' completed succesfully\n", rs->devname);
@ -4165,7 +4170,12 @@ raop_cb_verification_verify_step1(struct evrtsp_request *req, void *arg)
ret = raop_verification_response_process(4, req, rs);
if (ret < 0)
goto error;
{
// Clear auth_key, the device did not accept it
free(rs->device->auth_key);
rs->device->auth_key = NULL;
goto error;
}
ret = raop_verification_request_send(5, rs, raop_cb_verification_verify_step2);
if (ret < 0)