提交 41c67c1b 编写于 作者: X xionglei6

fix: ueventd start ondemand

Signed-off-by: Nxionglei6 <xionglei6@huawei.com>
上级 93bec381
...@@ -202,6 +202,7 @@ void SocketDelWatcher(ServiceWatcher watcherHandle) ...@@ -202,6 +202,7 @@ void SocketDelWatcher(ServiceWatcher watcherHandle)
int CreateServiceSocket(Service *service) int CreateServiceSocket(Service *service)
{ {
INIT_CHECK(service != NULL && service->socketCfg != NULL, return 0); INIT_CHECK(service != NULL && service->socketCfg != NULL, return 0);
INIT_CHECK(service->socketCfg->sockFd == -1, return 0);
int ret = 0; int ret = 0;
ServiceSocket *tmpSock = service->socketCfg; ServiceSocket *tmpSock = service->socketCfg;
while (tmpSock != NULL) { while (tmpSock != NULL) {
......
...@@ -158,6 +158,7 @@ static int StartUeventd(char **requiredDevices, int num) ...@@ -158,6 +158,7 @@ static int StartUeventd(char **requiredDevices, int num)
return -1; return -1;
} }
RetriggerUevent(ueventSockFd, requiredDevices, num); RetriggerUevent(ueventSockFd, requiredDevices, num);
close(ueventSockFd);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册