summaryrefslogtreecommitdiff
path: root/client.c
diff options
context:
space:
mode:
authorGDR! <gdr@gdr.name>2016-12-07 15:37:06 +0100
committerGDR! <gdr@gdr.name>2016-12-07 15:37:06 +0100
commit798e20be9d3b51d3fe1e2112c218ddf6ea02e497 (patch)
treea75c4a0a48874b8776aa2afce65d600aae3353f8 /client.c
parentb3b0e345a94830a186168a4ecd53e0259a00b0c0 (diff)
parentdb012b1311c5ca46d5784376ad0c05b5c241f817 (diff)
No warnings in -wall
Diffstat (limited to 'client.c')
-rw-r--r--client.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/client.c b/client.c
index 381087c..aaa3f67 100644
--- a/client.c
+++ b/client.c
@@ -23,7 +23,7 @@ int bind_sockfd;
23 23
24fd_set client_master_fdset; 24fd_set client_master_fdset;
25 25
26int handle_pong_frame(protocol_frame *rcvd_frame) 26int handle_pong_frame()
27{ 27{
28 struct timespec pong_rcvd_time; 28 struct timespec pong_rcvd_time;
29 double secs1, secs2; 29 double secs1, secs2;
@@ -174,7 +174,6 @@ int handle_server_tcp_frame(protocol_frame *rcvd_frame)
174 while(offset < rcvd_frame->data_length) 174 while(offset < rcvd_frame->data_length)
175 { 175 {
176 int sent_bytes; 176 int sent_bytes;
177 int write_sockfd;
178 177
179 if(client_pipe_mode) 178 if(client_pipe_mode)
180 { 179 {
@@ -200,7 +199,7 @@ int handle_server_tcp_frame(protocol_frame *rcvd_frame)
200 uint8_t data[PROTOCOL_BUFFER_OFFSET]; 199 uint8_t data[PROTOCOL_BUFFER_OFFSET];
201 protocol_frame frame_st, *frame; 200 protocol_frame frame_st, *frame;
202 201
203 log_printf(L_INFO, "Could not write to socket %d: %s\n", write_sockfd, strerror(errno)); 202 log_printf(L_INFO, "Could not write to socket: %s\n", strerror(errno));
204 203
205 frame = &frame_st; 204 frame = &frame_st;
206 memset(frame, 0, sizeof(protocol_frame)); 205 memset(frame, 0, sizeof(protocol_frame));
@@ -256,7 +255,7 @@ int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame)
256} 255}
257 256
258/* Main loop for the client */ 257/* Main loop for the client */
259int do_client_loop(unsigned char *tox_id_str) 258int do_client_loop(uint8_t *tox_id_str)
260{ 259{
261 unsigned char tox_packet_buf[PROTOCOL_MAX_PACKET_SIZE]; 260 unsigned char tox_packet_buf[PROTOCOL_MAX_PACKET_SIZE];
262 unsigned char tox_id[TOX_ADDRESS_SIZE]; 261 unsigned char tox_id[TOX_ADDRESS_SIZE];
@@ -534,7 +533,7 @@ int do_client_loop(unsigned char *tox_id_str)
534 /* Check if connection closed */ 533 /* Check if connection closed */
535 if(nbytes == 0) 534 if(nbytes == 0)
536 { 535 {
537 char data[PROTOCOL_BUFFER_OFFSET]; 536 uint8_t data[PROTOCOL_BUFFER_OFFSET];
538 protocol_frame frame_st, *frame; 537 protocol_frame frame_st, *frame;
539 538
540 log_printf(L_INFO, "Connection closed\n"); 539 log_printf(L_INFO, "Connection closed\n");