]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix for old libevent.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Sun, 6 Jan 2013 13:32:45 +0000 (17:32 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Sun, 6 Jan 2013 13:32:45 +0000 (17:32 +0400)
src/webui.c

index 92b8c601c1205b2b180287a106cdf85fc67dc20c..05c64fc1d0d0d705765b9aff1bff9e13d4b30607 100644 (file)
@@ -225,7 +225,11 @@ http_calculate_content_length (struct evbuffer *evb, struct evhttp_request *req)
 {
        gchar                                                                    numbuf[64];
 
+#if _EVENT_NUMERIC_VERSION > 0x02000000
        rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evbuffer_get_length (evb));
+#else
+       rspamd_snprintf (numbuf, sizeof (numbuf), "%z", evb->totallen);
+#endif
        evhttp_add_header(req->output_headers, "Content-Length", numbuf);
 }