diff --git a/nstackx_ctrl/core/nstackx_common.c b/nstackx_ctrl/core/nstackx_common.c index 8e5a16d..779a92a 100644 --- a/nstackx_ctrl/core/nstackx_common.c +++ b/nstackx_ctrl/core/nstackx_common.c @@ -912,7 +912,8 @@ static int32_t CheckInterfaceInfo(const NSTACKX_InterfaceInfo *ifaces, uint32_t { for (uint32_t i = 0; i < count; ++i) { if (!IsNetworkNameValid(ifaces[i].networkName, sizeof(ifaces[i].networkName)) || - !IsIpAddressValid(ifaces[i].networkIpAddr, sizeof(ifaces[i].networkIpAddr))) { + !IsIpAddressValid(ifaces[i].networkIpAddr, sizeof(ifaces[i].networkIpAddr)) || + !IsNetworkNameValid(ifaces[i].serviceData, sizeof(ifaces[i].serviceData))) { DFINDER_LOGE(TAG, "invalid network name or ip address of No.%u local iface", i); return NSTACKX_EINVAL; } diff --git a/nstackx_ctrl/core/nstackx_device_local.c b/nstackx_ctrl/core/nstackx_device_local.c index d3a2f26..bdbb7f0 100644 --- a/nstackx_ctrl/core/nstackx_device_local.c +++ b/nstackx_ctrl/core/nstackx_device_local.c @@ -26,6 +26,7 @@ #include "nstackx_list.h" #include "nstackx_inet.h" + #define TAG "LOCALDEVICE" enum { IFACE_STATE_READY, diff --git a/nstackx_ctrl/include/json_payload.h b/nstackx_ctrl/include/json_payload.h index f103a87..9902fb3 100644 --- a/nstackx_ctrl/include/json_payload.h +++ b/nstackx_ctrl/include/json_payload.h @@ -16,7 +16,6 @@ #ifndef JSON_PAYLOAD_H #define JSON_PAYLOAD_H -#include #include "nstackx.h" #ifdef __cplusplus diff --git a/nstackx_ctrl/include/nstackx_device_local.h b/nstackx_ctrl/include/nstackx_device_local.h index b5bcf62..3c6d812 100644 --- a/nstackx_ctrl/include/nstackx_device_local.h +++ b/nstackx_ctrl/include/nstackx_device_local.h @@ -16,8 +16,8 @@ #ifndef NSTACKX_DEVICE_LOCAL_H #define NSTACKX_DEVICE_LOCAL_H + #include "nstackx_device.h" -#include "coap_app.h" #ifdef __cplusplus extern "C" { diff --git a/nstackx_ctrl/interface/nstackx.h b/nstackx_ctrl/interface/nstackx.h index 119c265..ec43194 100644 --- a/nstackx_ctrl/interface/nstackx.h +++ b/nstackx_ctrl/interface/nstackx.h @@ -20,6 +20,7 @@ #include #include + #ifdef __cplusplus extern "C" { #endif