restrict http send buffer to 4096 19/3119/1
authorAndy Green <andy.green@linaro.org>
Mon, 18 Feb 2013 03:32:49 +0000 (11:32 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:37 +0000 (13:01 -0800)
send() is able to complete but not send everything asked...
we don't deal with that yet.  On an ARM9 board, leaf.jpg
failed because the send() only accepted 7240 of 8192... not
a failure but it implies reporting partial send to the
caller.  Work around by keeping the send buffer at 4096.

Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-server.c

index c01bb62..8ab4cb1 100644 (file)
@@ -124,7 +124,7 @@ static int callback_http(struct libwebsocket_context *context,
        char buf[256];
        int n;
        unsigned char *p;
-       static unsigned char buffer[8192];
+       static unsigned char buffer[4096];
        struct stat stat_buf;
        struct per_session_data__http *pss = (struct per_session_data__http *)user;
 #ifdef EXTERNAL_POLL