Fix regression in 32b9096, only pick next :ID for inetd services

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2017-12-17 14:54:46 +01:00
parent 7362e6d00a
commit d6b2ac94dd
+4 -1
View File
@@ -633,12 +633,15 @@ int service_register(int type, char *cfg, struct rlimit rlimit[], struct timeval
svc = inetd_find_svc(cmd, service, proto);
if (svc)
goto inetd_setup;
if (id <= 0)
id = svc_next_id(cmd);
}
recreate:
#endif
if (id <= 0)
id = svc_next_id(cmd);
id = 1;
svc = svc_find(cmd, id);
if (!svc) {