From 6a7a7c1e91a980ecdcb17fe48286db43252e37e9 Mon Sep 17 00:00:00 2001 From: Abhisha Nirmalathas <a.nirmalathas1@student.unimelb.edu.au> Date: Fri, 19 Apr 2019 13:10:32 +1000 Subject: [PATCH] bug fix, keyword print --- http-server.c | 2 +- user.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/http-server.c b/http-server.c index 5a857bb..3c3eca7 100644 --- a/http-server.c +++ b/http-server.c @@ -260,7 +260,7 @@ static bool handle_http_request(int sockfd, User_list *users) text_render_request(buff,sockfd, "4_accepted.html", keywords); free(keywords); } - free(keyword); + // free(keyword); } } } diff --git a/user.c b/user.c index 4012954..b95e67f 100644 --- a/user.c +++ b/user.c @@ -109,6 +109,7 @@ void change_player_status(int user_id, User_list* users, STATUS status){ } bool keyword_match(User* user, char* keyword){ + printf("keyword is %s\n\n", keyword); for(int i=0; i <user->n_keywords;i++){ printf("words being matched is with %s and %s\n", keyword, user->keywords[i]); if(strcmp(keyword, user->keywords[i]) == 0){ -- GitLab