about summary refs log tree commit homepage
path: root/http_put.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-05-06 22:20:05 +0000
committerEric Wong <normalperson@yhbt.net>2013-05-06 22:20:21 +0000
commitf80c52cfe4e08fba39995830a3fcf5835d0bb846 (patch)
tree4ed83563f04c68492f79c3f7b9e1089356db01f7 /http_put.c
parentb60e0eebc4e108f63372f9a0ffe318589599728f (diff)
downloadcmogstored-f80c52cfe4e08fba39995830a3fcf5835d0bb846.tar.gz
We will key most client events by pid() and file descriptors,
as this is least ambiguous.  There are some minor refactorings
to pass "struct mog_fd *" around as much as possible instead of
"struct mog_http *".
Diffstat (limited to 'http_put.c')
-rw-r--r--http_put.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/http_put.c b/http_put.c
index a47d944..360c46e 100644
--- a/http_put.c
+++ b/http_put.c
@@ -362,12 +362,13 @@ static struct mog_file * open_put(struct mog_http *http, char *path)
         return file;
 }
 
-void mog_http_put(struct mog_http *http, char *buf, size_t buf_len)
+void mog_http_put(struct mog_fd *mfd, char *buf, size_t buf_len)
 {
+        struct mog_http *http = &mfd->as.http;
         char *path;
         struct mog_file *file;
 
-        if (mog_fd_of(http)->fd_type == MOG_FD_TYPE_HTTPGET) {
+        if (mfd->fd_type == MOG_FD_TYPE_HTTPGET) {
                 mog_http_resp(http, "405 Method Not Allowed", false);
                 return;
         }