summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
35 hoursFix hang in usbmuxd_events_unsubscribe() right after subscribingGravatar Sorvigolova1-4/+19
If usbmuxd_events_unsubscribe() is called before the device monitor thread has connected to usbmuxd, listenfd is still -1, so there is nothing to shut down. Where thread_cancel() is not available (Windows, or builds without pthread_cancel) unsubscribe then relies on clearing `running`, but device_monitor() sets `running = 1` and `cancelling = 0` itself when it starts and overwrites that. The thread goes on to connect, sends Listen and blocks in receive_packet() forever, so thread_join() never returns. This is easy to hit with ideviceinstaller on Windows with a network device and redirected stdout: the command completes before idevice_wait_for_command_to_complete() subscribes, so subscribe and unsubscribe happen back to back and the tool hangs on exit. Fix this by: - initializing `running`/`cancelling` in usbmuxd_events_subscribe() under listener_mutex before the monitor thread is created; - publishing listenfd in device_monitor() under the same mutex, and only if no cancellation was requested in the meantime (otherwise close the new socket and exit); - setting `cancelling`/`running` and shutting down listenfd under the mutex in usbmuxd_events_unsubscribe(), and only if the socket exists.
2025-11-07Improve portability by replacing OS-specific macros with AC_CHECK_FUNCSGravatar Masatake Daimon2-1/+2
The primary purpose of this change is to support NetBSD. No functional changes intended.
2025-09-08Add FUNDINGGravatar Nikias Bassen1-0/+3
2025-07-11[github-actions] Update build workflow to use windows-latestGravatar Nikias Bassen1-1/+2
2025-06-04Updated NEWS for release2.1.1Gravatar Nikias Bassen1-0/+11
2025-06-04Update soversion for releaseGravatar Nikias Bassen1-1/+1
2025-02-16inetcat: Make sure to report correct error messagesGravatar Nikias Bassen1-1/+4
2025-02-13iproxy: Make sure to print correct socket error messagesGravatar Nikias Bassen1-9/+12
Also, make sure to return positive values from main()
2025-01-01Remove debug printfGravatar Nikias Bassen1-1/+0
2024-12-30Use libusbmuxd_version() to construct client version stringGravatar Nikias Bassen1-2/+7
2024-12-02Fix build on WindowsGravatar Nikias Bassen3-3/+4
2024-12-02[github-actions] Fix Windows msys buildGravatar Nikias Bassen1-1/+1
2024-11-29[github-actions] Bump dawidd6/action-download-artifact from 3 to 6Gravatar Nikias Bassen1-6/+6
2024-11-29[github-actions] Run build workflow on pull_requestGravatar Nikias Bassen1-0/+1
2024-11-29Fix compatibility with MSVCGravatar Duncan Ogilvie3-7/+21
2024-11-29tools: Use libusbmuxd_version() instead of PACKAGE_VERSIONGravatar Duncan Ogilvie2-2/+2
2024-11-29Change __attribute__((__packed__)) to #pragma pack(push, 1)Gravatar Duncan Ogilvie1-5/+9
2024-11-29Change WIN32 to _WIN32Gravatar Duncan Ogilvie4-14/+13
2024-10-22Updated READMEGravatar Nikias Bassen1-3/+3
2024-10-14tools: Fix potential issue with select() in case the network fd is higher ↵Gravatar Nikias Bassen1-1/+2
than the usbmux fd Thanks to @sleepinging for pointing this out.
2024-04-16automake: Prevent `dist` or `distcheck` when uncommitted changes are presentGravatar Nikias Bassen1-0/+1
2024-04-15Fix usbmuxd_send returning positive value on errorGravatar Josef Micka1-1/+1
Since socket_send already returns -errno, this function should pass it as is
2024-04-02[github-actions] Update build workflow to use newer versions of ↵Gravatar Nikias Bassen1-12/+12
download-artifact, checkout, and upload-artifact actions
2024-03-27Update NEWS for release2.1.0Gravatar Nikias Bassen1-0/+10
2024-03-27Updated READMEGravatar Nikias Bassen1-25/+140
2024-03-27Update soversion for releaseGravatar Nikias Bassen1-1/+1
2024-03-27inotify: Avoid leaking file descriptor to child processesGravatar David Edmundson1-1/+1
inotify_init creates a file descriptor which by default is not makes with CLOEXEC. If the application using libusbmuxd spawns applications this then leaks through.
2024-03-27Use return value from socket_send instead of using errnoGravatar Nikias Bassen1-2/+1
2024-03-26iproxy: Use updated socket_create API to listen on IPv4 and IPv6 with a ↵Gravatar Nikias Bassen2-17/+2
single socket
2024-03-26Add libusbmuxd_version() function to interfaceGravatar Nikias Bassen2-0/+15
2024-01-29Move USBMUXD_API to public headersGravatar Nikias Bassen3-47/+59
2024-01-15[github-actions] Update checkout and upload-artifacts to v3Gravatar Nikias Bassen1-6/+6
2023-09-01iproxy: Fix typo in log messagesGravatar Nikias Bassen1-2/+2
Thanks to @p0358 for reporting.
2023-06-21Remove unneeded buffer copy in device_info_from_plist()Gravatar Nikias Bassen1-3/+1
2023-04-30autoconf: Small update to configure.acGravatar Nikias Bassen1-1/+1
2023-04-30git-version-gen: Prevent multiple lines of outputGravatar Nikias Bassen1-0/+1
2023-03-01Add cast to prevent sign-compare compiler warningGravatar Nikias Bassen1-2/+2
2023-02-12autoconf: Fix clang-16 breakageGravatar Matthew Smith1-2/+2
-Wint-conversion becomes an error by default in clang-16, causing the program_invocation_short_name test to fail. Bug: https://bugs.gentoo.org/893910
2022-09-05Allow using libusbmuxd as submoduleGravatar Nikias Bassen1-1/+1
2022-08-24[github-actions] Add a scheduled build every 1st of the month so we always ↵Gravatar Nikias Bassen1-1/+4
have an artifact
2022-05-05Make conn_data member of usbmuxd_device_info struct unsigned since it's not ↵Gravatar Nikias Bassen3-11/+11
a string Also remove some pointless casts and update some others
2022-04-04Updated READMEGravatar Nikias Bassen1-1/+2
2022-02-10automake: Add git-version-gen to EXTRA_DIST and add .tarball-version hookGravatar Nikias Bassen1-1/+5
2022-02-10[github-actions] Windows: Prevent -dirty suffix in version string by ↵Gravatar Nikias Bassen2-0/+2
disabling CRLF conversion
2022-02-10autoconf: Automatically derive version number from latest git tagGravatar Nikias Bassen2-2/+26
with a fallback to get the version string from a .tarball-version file
2022-01-02Fix typo in commentGravatar Nikias Bassen1-1/+1
Thanks to @timgates42 for pointing this out.
2021-09-13[github-actions] macOS: build for arm64 tooGravatar Nikias Bassen1-1/+11
2021-09-06Add build status badge to README.mdGravatar Nikias Bassen1-0/+2
2021-09-06[github-actions] Add build workflowGravatar Nikias Bassen1-0/+169
2021-09-01Updated pkg-config file with libimobiledevice-glue dependencyGravatar Nikias Bassen1-1/+1