From ce0727c4f43d4e043d8f0d338c8a4c8db53000f2 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Tue, 30 Apr 2013 17:22:00 +0200 Subject: leveldb: use outbuf for auctal_size --- datastore-leveldb/src/web.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/datastore-leveldb/src/web.cpp b/datastore-leveldb/src/web.cpp index cbadc57..443e782 100644 --- a/datastore-leveldb/src/web.cpp +++ b/datastore-leveldb/src/web.cpp @@ -173,6 +173,7 @@ void web_handle_api_range_size(const boost::cmatch &match, struct mg_connection outbuf.seekp(0); actual_size++; } - mg_printf(conn, "], \"actual_size\":%ld}\r\n", actual_size); + outbuf << "], \"actual_size\":" << actual_size << "}\r\n"; + mg_write(conn, outbuf.str().c_str(), outbuf.tellp()); delete it; } -- cgit v1.2.1