Skip to content

Commit

Permalink
Work with po6 dev version
Browse files Browse the repository at this point in the history
  • Loading branch information
rescrv committed Nov 30, 2016
1 parent 8d8ca67 commit 85907be
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 10 deletions.
7 changes: 6 additions & 1 deletion admin/admin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,12 @@ admin :: server_register(uint64_t token, const char* address,

server_id sid(token);
po6::net::location loc;
loc = po6::net::location(address);

if (!loc.set(address))
{
*status = HYPERDEX_ADMIN_EXCEPTION;
return -1;
}

int64_t id = m_next_admin_id;
++m_next_admin_id;
Expand Down
10 changes: 9 additions & 1 deletion admin/raw_backup.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,15 @@ hyperdex_admin_raw_backup(const char* host, uint16_t port,
{
try
{
busybee_single bbs(po6::net::location(host, port));
po6::net::location loc;

if (!loc.set(host, port))
{
*status = HYPERDEX_ADMIN_SERVERERROR;
return -1;
}

busybee_single bbs(loc);
const uint8_t type = static_cast<uint8_t>(BACKUP);
const uint8_t flags = 0;
const uint64_t version = 0;
Expand Down
4 changes: 2 additions & 2 deletions daemon/background_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
#include "daemon/background_thread.h"
#include "daemon/daemon.h"

using po6::threads::make_thread_wrapper;
using po6::threads::make_obj_func;
using hyperdex::background_thread;

background_thread :: background_thread(daemon* d)
: m_thread(make_thread_wrapper(&background_thread::run, this))
: m_thread(make_obj_func(&background_thread::run, this))
, m_gc(&d->m_gc)
, m_protect()
, m_wakeup_thread(&m_protect)
Expand Down
6 changes: 3 additions & 3 deletions daemon/daemon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#include <mach/mach.h>
#endif

using po6::threads::make_thread_wrapper;
using po6::threads::make_obj_func;
using hyperdex::daemon;

int s_interrupts = 0;
Expand Down Expand Up @@ -132,7 +132,7 @@ daemon :: daemon()
, m_perf_backup()
, m_perf_perf_counters()
, m_block_stat_path()
, m_stat_collector(make_thread_wrapper(&daemon::collect_stats, this))
, m_stat_collector(make_obj_func(&daemon::collect_stats, this))
, m_protect_stats()
, m_stats_start(0)
, m_stats()
Expand Down Expand Up @@ -345,7 +345,7 @@ daemon :: run(bool daemonize,
for (size_t i = 0; i < threads; ++i)
{
using namespace po6::threads;
e::compat::shared_ptr<thread> t(new thread(make_thread_wrapper(&daemon::loop, this, i)));
e::compat::shared_ptr<thread> t(new thread(make_obj_func(&daemon::loop, this, i)));
m_threads.push_back(t);
t->start();
}
Expand Down
1 change: 0 additions & 1 deletion daemon/datalayer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@

// ASSUME: all keys put into leveldb have a first byte without the high bit set

using po6::threads::make_thread_wrapper;
using hyperdex::datalayer;
using hyperdex::reconfigure_returncode;

Expand Down
1 change: 0 additions & 1 deletion daemon/replication_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "daemon/daemon.h"
#include "daemon/replication_manager.h"

using po6::threads::make_thread_wrapper;
using hyperdex::key_state;
using hyperdex::reconfigure_returncode;
using hyperdex::replication_manager;
Expand Down
1 change: 0 additions & 1 deletion daemon/state_transfer_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include "daemon/state_transfer_manager_transfer_in_state.h"
#include "daemon/state_transfer_manager_transfer_out_state.h"

using po6::threads::make_thread_wrapper;
using hyperdex::reconfigure_returncode;
using hyperdex::state_transfer_manager;
using hyperdex::transfer_id;
Expand Down
1 change: 1 addition & 0 deletions m4/anal_warnings.m4
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ AC_DEFUN([ANAL_WARNINGS],
AX_CHECK_COMPILE_FLAG([-Wvolatile-register-var],[WANAL_CFLAGS="${WANAL_CFLAGS} -Wvolatile-register-var"],,)
AX_CHECK_COMPILE_FLAG([-Wwrite-strings],[WANAL_CFLAGS="${WANAL_CFLAGS} -Wwrite-strings"],,)
AX_CHECK_COMPILE_FLAG([-Qunused-arguments],[WANAL_CFLAGS="${WANAL_CFLAGS} -Qunused-arguments"],,)
AX_CHECK_COMPILE_FLAG([-Wno-deprecated-declarations],[WANAL_CFLAGS="${WANAL_CFLAGS} -Wno-deprecated-declarations"],,)
fi
WANAL_CXXFLAGS="${WANAL_CFLAGS} ${WANAL_CXXFLAGS}"
WANAL_CFLAGS="${WANAL_CFLAGS} ${WANAL_CFLAGS_ONLY}"
Expand Down

0 comments on commit 85907be

Please sign in to comment.