summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h1
-rw-r--r--ctrl/libhicnctrl/src/hicn_plugin_api.c10
-rw-r--r--hicn-light/src/hicn/CMakeLists.txt46
3 files changed, 29 insertions, 28 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index 65633c249..e7cd39ebf 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -387,6 +387,7 @@ int hc_sock_reset(hc_sock_t *s);
#else
#define INTERFACE_LEN IFNAMSIZ
#endif
+
#define MAXSZ_HC_NAME_ SYMBOLIC_NAME_LEN
#define MAXSZ_HC_NAME MAXSZ_HC_NAME_ + NULLTERM
diff --git a/ctrl/libhicnctrl/src/hicn_plugin_api.c b/ctrl/libhicnctrl/src/hicn_plugin_api.c
index 233abb0f8..b2de6cc2f 100644
--- a/ctrl/libhicnctrl/src/hicn_plugin_api.c
+++ b/ctrl/libhicnctrl/src/hicn_plugin_api.c
@@ -1337,8 +1337,14 @@ int hc_face_create(hc_sock_t *s, hc_face_t *face) {
.parse = (HC_PARSE)parse_face_create,
};
- return hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, NULL,
- false);
+ hc_data_t *data;
+
+ int ret = hc_execute_command(s, (hc_msg_t *)&msg, sizeof(msg), &params, &data,
+ false);
+ if (ret == 0)
+ face->id = ((hc_face_t *)data->buffer)->id;
+
+ return ret;
}
/* FACE DELETE */
diff --git a/hicn-light/src/hicn/CMakeLists.txt b/hicn-light/src/hicn/CMakeLists.txt
index 64b0ff2a0..3b4ead33f 100644
--- a/hicn-light/src/hicn/CMakeLists.txt
+++ b/hicn-light/src/hicn/CMakeLists.txt
@@ -16,7 +16,9 @@ list(APPEND COMPILER_DEFINITIONS
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android" AND NOT COMPILE_FOR_IOS)
add_subdirectory(command_line)
-endif ()
+else ()
+ add_subdirectory(command_line/controller)
+endif()
add_subdirectory(config)
add_subdirectory(content_store)
@@ -42,29 +44,21 @@ list(APPEND TO_INSTALL_HEADER_FILES
${CMAKE_CURRENT_BINARY_DIR}/hicn-light/config.h
)
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Android")
- build_library(${LIBHICN_LIGHT}
- STATIC
- SOURCES ${SOURCE_FILES}
- INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
- LINK_LIBRARIES ${LIBRARIES}
- DEPENDS ${DEPENDENCIES}
- COMPONENT ${HICN_LIGHT}
- INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
- INSTALL_ROOT_DIR hicn
- DEFINITIONS ${COMPILER_DEFINITIONS}
- )
-else ()
- build_library(${LIBHICN_LIGHT}
- STATIC NO_DEV
- SOURCES ${SOURCE_FILES}
- INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
- LINK_LIBRARIES ${LIBRARIES}
- DEPENDS ${DEPENDENCIES}
- COMPONENT ${HICN_LIGHT}
- INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
- INSTALL_ROOT_DIR hicn
- DEFINITIONS ${COMPILER_DEFINITIONS}
- )
-endif ()
+if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
+ set(LIB_BUILD_TYPE "NO_DEV")
+else()
+ set(LIB_BUILD_TYPE "")
+endif()
+
+build_library(${LIBHICN_LIGHT}
+ STATIC ${LIB_BUILD_TYPE}
+ SOURCES ${SOURCE_FILES}
+ INSTALL_HEADERS ${TO_INSTALL_HEADER_FILES}
+ LINK_LIBRARIES ${LIBRARIES}
+ DEPENDS ${DEPENDENCIES}
+ COMPONENT ${HICN_LIGHT}
+ INCLUDE_DIRS ${HICN_LIGHT_INCLUDE_DIRS}
+ INSTALL_ROOT_DIR hicn
+ DEFINITIONS ${COMPILER_DEFINITIONS}
+)