If there's another process around there will typically be at most
one process. So there is no real need to run the plural version of
serverid_exists.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
unsigned num_servers, struct server_id *servers)
{
struct server_id me = server_id_db_pid(db);
- bool exists[num_servers];
- bool ok;
int i;
- ok = serverids_exist(servers, num_servers, exists);
- if (!ok) {
- return ENOMEM;
- }
-
for (i=0; i<num_servers; i++) {
int ret;
continue;
}
- if (exists[i]) {
+ if (serverid_exists(&servers[i])) {
return EEXIST;
}