#include "util_tdb.h"
#include "../lib/util/pidfile.h"
#include "serverid.h"
+#include "lib/util/server_id_db.h"
#include "cmdline_contexts.h"
#include "lib/util/string_wrappers.h"
#include "lib/global_contexts.h"
.pid = (uint64_t)-1,
};
pid_t pid;
+ struct server_id_db *names_db = NULL;
+ bool ok;
/* Zero is a special return value for broadcast to all processes */
return pid_to_procid(pid);
}
+ names_db = messaging_names_db(msg);
+ if (names_db == NULL) {
+ goto fail;
+ }
+ ok = server_id_db_lookup_one(names_db, dest, &result);
+ if (ok) {
+ return result;
+ }
+
+fail:
fprintf(stderr,"Can't find pid for destination '%s'\n", dest);
return result;