diff options
author | Hector Martin | 2009-08-19 01:39:16 +0200 |
---|---|---|
committer | Hector Martin | 2009-08-19 03:56:09 +0200 |
commit | acfba6464bd57bdd0549f083f83b12ff9909337f (patch) | |
tree | 824f942e9ffef08d241d268f407c9b4ccd19f785 /usbmuxd/client.c | |
parent | 3a6f72edfb352ab57f58fb4fe4b6314daaddb362 (diff) | |
download | usbmuxd-acfba6464bd57bdd0549f083f83b12ff9909337f.tar.gz usbmuxd-acfba6464bd57bdd0549f083f83b12ff9909337f.tar.bz2 |
Remove trailing whitespace errors
Diffstat (limited to 'usbmuxd/client.c')
-rw-r--r-- | usbmuxd/client.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usbmuxd/client.c b/usbmuxd/client.c index b33d892..7a3160f 100644 --- a/usbmuxd/client.c +++ b/usbmuxd/client.c @@ -105,11 +105,11 @@ int client_accept(int listenfd) usbmuxd_log(LL_ERROR, "accept() failed (%s)", strerror(errno)); return cfd; } - + struct mux_client *client; client = malloc(sizeof(struct mux_client)); memset(client, 0, sizeof(struct mux_client)); - + client->fd = cfd; client->ob_buf = malloc(REPLY_BUF_SIZE); client->ob_size = 0; @@ -119,9 +119,9 @@ int client_accept(int listenfd) client->ib_capacity = CMD_BUF_SIZE; client->state = CLIENT_COMMAND; client->events = POLLIN; - + collection_add(&client_list, client); - + usbmuxd_log(LL_INFO, "New client on fd %d", client->fd); return client->fd; } @@ -216,14 +216,14 @@ static int start_listen(struct mux_client *client) struct device_info *devs; struct device_info *dev; int count, i; - + client->state = CLIENT_LISTEN; count = device_get_count(); if(!count) return 0; devs = malloc(sizeof(struct device_info) * count); count = device_get_list(devs); - + // going to need a larger buffer for many devices int needed_buffer = count * (sizeof(struct client_msg_dev) + sizeof(struct client_header)) + REPLY_BUF_SIZE; if(client->ob_capacity < needed_buffer) { @@ -246,7 +246,7 @@ static int client_command(struct mux_client *client, struct client_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); - + if(client->state != CLIENT_COMMAND) { usbmuxd_log(LL_ERROR, "Client %d command received in the wrong state", client->fd); if(send_result(client, hdr->tag, RESULT_BADCOMMAND) < 0) @@ -254,7 +254,7 @@ static int client_command(struct mux_client *client, struct client_header *hdr, client_close(client); return -1; } - + struct client_msg_connect *ch; switch(hdr->message) { case MESSAGE_LISTEN: @@ -392,7 +392,7 @@ void client_process(int fd, short events) process_send(client); } } - + } void client_device_add(struct device_info *dev) @@ -401,7 +401,7 @@ void client_device_add(struct device_info *dev) FOREACH(struct mux_client *client, &client_list) { if(client->state == CLIENT_LISTEN) notify_device(client, dev); - } ENDFOREACH + } ENDFOREACH } void client_device_remove(int device_id) { |