提交 40d59693 编写于 作者: L laiguizhong

修改Cjson为动态库

Signed-off-by: Nlaiguizhong <laiguizhong@huawei.com>
上级 7525b21e
...@@ -183,7 +183,7 @@ if (defined(ohos_lite)) { ...@@ -183,7 +183,7 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/services/param/linux:param_client", "//base/startup/init_lite/services/param/linux:param_client",
"//base/startup/init_lite/services/utils:libinit_utils", "//base/startup/init_lite/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared", "//third_party/bounds_checking_function:libsec_shared",
"//third_party/cJSON:cjson_static", "//third_party/cJSON:cjson",
"//third_party/mbedtls:mbedtls_shared", "//third_party/mbedtls:mbedtls_shared",
] ]
external_deps = [ external_deps = [
......
...@@ -163,7 +163,7 @@ int SystemSetParameter(const char *name, const char *value) ...@@ -163,7 +163,7 @@ int SystemSetParameter(const char *name, const char *value)
} }
fd = g_clientFd; fd = g_clientFd;
pthread_mutex_unlock(&g_clientMutex); pthread_mutex_unlock(&g_clientMutex);
PARAM_CHECK(fd > 0, return -1, "Failed to connect server for set %s", name); PARAM_CHECK(fd >= 0, return -1, "Failed to connect server for set %s", name);
ret = StartRequest(fd, request, DEFAULT_PARAM_SET_TIMEOUT); ret = StartRequest(fd, request, DEFAULT_PARAM_SET_TIMEOUT);
free(request); free(request);
PARAM_LOGI("SystemSetParameter name %s %d", name, ret); PARAM_LOGI("SystemSetParameter name %s %d", name, ret);
...@@ -212,7 +212,7 @@ int SystemWaitParameter(const char *name, const char *value, int32_t timeout) ...@@ -212,7 +212,7 @@ int SystemWaitParameter(const char *name, const char *value, int32_t timeout)
timeout = 1; timeout = 1;
#endif #endif
int fd = GetClientSocket(timeout); int fd = GetClientSocket(timeout);
PARAM_CHECK(fd > 0, return -1, "Failed to connect server for wait %s", name); PARAM_CHECK(fd >= 0, return -1, "Failed to connect server for wait %s", name);
ret = StartRequest(fd, request, timeout); ret = StartRequest(fd, request, timeout);
close(fd); close(fd);
free(request); free(request);
......
...@@ -205,7 +205,7 @@ ohos_unittest("init_unittest") { ...@@ -205,7 +205,7 @@ ohos_unittest("init_unittest") {
"//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken", "//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc", "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
"//third_party/bounds_checking_function:libsec_static", "//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static", "//third_party/cJSON:cjson",
"//third_party/googletest:gmock", "//third_party/googletest:gmock",
"//third_party/googletest:gtest", "//third_party/googletest:gtest",
"//third_party/mbedtls:mbedtls_shared", "//third_party/mbedtls:mbedtls_shared",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册