Skip to content
Snippets Groups Projects
Commit c85aa628 authored by Joey Le's avatar Joey Le
Browse files

Fixed rsh_server.c exec client requests

parent 6e8c9eeb
No related branches found
No related tags found
No related merge requests found
...@@ -47,6 +47,8 @@ ...@@ -47,6 +47,8 @@
* TO DO SOMETHING WITH THE is_threaded ARGUMENT HOWEVER. * TO DO SOMETHING WITH THE is_threaded ARGUMENT HOWEVER.
*/ */
int start_server(char *ifaces, int port, int is_threaded){ int start_server(char *ifaces, int port, int is_threaded){
(void)is_threaded;
int svr_socket; int svr_socket;
int rc; int rc;
...@@ -353,11 +355,6 @@ int exec_client_requests(int cli_socket) { ...@@ -353,11 +355,6 @@ int exec_client_requests(int cli_socket) {
send_message_string(cli_socket, "Exiting...\n"); send_message_string(cli_socket, "Exiting...\n");
send_message_eof(cli_socket); send_message_eof(cli_socket);
return OK; return OK;
} else if (strcmp(cmd.argv[0], "stop-server") == 0) {
free(cmd._cmd_buffer);
send_message_string(cli_socket, "Stopping server...\n");
send_message_eof(cli_socket);
return OK_EXIT;
} else if (strcmp(cmd.argv[0], "cd") == 0) { } else if (strcmp(cmd.argv[0], "cd") == 0) {
if (cmd.argc == 1) { if (cmd.argc == 1) {
chdir(getenv("HOME")); chdir(getenv("HOME"));
...@@ -405,6 +402,7 @@ int exec_client_requests(int cli_socket) { ...@@ -405,6 +402,7 @@ int exec_client_requests(int cli_socket) {
/* /*
* send_message_eof(cli_socket) * send_message_eof(cli_socket)
* cli_socket: The server-side socket that is connected to the client * cli_socket: The server-side socket that is connected to the client
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment