summaryrefslogtreecommitdiffstats
path: root/src/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client.c b/src/client.c
index 1588c38..1fc15c8 100644
--- a/src/client.c
+++ b/src/client.c
@@ -300,7 +300,7 @@ static int send_pkt(struct mux_client *client, uint32_t tag, enum usbmuxd_msgtyp
300 hdr.length = sizeof(hdr) + payload_length; 300 hdr.length = sizeof(hdr) + payload_length;
301 hdr.message = msg; 301 hdr.message = msg;
302 hdr.tag = tag; 302 hdr.tag = tag;
303 usbmuxd_log(LL_DEBUG, "send_pkt fd %d tag %d msg %d payload_length %d", client->fd, tag, msg, payload_length); 303 usbmuxd_log(LL_DEBUG, "Client %d output buffer got tag %d msg %d payload_length %d", client->fd, tag, msg, payload_length);
304 304
305 uint32_t available = client->ob_capacity - client->ob_size; 305 uint32_t available = client->ob_capacity - client->ob_size;
306 /* the output buffer _should_ be large enough, but just in case */ 306 /* the output buffer _should_ be large enough, but just in case */
@@ -646,10 +646,10 @@ static void update_client_info(struct mux_client *client, plist_t dict)
646static int client_command(struct mux_client *client, struct usbmuxd_header *hdr) 646static int client_command(struct mux_client *client, struct usbmuxd_header *hdr)
647{ 647{
648 int res; 648 int res;
649 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); 649 usbmuxd_log(LL_DEBUG, "Client %d command len %d ver %d msg %d tag %d", client->fd, hdr->length, hdr->version, hdr->message, hdr->tag);
650 650
651 if(client->state != CLIENT_COMMAND) { 651 if(client->state != CLIENT_COMMAND) {
652 usbmuxd_log(LL_ERROR, "Client %d command received in the wrong state", client->fd); 652 usbmuxd_log(LL_ERROR, "Client %d command received in the wrong state, got %d but want %d", client->fd, client->state, CLIENT_COMMAND);
653 if(send_result(client, hdr->tag, RESULT_BADCOMMAND) < 0) 653 if(send_result(client, hdr->tag, RESULT_BADCOMMAND) < 0)
654 return -1; 654 return -1;
655 client_close(client); 655 client_close(client);
@@ -730,7 +730,7 @@ static int client_command(struct mux_client *client, struct usbmuxd_header *hdr)
730 portnum = (uint16_t)val; 730 portnum = (uint16_t)val;
731 plist_free(dict); 731 plist_free(dict);
732 732
733 usbmuxd_log(LL_DEBUG, "Client %d connection request to device %d port %d", client->fd, device_id, ntohs(portnum)); 733 usbmuxd_log(LL_DEBUG, "Client %d requesting connection to device %d port %d", client->fd, device_id, ntohs(portnum));
734 res = device_start_connect(device_id, ntohs(portnum), client); 734 res = device_start_connect(device_id, ntohs(portnum), client);
735 if(res < 0) { 735 if(res < 0) {
736 if (send_result(client, hdr->tag, -res) < 0) 736 if (send_result(client, hdr->tag, -res) < 0)
@@ -888,7 +888,7 @@ static void process_send(struct mux_client *client)
888 } 888 }
889 res = send(client->fd, client->ob_buf, client->ob_size, 0); 889 res = send(client->fd, client->ob_buf, client->ob_size, 0);
890 if(res <= 0) { 890 if(res <= 0) {
891 usbmuxd_log(LL_ERROR, "Send to client fd %d failed: %d %s", client->fd, res, strerror(errno)); 891 usbmuxd_log(LL_ERROR, "Sending to client fd %d failed: %d %s", client->fd, res, strerror(errno));
892 client_close(client); 892 client_close(client);
893 return; 893 return;
894 } 894 }