From a9712a41ca2324cfa4e275453299772bee662726 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 25 Aug 2009 13:20:33 +0200 Subject: Make usbmuxd_connect work again, MESSAGE_CONNECT processing was broken. --- daemon/client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/client.c b/daemon/client.c index 0e47e84..0ba1c24 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -242,7 +242,7 @@ static int start_listen(struct mux_client *client) return count; } -static int client_command(struct mux_client *client, struct usbmuxd_header *hdr, const char *payload) +static int client_command(struct mux_client *client, struct usbmuxd_header *hdr) { int res; usbmuxd_log(LL_DEBUG, "Client command in fd %d len %d ver %d msg %d tag %d", client->fd, hdr->length, hdr->version, hdr->message, hdr->tag); @@ -263,7 +263,7 @@ static int client_command(struct mux_client *client, struct usbmuxd_header *hdr, usbmuxd_log(LL_DEBUG, "Client %d now LISTENING", client->fd); return start_listen(client); case MESSAGE_CONNECT: - ch = (void*)payload; + ch = (void*)hdr; usbmuxd_log(LL_DEBUG, "Client %d connection request to device %d port %d", client->fd, ch->device_id, ntohs(ch->port)); res = device_start_connect(ch->device_id, ntohs(ch->port), client); if(res < 0) { @@ -363,7 +363,7 @@ static void process_recv(struct mux_client *client) if(client->ib_size < hdr->length) return; } - client_command(client, hdr, (char *)(hdr+1)); + client_command(client, hdr); client->ib_size = 0; } -- cgit v1.1-32-gdbae