From bf9a1060e0af1f9335a342bb4ca54a606b1bdabf Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Mon, 7 Dec 2020 10:12:32 -0600 Subject: Add some comments --- P4/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'P4') diff --git a/P4/util.c b/P4/util.c index e924575..ded2dfa 100644 --- a/P4/util.c +++ b/P4/util.c @@ -17,6 +17,7 @@ //Global socket int sockfd; +//Make sure one connection is dealt with at a time pthread_mutex_t connection = PTHREAD_MUTEX_INITIALIZER; /********************************************** @@ -179,7 +180,7 @@ int return_result(int fd, char *content_type, char *buf, int numbytes) { - returns 0 on success, nonzero on failure. ************************************************/ int return_error(int fd, char *buf) { - //Convert low IO to high IO + //Convert low IO to high IO to be able to fprintf FILE *fdstream = fdopen(fd, "w"); if (fdstream == NULL) { printf("File stream conversion(?) failed.\n"); -- cgit v1.2.3