about summary refs log tree commit homepage
path: root/http.c
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-07-03 07:32:52 +0000
committerEric Wong <normalperson@yhbt.net>2013-07-10 00:56:22 +0000
commitb600fc854d2a813dc7cf08eb58590ada90db4c02 (patch)
tree7ddfd78ce312179e50d39fd1bbfdb439fab5df79 /http.c
parent013e903340a75b12523bd795d15fe5f23d725be9 (diff)
downloadcmogstored-b600fc854d2a813dc7cf08eb58590ada90db4c02.tar.gz
This allows us to avoid a redundant hash lookup every time we
"activate" an open file for reading or writing.
Diffstat (limited to 'http.c')
-rw-r--r--http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/http.c b/http.c
index e440d2b..3ba33bb 100644
--- a/http.c
+++ b/http.c
@@ -160,11 +160,11 @@ static enum mog_next http_forward_in_progress(struct mog_fd *mfd, bool needq)
 {
         struct mog_http *http = &mfd->as.http;
         enum mog_http_method method = http->_p.http_method;
-        struct mog_dev *dev;
 
         if (needq) {
-                dev = mog_dev_for(http->svc, http->_p.mog_devid, false);
-                if (dev && !mog_ioq_ready(&dev->ioq, mfd))
+                struct mog_file *file = &http->forward->as.file;
+
+                if (file->ioq && !mog_ioq_ready(file->ioq, mfd))
                         /* no need to setup/stash rbuf, it's been done */
                         return MOG_NEXT_IGNORE;
         }