From 48c446a5e5f7d490aa007892b1deffce42a3c9de Mon Sep 17 00:00:00 2001
From: Xiaoxuan Li <x.li215@student.unimelb.edu.au>
Date: Mon, 29 Apr 2019 23:40:09 +1000
Subject: [PATCH] last update

---
 image_tagger.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/image_tagger.c b/image_tagger.c
index 730b207..d1e036f 100644
--- a/image_tagger.c
+++ b/image_tagger.c
@@ -100,7 +100,12 @@ static bool handle_http_request(int sockfd)
 
 if (strncmp(curr, "?start", 6) == 0){
       if (method == GET)
-      {
+      {   if(player1 == sockfd){
+        player1_ready = true;
+        }
+        if(player2 == sockfd){
+          player2_ready = true;
+        }
 
           // get the size of the file
           struct stat st;
@@ -329,12 +334,6 @@ if (strncmp(curr, "?start", 6) == 0){
 if (*curr == ' '){
 
         if (method == GET){
-              if(player1 == sockfd){
-                player1_ready = true;
-              }
-              if(player2 == sockfd){
-                player2_ready = true;
-              }
             // get the size of the file
             struct stat st;
             stat("1_intro.html", &st);
-- 
GitLab