Skip to content

Commit

Permalink
Release driver lock on return from reset_driver_and_replace_camera (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
aliddell authored Feb 20, 2024
1 parent 9d7ea7c commit fc51bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dcam.driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ reset_driver_and_replace_camera(struct Dcam4Camera* self)

// try to stop all the associated cameras
for (int i = 0; i < ncameras; ++i) {
camera_stop(&driver->cameras[i]->camera);
CHECK(Device_Ok == camera_stop(&driver->cameras[i]->camera));
}

// save properties
Expand Down Expand Up @@ -327,7 +327,7 @@ reset_driver_and_replace_camera(struct Dcam4Camera* self)
driver->cameras[i]->camera.device.identifier.name,
sizeof(self_name))) {
*self = *driver->cameras[i];
return driver->cameras[i];
break;
}
}
lock_release(&driver->lock);
Expand Down

0 comments on commit fc51bf1

Please sign in to comment.