No need to pass it as an extra argument to ctdb_start_daemon.
Also ensure options.public_address_list gets a nice static default.
Signed-off-by: Martin Schwenke <martin@meltin.net>
int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork,
- bool use_syslog,
- const char *public_address_list);
+ bool use_syslog);
struct ctdb_call_state *ctdbd_call_send(struct ctdb_db_context *ctdb_db, struct ctdb_call *call);
int ctdbd_call_recv(struct ctdb_call_state *state, struct ctdb_call *call);
/*
start the protocol going as a daemon
*/
-int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog, const char *public_address_list)
+int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork, bool use_syslog)
{
int res, ret = -1;
struct fd_event *fde;
initialise_node_flags(ctdb);
- if (public_address_list) {
- ctdb->public_addresses_file = public_address_list;
+ if (ctdb->public_addresses_file) {
ret = ctdb_set_public_addresses(ctdb, true);
if (ret == -1) {
DEBUG(DEBUG_ALERT,("Unable to setup public address list\n"));
int max_persistent_check_errors;
} options = {
.nlist = NULL,
+ .public_address_list = NULL,
.transport = "tcp",
.event_script_dir = NULL,
.logfile = LOGDIR "/log.ctdb",
ctdb->do_setsched = 1;
}
+ ctdb->public_addresses_file = options.public_address_list;
ctdb->do_checkpublicip = !options.no_publicipcheck;
if (options.max_persistent_check_errors < 0) {
}
/* start the protocol running (as a child) */
- return ctdb_start_daemon(ctdb, interactive?false:true, options.use_syslog, options.public_address_list);
+ return ctdb_start_daemon(ctdb, interactive?false:true, options.use_syslog);
}