forked from viveris/uMTP-Responder
-
Notifications
You must be signed in to change notification settings - Fork 0
Upstream sync #17
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
Merged
Merged
Upstream sync #17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
On our machine, the original timeout is insufficient, causing the USB gadget to close when attempting to cancel a file transfer. We've extended the timeout with additional redundancy to prevent this from happening. Signed-off-by: gujie <[email protected]>
(errno == EAGAIN) was checked twice, where it should have been checking for EAGAIN or EWOULDBLOCK.
Doing a blocking read (even with count=0) when handling a cancel request from the host ends up blocking both the read in the request handler as well as a write in the thread that's being cancelled, blocking both threads indefinitely. Removing the read appears to fix the problem. Fixes #108
Fix copy/paste error
increase the cancel wait time between thread
Make it more obvious that these functions are only used in their respective C files.
-lpthread should be in LDFLAGS, not CFLAGS
Make some functions static
Have each of the worker threads set their name so they can be more easily identified with tools like "ps" or "pstree".
Set names for threads
Simplify the code by switching to a POSIX message queue.
The function-like PRINT_* macros would build differently for different build options, such that something like: if (condition) PRINT_MSG("yes") else PRINT_MSG("no") (note the missing semicolons) would build successfully with no additional build flags or with DEBUG=1, but would fail to compile with USE_SYSLOG=1. This change makes it so that all build options cause the above to fail, same as if it had been a regular function call.
Make PRINT_* macros behave consistently
Switch to POSIX message queue
Make it possible to specify multiple -cmd: parameters at once, and to specify them when starting umtprd, e.g. instead of doing umtrpd & umtprd '-cmd:addstorage:/home Home rw' umtprd '-cmd:addstorage:/data Data ro' you can now do: umtprd '-cmd:addstorage:/home Home rw' '-cmd:addstorage:/data Data ro' Also make it so the order of parameters doesn't matter, i.e. specifying "-conf" before "-cmd:" will work as one might expect.
Rework command line argument handling
Make automated build workflow build more targets
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.