diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-05-06 22:20:05 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-05-06 22:20:21 +0000 |
commit | f80c52cfe4e08fba39995830a3fcf5835d0bb846 (patch) | |
tree | 4ed83563f04c68492f79c3f7b9e1089356db01f7 /http_put.c | |
parent | b60e0eebc4e108f63372f9a0ffe318589599728f (diff) | |
download | cmogstored-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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |