make it compile

pull/1184/head
Jeff Becker 4 years ago committed by Thomas Winget
parent d0b909f881
commit da79b14703

@ -211,7 +211,6 @@ add_library(${STATIC_LIB} STATIC ${LIB_SRC})
if(WITH_HIVE)
set(LIB_SRC ${LIB_SRC} tooling/router_hive.cpp tooling/router_event.cpp)
target_include_directories(${STATIC_LIB} PUBLIC ${CMAKE_SOURCE_DIR}/tooling)
endif()
target_include_directories(${STATIC_LIB} PUBLIC ${CURL_INCLUDE_DIRS})

@ -10,6 +10,7 @@
#include <ev/ev.h>
#include <functional>
#include <router_contact.hpp>
#include <tooling/router_event.hpp>
struct llarp_buffer_t;
struct llarp_dht_context;
@ -19,7 +20,6 @@ struct llarp_threadpool;
namespace tooling
{
struct RouterHive;
struct RouterEvent;
} // namespace tooling
namespace llarp
@ -273,7 +273,7 @@ namespace llarp
GossipRCIfNeeded(const RouterContact rc) = 0;
virtual void
NotifyRouterEvent(tooling::RouterEvent event) const = 0;
NotifyRouterEvent(const tooling::RouterEvent & event) const = 0;
};
} // namespace llarp

@ -23,8 +23,8 @@
#include <util/str.hpp>
#include <ev/ev.hpp>
#ifdef LOKINET_HIVE
#include "tooling/router_event.hpp"
#ifdef LOKINET_HIVE
#include "tooling/router_hive.hpp"
#endif
@ -131,12 +131,12 @@ namespace llarp
}
void
Router::NotifyRouterEvent(tooling::RouterEvent event) const
Router::NotifyRouterEvent(const tooling::RouterEvent & event) const
{
#ifdef LOKINET_HIVE
hive->NotifyEvent(event);
#elif LOKINET_DEBUG
LogDebug(event.ToString);
LogDebug(event.ToString());
#endif
}

@ -315,7 +315,7 @@ namespace llarp
GossipRCIfNeeded(const RouterContact rc) override;
void
NotifyRouterEvent(tooling::RouterEvent event) const override;
NotifyRouterEvent(const tooling::RouterEvent & event) const override;
Router(std::shared_ptr< llarp::thread::ThreadPool > worker,
llarp_ev_loop_ptr __netloop, std::shared_ptr< Logic > logic);

@ -33,6 +33,7 @@ namespace tooling
llarp::RouterID routerID;
};
struct PathBuildAttemptEvent : public RouterEvent
{
PathBuildAttemptEvent(const llarp::RouterID& routerID, std::vector<llarp::path::PathHopConfig> hops);
@ -42,6 +43,6 @@ namespace tooling
std::string ToString() const override;
std::vector<llarp::path::PathHopConfig> hops;
}
};
} // namespace tooling

@ -56,7 +56,7 @@ namespace tooling
if(eventQueue.tryPushBack(std::move(event))
!= llarp::thread::QueueReturn::Success)
{
LogError("RouterHive Event Queue appears to be full. Either implement/change time dilation or increase the queue size.");
llarp::LogError("RouterHive Event Queue appears to be full. Either implement/change time dilation or increase the queue size.");
}
}
Loading…
Cancel
Save