Mercurial > remote-gamepad-server
diff service.c @ 2:f362b20de51e
Remove trailing whitespaces.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 22 Feb 2015 18:03:26 +0100 |
parents | e70ea46d6073 |
children | eafcd170dc6d |
line wrap: on
line diff
--- a/service.c +++ b/service.c @@ -67,9 +67,9 @@ int create_socket(unsigned short *port, ssize_t receive_ds_info(int socket, ds_t* ds){ struct sockaddr_in add; socklen_t l = sizeof(struct sockaddr_in); - + ssize_t result; - + result = recvfrom_rs(socket, ds, sizeof(ds_t), 0, (struct sockaddr*)&add, &l); if(result == -1) perror("recvfrom_rs"); return result; @@ -84,7 +84,7 @@ void start_service(void){ int uinput_fd; int sock_fd; uint16_t udp_port = base_port + curdev; - + ds_t ds; ssize_t result; @@ -98,7 +98,7 @@ void start_service(void){ exit(EXIT_FAILURE); } fprintf(stdout, " [%d] Joystick device OK\n", curdev); - + // Create udp socket sock_fd = create_socket(&udp_port, SOCK_DGRAM); @@ -108,7 +108,7 @@ void start_service(void){ } fprintf(stdout, " [%d] Socket on port %d OK\n", curdev, udp_port); - + // Device and Socket are ok :-D fprintf(stdout, " [%d] Creation of service: OK\n", curdev); @@ -120,7 +120,7 @@ void start_service(void){ while(1){ result = receive_ds_info(sock_fd, &ds); if(result == -1){ - fprintf(stderr, " [%d] DS Info receive failed\n", curdev); + fprintf(stderr, " [%d] DS Info receive failed\n", curdev); } if(result > 0){ ds_process_evt(&ds, uinput_fd);