-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[minor cleanup]: Use different variable for flux_msg_handler_t pointers #1219
Comments
Works for me. Sorry for my laziness. |
It's worth mentioning if |
The common use case is to statically initialize static struct flux_msg_handler_spec sim_htab[] = {
{FLUX_MSGTYPE_EVENT, "sim.start", start_cb, 0, NULL},
{FLUX_MSGTYPE_REQUEST, "sched.trigger", trigger_cb, 0, NULL},
{FLUX_MSGTYPE_EVENT, "sched.res.*", sim_res_event_cb, 0, NULL},
FLUX_MSGHANDLER_TABLE_END,
}; and then pass to addvec/delvec if (flux_msg_handler_addvec (ctx->h, sim_htab, (void *)h) < 0) {
flux_log (ctx->h, LOG_ERR, "flux_msg_handler_addvec: %s", strerror (errno));
goto done;
} so possibly the name of that structure member won't be a problem in sched. |
This should be closed when #1277 is merged, since it makes the |
it makes the |
Oh OK, sounds good. |
Use a more sensible variable name for flux_msg_handler_t than "w", etc.. Fixes flux-framework#1219
I got confused looking at some code in
msg_handler.c
andreactor.c
until I realizedw
is used forflux_msg_handler_t
pointers and also forflux_watcher_t
pointers.Looking back,
flux_msg_handler_t
was onceflux_msg_watcher_t
, thus the legacy naming. We could update it.The text was updated successfully, but these errors were encountered: