aboutsummaryrefslogtreecommitdiffstats
path: root/P4
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-12-07 10:12:32 -0600
committerMatt Strapp <strap012@umn.edu>2020-12-07 10:12:32 -0600
commitbf9a1060e0af1f9335a342bb4ca54a606b1bdabf (patch)
tree7b03adf3ff8f1230749a2579f6fbf26339237510 /P4
parentDo everything sans Extra Credit (diff)
downloadcsci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar.gz
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar.bz2
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar.lz
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar.xz
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.tar.zst
csci4061-bf9a1060e0af1f9335a342bb4ca54a606b1bdabf.zip
Add some comments
Diffstat (limited to 'P4')
-rw-r--r--P4/util.c3
1 files changed, 2 insertions, 1 deletions
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");