summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/MobileSync.c8
-rw-r--r--src/usbmux.c1
-rw-r--r--src/utils.h6
3 files changed, 6 insertions, 9 deletions
diff --git a/src/MobileSync.c b/src/MobileSync.c
index a2a361e..752aee9 100644
--- a/src/MobileSync.c
+++ b/src/MobileSync.c
@@ -51,7 +51,7 @@ iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int
ret = iphone_msync_recv(client_loc, &array);
plist_t msg_node =
- plist_find_node(array, PLIST_STRING, "DLMessageVersionExchange", strlen("DLMessageVersionExchange"));
+ plist_find_node_by_string(array, "DLMessageVersionExchange");
plist_t ver_1 = plist_get_next_sibling(msg_node);
plist_t ver_2 = plist_get_next_sibling(ver_1);
@@ -83,7 +83,7 @@ iphone_error_t iphone_msync_new_client(iphone_device_t device, int src_port, int
ret = iphone_msync_recv(client_loc, &array);
plist_t rep_node =
- plist_find_node(array, PLIST_STRING, "DLMessageDeviceReady", strlen("DLMessageDeviceReady"));
+ plist_find_node_by_string(array, "DLMessageDeviceReady");
if (rep_node) {
ret = IPHONE_E_SUCCESS;
@@ -117,8 +117,10 @@ static void iphone_msync_stop_session(iphone_msync_client_t client)
iphone_error_t iphone_msync_free_client(iphone_msync_client_t client)
{
- iphone_msync_stop_session(client);
+ if (!client)
+ return IPHONE_E_INVALID_ARG;
+ iphone_msync_stop_session(client);
return iphone_mux_free_client(client->connection);
}
diff --git a/src/usbmux.c b/src/usbmux.c
index eb7ec97..5eaa1d1 100644
--- a/src/usbmux.c
+++ b/src/usbmux.c
@@ -313,6 +313,7 @@ iphone_error_t iphone_mux_recv(iphone_umux_client_t client, char *data, uint32_t
} else {
memcpy(data, client->recv_buffer, client->r_len);
free(client->recv_buffer); // don't need to deal with anymore, but...
+ client->recv_buffer = NULL;
offset = client->r_len; // see #2b, above
client->r_len = 0;
}
diff --git a/src/utils.h b/src/utils.h
index d9a441d..1750b8e 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -24,13 +24,7 @@
#include "libiphone/libiphone.h"
-#define DBGMASK_ALL 0xFFFF
-#define DBGMASK_NONE 0x0000
-#define DBGMASK_USBMUX (1 << 1)
-#define DBGMASK_LOCKDOWND (1 << 2)
-#define DBGMASK_MOBILESYNC (1 << 3)
-void iphone_set_debug_mask(uint16_t mask);
inline void log_debug_msg(const char *format, ...);
inline void log_dbg_msg(uint16_t id, const char *format, ...);