提交 1beb0c6e 编写于 作者: R renwei

fix args check error

Signed-off-by: Nrenwei <renwei8@huawei.com>
Change-Id: Ic2fcd6a8eac85a8357c94cf8016ff3889803a5e4
上级 f018135a
......@@ -211,7 +211,7 @@ int CreateServiceSocket(Service *service)
while (tmpSock != NULL) {
PluginExecCmdByName("setSockCreateCon", service->name);
int fd = CreateSocket(tmpSock);
PluginExecCmdByName("setSockCreateCon", NULL);
PluginExecCmdByName("setSockCreateCon", "");
INIT_CHECK_RETURN_VALUE(fd >= 0, -1);
if (IsOnDemandService(service)) {
if (IsConnectionBasedSocket(tmpSock)) {
......
......@@ -71,7 +71,7 @@ static int SetServiceContent(int id, const char *name, int argc, const char **ar
static int SetSockCreateCon(int id, const char *name, int argc, const char **argv)
{
PLUGIN_CHECK(name != NULL && argc >= 1 && argv != NULL, return -1, "Invalid parameter");
if (argv[0] == NULL) {
if (strcmp(argv[0], "") == 0) {
setsockcreatecon(NULL);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册