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

fixes texane/stlink#780 #812

Closed
wants to merge 1 commit into from

Conversation

ceremcem
Copy link
Contributor

No description provided.

src/usb.c Show resolved Hide resolved
@xor-gate
Copy link
Member

As my comment before, I think in the upper layers we should catch the error -1 and exit (or retry with exponential backoff using rescan). I think a different implementation is necessary for that. Do you feel to fix this or leave it as is ?

@ceremcem
Copy link
Contributor Author

Sorry for being unresponsive for that long time. I had had many distractions and I still have. Current workaround works for me but it is apparently a dirty hack and needs to be improved as you suggested. I'm willing to implement the proper solution ASAP.

@Nightwalker-87
Copy link
Member

Nightwalker-87 commented Feb 25, 2020

@ceremcem: Thx for your contribution. Could you target the develop branch for that PR? Also I see that this bring up an old discussion on the backend. Can we be sure in the meanwhile that this does not break anything currently working?

@ceremcem
Copy link
Contributor Author

Could you target the develop branch for that PR?

Sure thing.

Can we be sure in the meanwhile that this does not break anything currently working?

I'll take extreme caution on this.

Copy link

@bmarvo bmarvo left a comment

Choose a reason for hiding this comment

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

I agree that we should not be calling exit() here. This will result in undesired behavior for projects that embed libstlink. We do need to get a better understanding of how returning -1 here affects the higher layers.

@Nightwalker-87 Nightwalker-87 added this to In progress in Release v1.6.1 via automation Mar 11, 2020
@Nightwalker-87
Copy link
Member

@ceremcem: This PR will be closed in 3 days, should there be no further feedback.

@Nightwalker-87 Nightwalker-87 linked an issue Mar 17, 2020 that may be closed by this pull request
@ceremcem
Copy link
Contributor Author

Hi! I'm on this one at last.

Any fix would need a test case in order to prevent any breakage in the higher layers. What would you recommend? Should I write my-st-util or is there any application I can use as a test case?

@Nightwalker-87
Copy link
Member

Can you just use st-util from the develop branch?

@Nightwalker-87
Copy link
Member

Closed by PR #913.

Release v1.6.1 automation moved this from In progress to Done Apr 8, 2020
@stlink-org stlink-org locked as resolved and limited conversation to collaborators Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

st-util should exit on LIBUSB_ERROR_NO_DEVICE
5 participants