ev_send_loop(&main_birdloop, &c->done_event);
}
-static int
+static void
global_commit(struct config *new, struct config *old)
{
if (!old)
- return 0;
+ return;
if (!new->router_id)
{
new->router_id = id;
}
}
-
- return 0;
}
static int
DBG("filter_commit\n");
filter_commit(c, old_config);
DBG("sysdep_commit\n");
- int force_restart = sysdep_commit(c, old_config);
+ sysdep_commit(c, old_config);
DBG("global_commit\n");
- force_restart |= global_commit(c, old_config);
+ global_commit(c, old_config);
mpls_commit(c, old_config);
DBG("rt_commit\n");
rt_commit(c, old_config);
DBG("protos_commit\n");
- protos_commit(c, old_config, force_restart, type);
+ protos_commit(c, old_config, type);
int obs = old_config ?
atomic_fetch_sub_explicit(&old_config->obstacle_count, 1, memory_order_acq_rel) - 1
: 0;
struct config *new;
struct config *old;
enum protocol_startup phase;
- int force_reconfig;
int type;
} protos_commit_request;
static int proto_rethink_goal_pending = 0;
-static void protos_do_commit(struct config *new, struct config *old, int force_reconfig, int type);
+static void protos_do_commit(struct config *new, struct config *old, int type);
/**
* protos_commit - commit new protocol configuration
* @new: new configuration
* @old: old configuration or %NULL if it's boot time config
- * @force_reconfig: force restart of all protocols (used for example
- * when the router ID changes)
* @type: type of reconfiguration (RECONFIG_SOFT or RECONFIG_HARD)
*
* Scan differences between @old and @new configuration and adjust all
* configuration after the shutdown is completed.
*/
void
-protos_commit(struct config *new, struct config *old, int force_reconfig, int type)
+protos_commit(struct config *new, struct config *old, int type)
{
protos_commit_request = (struct protos_commit_request) {
.new = new,
.old = old,
.phase = (new->shutdown && !new->gr_down) ? PROTOCOL_STARTUP_REGULAR : PROTOCOL_STARTUP_NECESSARY,
- .force_reconfig = force_reconfig,
.type = type,
};
- protos_do_commit(new, old, force_reconfig, type);
+ protos_do_commit(new, old, type);
}
static void
-protos_do_commit(struct config *new, struct config *old, int force_reconfig, int type)
+protos_do_commit(struct config *new, struct config *old, int type)
{
enum protocol_startup phase = protos_commit_request.phase;
struct proto_config *oc, *nc;
nc->proto = p;
/* We will try to reconfigure protocol p */
- if (!force_reconfig && proto_reconfigure(p, oc, nc, type))
+ if (proto_reconfigure(p, oc, nc, type))
{
PROTO_LEAVE_FROM_MAIN(proto_loop);
continue;
/* If something is pending, the next round will be called asynchronously from proto_rethink_goal(). */
if (!proto_rethink_goal_pending)
- protos_do_commit(new, old, force_reconfig, type);
+ protos_do_commit(new, old, type);
}
static void
protos_do_commit(
protos_commit_request.new,
protos_commit_request.old,
- protos_commit_request.force_reconfig,
protos_commit_request.type
);
}
void protos_build(void); /* Called from sysdep to initialize protocols */
void proto_build(struct protocol *); /* Called from protocol to register itself */
void protos_preconfig(struct config *);
-void protos_commit(struct config *new, struct config *old, int force_restart, int type);
+void protos_commit(struct config *new, struct config *old, int type);
struct proto * proto_spawn(struct proto_config *cf, uint disabled);
void protos_dump_all(void);