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

Free transfers fix #50

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

marcel303
Copy link

Hi,
I encountered some undefined behavior (and crash) due to the way transfers were freed during the transfer callback. I changed things a bit so now the transfers are freed after the wait for the number of active transfers to reach zero.
Cheers,
Marcel

…where library user needs to have libusb include folder in path. With this change only the PS3EYEDriver need to know about libusb.
…ure library user doesn't get a conflicting define for 'debug', which is pretty generic.
…river for the PS3 eye camera, preventing us from using the device otherwise.
…during shutdown. It's illegal to free a transfer from within the transfer callback. Doing so can result in undefined behavior.

From the docs of libusb_free_transfer,
	"It is not legal to free an active transfer (one which has been submitted and has not yet completed)."

I've moved to free calls until after all transfers have finished.
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.

1 participant