Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle exception in uvc_sensor::acquire_power #7604

Merged
merged 4 commits into from
Oct 22, 2020

Conversation

aangerma
Copy link
Contributor

@aangerma aangerma commented Oct 19, 2020

Reduce the reference counter in case that exception throws in acquire_power
Tracked on: RS5-9071

_user_count.fetch_add( -1 );
LOG_ERROR( "acquire_power failed " );
throw;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about void uvc_sensor::release_power() below - could the fix be applicable there as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its not needed because the fix is for the cases that release_power() didn't call because of exception on acquire_power().

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But is it possible that setting D3 would throw?

@maloel maloel merged commit aed6b0a into IntelRealSense:development Oct 22, 2020
@ev-mp ev-mp changed the title Fix for RS5-9071 - Handle exception in uvc_sensor::acquire_power Handle exception in uvc_sensor::acquire_power Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants