about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-06-26 00:41:54 +0000
committerEric Wong <normalperson@yhbt.net>2013-07-10 00:55:49 +0000
commit70efa665edeef05f53978f9d541f411b0e1a2b2a (patch)
treedd47ba56a3724efff70ebc74855873259a92d48e
parentc86b6a2c769c821a64fc14c62a953244b41cb190 (diff)
downloadcmogstored-70efa665edeef05f53978f9d541f411b0e1a2b2a.tar.gz
We need to ensure we do not introduce code to launch
http_process_client while we have buffered data (or socket write
errors).
-rw-r--r--http.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/http.c b/http.c
index a4c2cb8..5509e08 100644
--- a/http.c
+++ b/http.c
@@ -64,6 +64,9 @@ http_process_client(struct mog_fd *mfd, char *buf, size_t buf_len)
 {
         struct mog_http *http = &mfd->as.http;
 
+        assert(http->wbuf == NULL &&
+               "processing client with buffered data");
+
         switch (http->_p.http_method) {
         case MOG_HTTP_METHOD_NONE: assert(0 && "BUG: unset HTTP method");
         case MOG_HTTP_METHOD_GET: mog_http_get_open(mfd, buf); break;