mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-30 09:03:23 -05:00
[outputs] Check for session in outputs_device_authorize()
This commit is contained in:
parent
384b1171d9
commit
a9a6f4b584
@ -950,6 +950,9 @@ outputs_device_authorize(struct output_device *device, const char *pin, output_s
|
|||||||
if (outputs[device->type]->disabled || !outputs[device->type]->device_authorize)
|
if (outputs[device->type]->disabled || !outputs[device->type]->device_authorize)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if (device->session)
|
||||||
|
return 0; // We are already connected to the device - no auth required
|
||||||
|
|
||||||
ret = outputs[device->type]->device_authorize(device, pin, callback_add(device, cb));
|
ret = outputs[device->type]->device_authorize(device, pin, callback_add(device, cb));
|
||||||
|
|
||||||
return device_state_update(device, ret);
|
return device_state_update(device, ret);
|
||||||
|
Loading…
Reference in New Issue
Block a user