Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cs283
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Joey Le
Cs283
Commits
f3d702a5
Commit
f3d702a5
authored
2 months ago
by
Joey Le
Browse files
Options
Downloads
Patches
Plain Diff
Made it so exec remote cmd loop actually loops and doesn't exit over 1 command
parent
aa58c5c0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Assignment-06/starter/rsh_cli.c
+3
-1
3 additions, 1 deletion
Assignment-06/starter/rsh_cli.c
Assignment-06/starter/rshlib.h
+1
-1
1 addition, 1 deletion
Assignment-06/starter/rshlib.h
with
4 additions
and
2 deletions
Assignment-06/starter/rsh_cli.c
+
3
−
1
View file @
f3d702a5
...
...
@@ -97,7 +97,7 @@ int exec_remote_cmd_loop(char *address, int port) {
char
rsp_buff
[
RDSH_COMM_BUFF_SZ
];
int
cli_socket
;
ssize_t
recv_bytes
;
int
is_eof
=
0
;
// Declare and initialize
int
is_eof
=
0
;
// Debug: Starting the client
printf
(
"CLIENT: Starting client. Connecting to server at %s:%d...
\n
"
,
address
,
port
);
...
...
@@ -192,6 +192,8 @@ int exec_remote_cmd_loop(char *address, int port) {
(
void
)
is_eof
;
// Suppress unused variable warning
return
client_cleanup
(
cli_socket
,
NULL
,
NULL
,
OK
);
}
/*
* start_client(server_ip, port)
* server_ip: a string in ip address format, indicating the servers IP
...
...
This diff is collapsed.
Click to expand it.
Assignment-06/starter/rshlib.h
+
1
−
1
View file @
f3d702a5
...
...
@@ -59,7 +59,7 @@ int parse_pipeline(const char *cmd_line, command_list_t *clist);
//server prototypes for rsh_server.c - see documentation for each function to
//see what they do
int
start_server
(
char
*
ifaces
,
int
port
,
int
is
_
threaded
);
int
start_server
(
char
*
ifaces
,
int
port
,
int
isthreaded
);
int
boot_server
(
char
*
ifaces
,
int
port
);
int
stop_server
(
int
svr_socket
);
int
send_message_eof
(
int
cli_socket
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment