Skip to content

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