summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Ben Wagner2020-02-11 16:34:20 -0500
committerGravatar Nikias Bassen2022-03-29 12:15:09 +0200
commit310cf5e8173d82cfbafd35cb18755ea71a8b1447 (patch)
treeda61c6a2547fe891a82bcfca0db6d4171ab682ea /src
parentabba1e82679a58a32a943cded58204d14a231ef6 (diff)
downloadlibimobiledevice-310cf5e8173d82cfbafd35cb18755ea71a8b1447.tar.gz
libimobiledevice-310cf5e8173d82cfbafd35cb18755ea71a8b1447.tar.bz2
Format
Diffstat (limited to 'src')
-rw-r--r--src/debugserver.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/debugserver.c b/src/debugserver.c
index 4d653cf..1c20c25 100644
--- a/src/debugserver.c
+++ b/src/debugserver.c
@@ -89,8 +89,8 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_new(idevice_t device
debugserver_client_t client_loc = (debugserver_client_t) malloc(sizeof(struct debugserver_client_private));
client_loc->parent = parent;
client_loc->noack_mode = 0;
- client_loc->cancel_receive = NULL;
- client_loc->receive_loop_timeout = 1000;
+ client_loc->cancel_receive = NULL;
+ client_loc->receive_loop_timeout = 1000;
*client = client_loc;
@@ -165,10 +165,11 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive_with_timeout
LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_client_t client, char* data, uint32_t size, uint32_t *received)
{
debugserver_error_t res = DEBUGSERVER_E_UNKNOWN_ERROR;
- do {
- res = debugserver_client_receive_with_timeout(client, data, size, received, client->receive_loop_timeout);
- } while (res == DEBUGSERVER_E_TIMEOUT && client->cancel_receive != NULL && !client->cancel_receive());
- return res;
+ do {
+ /* Is this allowed to return DEBUGSERVER_E_TIMEOUT and also set data and received? */
+ res = debugserver_client_receive_with_timeout(client, data, size, received, client->receive_loop_timeout);
+ } while (res == DEBUGSERVER_E_TIMEOUT && client->cancel_receive != NULL && !client->cancel_receive());
+ return res;
}
LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command)