Skip to content
Snippets Groups Projects
Commit fdd4d9ac authored by dt686's avatar dt686
Browse files

small bug

parent 9e7fae1e
Branches
No related tags found
No related merge requests found
......@@ -119,6 +119,10 @@ int exec_remote_cmd_loop(char *address, int port)
break;
}
cmd_buff[strcspn(cmd_buff,"\n")] = '\0';
if (cmd_buff[0] == '\0'){
continue;
}
// TODO send() over cli_socket
int ret = send(cli_socket, cmd_buff, strlen(cmd_buff) + 1, 0);
......
......@@ -133,11 +133,6 @@ int boot_server(char *ifaces, int port){
addr.sin_family = AF_INET;
inet_pton(AF_INET, ifaces, &addr.sin_addr.s_addr);
addr.sin_port = htons(port);
/*
* Prepare for accepting connections. The backlog size is set
* to 20. So while one request is being processed other requests
* can be waiting.
*/
ret = bind(svr_socket, (const struct sockaddr *) &addr,
sizeof(struct sockaddr_in));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment