Skip to content
Snippets Groups Projects
Commit ffbd2a0f authored by Teemu Ikonen's avatar Teemu Ikonen Committed by Philippe Gorley
Browse files

Fix 'configure --enable-restbed-old-api'.


(It would probably be enough to just include config.h, but now the
intention is clearer)

Change-Id: Ia427d940b5b9e94b6ba174fc38e9d638d507ae45
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent 97579542
No related branches found
No related tags found
No related merge requests found
......@@ -430,7 +430,7 @@ AC_ARG_WITH([restcpp],
AS_HELP_STRING([--with-restcpp], [enable rest support with C++]))
AC_ARG_ENABLE([restbed_old_api], AS_HELP_STRING([--enable-restbed-old-api], [Use the old restbed API]))
AS_IF([test "x$enable_restbed_old_api" = "xyes"], [
AC_DEFINE([RESTBED_OLD_API], [], [Defined if you use the old restbed API])
AC_DEFINE([RESTBED_OLD_API], [1], [Defined if you use the old restbed API])
])
AS_IF([test "x$enable_ringns" != "xno" || test "x$with_restcpp" = "xyes"], [
......
......@@ -21,6 +21,7 @@
#include "string_utils.h"
#include "thread_pool.h"
#include "fileutils.h"
#include "config.h"
#include <msgpack.hpp>
#include <json/json.h>
......@@ -93,10 +94,11 @@ NameDirectory& NameDirectory::instance(const std::string& server)
size_t getContentLength(restbed::Response& reply)
{
size_t length = 0;
#ifndef RESTBED_OLD_API
length =
#endif
#ifdef RESTBED_OLD_API
reply.get_header("Content-Length", length);
#else
length = reply.get_header("Content-Length", 0);
#endif
return length;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment