summaryrefslogtreecommitdiffstats
path: root/src/device.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-17device: Fix potential deadlock (#130)Gravatar Nikias Bassen1-3/+2
2019-11-02Define _BSD_SOURCE again for older platforms.Gravatar Nikias Bassen1-0/+1
While defining _BSD_SOURCE prints deprecation warnings, defining both _DEFAULT_SOURCE and _BSD_SOURCE will not.
2019-10-07device: Make sure to operate on the copy of the device list in device_get_list()Gravatar Nikias Bassen1-1/+1
2019-10-07Replace obsolete _BSD_SOURCE define with _DEFAULT_SOURCEGravatar Nikias Bassen1-1/+1
2019-09-13device: Plug memory leak in error condition when TH_SYN sending failsGravatar Nikias Bassen1-4/+4
2018-05-15device: Flush buffer to client when remote side unexpectedly terminates ↵Gravatar Nikias Bassen1-1/+14
connection
2018-05-09Remove whitespace errorsGravatar Nikias Bassen1-6/+6
2018-01-08Fix typo in error message.Gravatar Carlos Maddela1-1/+1
2016-01-28device: Plug small memory leakGravatar Nikias Bassen1-0/+1
2014-11-11Get USB speed for device and use it for device attached client messageGravatar Martin Szulecki1-0/+2
2014-10-06Update and slightly cleanup copyright headersGravatar Martin Szulecki1-19/+18
2014-09-19Flush input buffer for a client connection when calling connection_teardown().Gravatar Satoshi Ohgoh1-0/+16
Signed-off-by: Martin Szulecki <m.szulecki@libimobiledevice.org>
2014-05-27Use protocol version 2 by defaultGravatar Nikias Bassen1-1/+1
2014-05-27device: Add protocol version 2 supportGravatar Nikias Bassen1-12/+83
2014-05-07Fix connection abort if device buffer is fullGravatar Peter Wu1-3/+4
When trying to upload a IPSW filesystem to an iPad, the process would randomly stop somewhere at 3% or 10%. It is possible that the receive buffer of the iPad is full. To prevent erroring out because size == conn->sendable == 0, skip reading from the client. There is a similar case where the clients is ready to accept data, but the device has no data to send. Apply a similar fix there. Hopefully the device is fast enough to reply in the next main loop iteration, otherwise the CPU usage of usbmux will spike because the client socket is ready while there is no data to process...
2014-03-24device/utils: move mstime64() into utils since it is generally usefulGravatar Mikkel Kamstrup Erlandsen1-10/+0
2014-03-24device: fix potential integer overflow in mstime64() on 32 bit systemsGravatar Mikkel Kamstrup Erlandsen1-1/+4
2014-03-24device: more aggresively send ACKs when receiving TCP dataGravatar Mikkel Kamstrup Erlandsen1-49/+66
Before this it seemed that we only ever sent ACK when timing out... Looks like a perf double when reading.
2014-03-24client: add a bunch of comments and function docsGravatar Mikkel Kamstrup Erlandsen1-1/+55
2014-03-13device: suppress 'error reading from client (0)' which is not actually an errorGravatar Nikias Bassen1-1/+3
2014-01-09device: reduce locking time inside device_get_list() and device_get_count()Gravatar Nikias Bassen1-5/+14
2014-01-09removed trailing \n from usbmuxd_log() messagesGravatar Nikias Bassen1-2/+2
2014-01-09device: suppress "No connection for device" if TH_RST is setGravatar Nikias Bassen1-1/+1
2014-01-09device/client: make device_get_list() allocate the result buffer itselfGravatar Nikias Bassen1-1/+6
Using device_get_count() and device_get_list() separately can return different device counts in case there are devices added to the list inbetween these two function calls. To prevent this, device_get_list() will allocate the buffer by itself.
2014-01-09device: make device_list access thread safeGravatar Nikias Bassen1-0/+38
2013-12-27preflight: replace idevice_event_* with thread safe implementationGravatar Nikias Bassen1-1/+16
idevice_event_subscribe() calls usbmuxd_subscribe() which will start a thread waiting for device add/remove events. But this implementation is not able to handle more than one "subscription". However the preflight worker will start a thread for _each_ device resulting in a really messed up situation if more than one device is attached at the same time. This fix will use usbmuxd's internal device_remove function calling a preflight callback to make this implementation thread safe.
2013-09-30device: suppress two compiler warnings with appropriate castsGravatar Nikias Bassen1-3/+3
2013-09-19make sure usbmuxd -x does not terminate when unpaired devices are still presentGravatar Nikias Bassen1-4/+4
2013-09-19added preflight worker implementation to handle initial device pairingGravatar Nikias Bassen1-3/+16
2013-09-17silence several compiler warningsGravatar Nikias Bassen1-1/+1
2013-09-17remove libusbmuxd sources and adapt source tree to use autotoolsGravatar Nikias Bassen1-0/+781
libusbmuxd has been split off and is now managed in a separate repository. By the time of this commit, the repository is: git clone http://git.sukimashita.com/libusbmuxd.git