summaryrefslogtreecommitdiffstats
path: root/03_exercise/srv/shell.c
diff options
context:
space:
mode:
Diffstat (limited to '03_exercise/srv/shell.c')
-rw-r--r--03_exercise/srv/shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/03_exercise/srv/shell.c b/03_exercise/srv/shell.c
index 38c5f9d..0419f35 100644
--- a/03_exercise/srv/shell.c
+++ b/03_exercise/srv/shell.c
@@ -116,14 +116,14 @@ void send_file(int client_fd, char *path) {
int length = snprintf(NULL, 0, "%ld", sz);
sprintf(buffer, "<<!%ld!", sz);
- sprintf(&(buffer[3 + length + 1]), "%s\n", path);
+ sprintf(&(buffer[3 + length + 1]), "%s!\n", path);
if (write(client_fd, buffer, strlen(buffer)) != strlen(buffer)) {
perror("write header");
return;
}
- usleep(150);
+ usleep(250);
memset(buffer, 0, BUF_SIZE);