jni: Revert dependency on CrystaX 10.1.0 and fixes for new versions of NFD and ndn-cxx
The new CrystaX release has (yet unknown) issue that prevents code from
working properly
Change-Id: I5c34dc12ea653c7b7ec694640b5d0ecd6648b1d5
diff --git a/app/src/main/jni/ndn-cxx.mk b/app/src/main/jni/ndn-cxx.mk
index fc758f6..8f6ecea 100644
--- a/app/src/main/jni/ndn-cxx.mk
+++ b/app/src/main/jni/ndn-cxx.mk
@@ -5,7 +5,7 @@
LOCAL_MODULE := ndn-cxx
NDN_CXX_BOOST_LIBS = system filesystem date_time iostreams program_options chrono random
LOCAL_SHARED_LIBRARIES := cryptopp $(addsuffix _shared,$(addprefix boost_,$(NDN_CXX_BOOST_LIBS)))
-LOCAL_STATIC_LIBRARIES := sqlite3_static boost_regex_static
+LOCAL_STATIC_LIBRARIES := sqlite3 boost_regex_static
NDN_CXX_SRC_FILES := \
data.cpp \
encoding/block.cpp \
@@ -115,6 +115,6 @@
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH_SAVED)/cryptopp/Android.mk
+include $(LOCAL_PATH_SAVED)/sqlite3/Android.mk
$(call import-module,boost/1.57.0)
-$(call import-module,sqlite/3)
diff --git a/app/src/main/jni/nfd-wrapper.cpp b/app/src/main/jni/nfd-wrapper.cpp
index a5544a8..d88413e 100644
--- a/app/src/main/jni/nfd-wrapper.cpp
+++ b/app/src/main/jni/nfd-wrapper.cpp
@@ -77,9 +77,10 @@
" strategy_choice\n"
" {\n"
" / /localhost/nfd/strategy/best-route\n"
- " /localhost /localhost/nfd/strategy/broadcast\n"
+ " /localhost /localhost/nfd/strategy/multicast\n"
" /localhost/nfd /localhost/nfd/strategy/best-route\n"
- " /ndn/broadcast /localhost/nfd/strategy/broadcast\n"
+ " /ndn/broadcast /localhost/nfd/strategy/multicast\n"
+ " /ndn/multicast /localhost/nfd/strategy/multicast\n"
" }\n"
"}\n"
"\n"
@@ -164,6 +165,7 @@
std::unique_lock<std::mutex> lock(m_pointerMutex);
m_io = &getGlobalIoService();
}
+
m_io->run();
m_io->reset();
}
@@ -249,6 +251,9 @@
NFD_LOG_INFO("Use [" << nfd::g_params["homePath"] << "] as a security storage");
nfd::g_thread = boost::thread([] {
+ nfd::scheduler::resetGlobalScheduler();
+ nfd::resetGlobalIoService();
+
NFD_LOG_INFO("Starting NFD...");
try {
nfd::g_runner.reset(new nfd::Runner());
diff --git a/app/src/main/jni/sqlite3 b/app/src/main/jni/sqlite3
new file mode 160000
index 0000000..b2b9ab5
--- /dev/null
+++ b/app/src/main/jni/sqlite3
@@ -0,0 +1 @@
+Subproject commit b2b9ab529987de81585ce6bf7bcfab91917f37af