Skip to content

Commit

Permalink
broker: make handlers local to main()
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Nov 12, 2017
1 parent 08cd966 commit 5d58f38
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/broker/broker.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ typedef struct {
zlist_t *subscriptions; /* subscripts for internal services */
content_cache_t *cache;
int tbon_k;
flux_msg_handler_t **handlers;
/* Bootstrap
*/
hello_t *hello;
Expand Down Expand Up @@ -312,6 +311,7 @@ int main (int argc, char *argv[])
sigset_t old_sigmask;
struct sigaction old_sigact_int;
struct sigaction old_sigact_term;
flux_msg_handler_t **handlers;

memset (&ctx, 0, sizeof (ctx));
log_init (argv[0]);
Expand Down Expand Up @@ -581,7 +581,7 @@ int main (int argc, char *argv[])
if (rusage_initialize (ctx.h, "cmb") < 0)
log_err_exit ("rusage_initialize");

ctx.handlers = broker_add_services (&ctx);
handlers = broker_add_services (&ctx);

/* Initialize comms module infrastructure.
*/
Expand Down Expand Up @@ -671,7 +671,7 @@ int main (int argc, char *argv[])
hello_destroy (ctx.hello);
attr_destroy (ctx.attrs);
shutdown_destroy (ctx.shutdown);
broker_remove_services (ctx.handlers);
broker_remove_services (handlers);
flux_close (ctx.h);
flux_reactor_destroy (ctx.reactor);
if (ctx.subscriptions) {
Expand Down

0 comments on commit 5d58f38

Please sign in to comment.