1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

make it compile

This commit is contained in:
Jeff Becker 2020-02-27 15:32:50 -05:00 committed by Thomas Winget
parent d0b909f881
commit da79b14703
8 changed files with 9 additions and 9 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -56,7 +56,7 @@ namespace tooling
if(eventQueue.tryPushBack(std::move(event)) if(eventQueue.tryPushBack(std::move(event))
!= llarp::thread::QueueReturn::Success) != 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.");
} }
} }