Skip to content

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 20 commits into from
Dec 22, 2024
Merged

Upstream sync #17

merged 20 commits into from
Dec 22, 2024

Conversation

devangpatel
Copy link

No description provided.

gujie-leica and others added 20 commits November 5, 2024 11:39
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
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".
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
@devangpatel devangpatel merged commit 2dca8b3 into HachCompany-HQSeries:master Dec 22, 2024
1 check failed
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