From 8b54abdbde6155461696e01e27f5b682d8fede45 Mon Sep 17 00:00:00 2001 From: ChouTatsumi <choutatsumi@gmail.com> Date: Mon, 29 Apr 2019 21:23:34 +1000 Subject: [PATCH] ready to merge --- server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/server.c b/server.c index 2a7dd18..dfe3703 100644 --- a/server.c +++ b/server.c @@ -335,7 +335,7 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, int n; // the length needs to include the html tags for the username - int added_length = strlen(added) + 1; + int added_length = strlen(added); // get the size of the file struct stat st; @@ -368,8 +368,6 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, // copy the username strncpy(buff + p2, added, added_length); - print_buff(buff); - if (write(sockfd, buff, size) < 0) { perror("write"); return false; -- GitLab