Revision 1796 trunk/plugins/jsonrpc/mongoose_hacks.c

mongoose_hacks.c (revision 1796)
308 308
process_jsonrpc_tcp_connection(struct mg_connection *conn, char *line)
309 309
{
310 310
    int     api_version = 0;
311
#ifdef __APPLE__
312
    /* For some reason the memset below causes a segfault when the size is 512K */
313
    char    buf[256 * 1024];
314
#else
311 315
    char    buf[512 * 1024];
316
#endif
312 317
    int     request_len, nread;
313 318
    char   *response;
314 319

                
... ...
327 332

                
328 333
    while (TRUE) {
329 334
        nread = 0;
330
        memset(&buf, 0, sizeof(buf));
335
        memset(buf, 0, sizeof(buf));
331 336
        request_len = read_request_line(NULL, conn->client.sock, conn->ssl, buf, sizeof(buf) - 1, &nread);
332 337

                
333 338
        if (request_len <= 0) {

Also available in: Unified diff