aboutsummaryrefslogtreecommitdiffstats
path: root/P3
diff options
context:
space:
mode:
authorMatt Strapp <strap012@umn.edu>2020-11-17 15:04:15 -0600
committerMatt Strapp <strap012@umn.edu>2020-11-17 15:04:15 -0600
commit5c0403e96329676cf693c9093d9f4b129ce23707 (patch)
tree7b5a08d9a3f9ed5dc08f11a270c666588fc0fde9 /P3
parentadd comment (diff)
downloadcsci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar.gz
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar.bz2
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar.lz
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar.xz
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.tar.zst
csci4061-5c0403e96329676cf693c9093d9f4b129ce23707.zip
add todo
Diffstat (limited to '')
-rw-r--r--P3/server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/P3/server.c b/P3/server.c
index 31c4db0..f6db56d 100644
--- a/P3/server.c
+++ b/P3/server.c
@@ -154,6 +154,7 @@ void * dispatch(void *arg) {
// Function to retrieve the request from the queue, process it and then return a result to the client
void * worker(void *arg) {
+ //TODO: Fix this (gcc does not like this case as void* and int are different sizes)
int id = (int) arg;
long numbytes;
unsigned long long numReqs = 0;
@@ -184,7 +185,7 @@ void * worker(void *arg) {
readFromDisk(... workerBuf);
//use fstat's stat_st to get numbytes?
struct stat* oob;
- fstat(request->fd, &oob);
+ fstat(request->fd, oob);
numbytes = oob->st_size;
//TODO: add return_error as well for when trying to find something that does not exist.
return_result(request->fd, getContentType(request->request), workerBuf, numbytes);