/* Send no message. Useful for testing. */
-static bool do_noop(struct messaging_context *msg_ctx,
+static bool do_noop(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Send a debug string */
-static bool do_debug(struct messaging_context *msg_ctx,
+static bool do_debug(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
}
-static bool do_idmap(struct messaging_context *msg_ctx,
+static bool do_idmap(struct tevent_context *ev,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return 0;
}
-static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
- const int argc, const char **argv)
+ const int argc, const char **argv)
{
pid_t dest;
int count = 0;
#else /* defined(HAVE_LIBUNWIND_PTRACE) && defined(HAVE_LINUX_PTRACE) */
-static bool do_daemon_stack_trace(struct messaging_context *msg_ctx,
+static bool do_daemon_stack_trace(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
- const int argc, const char **argv)
+ const int argc, const char **argv)
{
fprintf(stderr,
"Daemon stack tracing is not supported on this platform\n");
/* Inject a fault (fatal signal) into a running smbd */
-static bool do_inject_fault(struct messaging_context *msg_ctx,
+static bool do_inject_fault(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
- const int argc, const char **argv)
+ const int argc, const char **argv)
{
if (argc != 2) {
fprintf(stderr, "Usage: smbcontrol <dest> inject "
/* Force a browser election */
-static bool do_election(struct messaging_context *msg_ctx,
+static bool do_election(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
num_replies++;
}
-static bool do_ping(struct messaging_context *msg_ctx,
+static bool do_ping(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Set profiling options */
-static bool do_profile(struct messaging_context *msg_ctx,
+static bool do_profile(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
send_message(msg_ctx, pid, MSG_PROFILELEVEL, &v, sizeof(int));
}
-static bool do_profilelevel(struct messaging_context *msg_ctx,
+static bool do_profilelevel(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Display debug level settings */
-static bool do_debuglevel(struct messaging_context *msg_ctx,
+static bool do_debuglevel(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Send a print notify message */
-static bool do_printnotify(struct messaging_context *msg_ctx,
+static bool do_printnotify(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Close a share */
-static bool do_closeshare(struct messaging_context *msg_ctx,
+static bool do_closeshare(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Tell winbindd an IP got dropped */
-static bool do_ip_dropped(struct messaging_context *msg_ctx,
+static bool do_ip_dropped(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* force a blocking lock retry */
-static bool do_lockretry(struct messaging_context *msg_ctx,
+static bool do_lockretry(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* force a validation of all brl entries, including re-sends. */
-static bool do_brl_revalidate(struct messaging_context *msg_ctx,
+static bool do_brl_revalidate(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Display talloc pool usage */
-static bool do_poolusage(struct messaging_context *msg_ctx,
+static bool do_poolusage(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Perform a dmalloc mark */
-static bool do_dmalloc_mark(struct messaging_context *msg_ctx,
+static bool do_dmalloc_mark(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Perform a dmalloc changed */
-static bool do_dmalloc_changed(struct messaging_context *msg_ctx,
+static bool do_dmalloc_changed(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Shutdown a server process */
-static bool do_shutdown(struct messaging_context *msg_ctx,
+static bool do_shutdown(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
/* Notify a driver upgrade */
-static bool do_drvupgrade(struct messaging_context *msg_ctx,
+static bool do_drvupgrade(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
strlen(argv[1]) + 1);
}
-static bool do_winbind_online(struct messaging_context *msg_ctx,
+static bool do_winbind_online(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
- const int argc, const char **argv)
+ const int argc, const char **argv)
{
TDB_CONTEXT *tdb;
return send_message(msg_ctx, pid, MSG_WINBIND_ONLINE, NULL, 0);
}
-static bool do_winbind_offline(struct messaging_context *msg_ctx,
+static bool do_winbind_offline(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
- const int argc, const char **argv)
+ const int argc, const char **argv)
{
TDB_CONTEXT *tdb;
bool ret = False;
return ret;
}
-static bool do_winbind_onlinestatus(struct messaging_context *msg_ctx,
+static bool do_winbind_onlinestatus(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return num_replies;
}
-static bool do_dump_event_list(struct messaging_context *msg_ctx,
+static bool do_dump_event_list(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return send_message(msg_ctx, pid, MSG_DUMP_EVENT_LIST, NULL, 0);
}
-static bool do_winbind_dump_domain_list(struct messaging_context *msg_ctx,
+static bool do_winbind_dump_domain_list(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
num_replies++;
}
-static bool do_winbind_validate_cache(struct messaging_context *msg_ctx,
+static bool do_winbind_validate_cache(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
return num_replies;
}
-static bool do_reload_config(struct messaging_context *msg_ctx,
+static bool do_reload_config(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
push_ascii(n->scope, lp_netbios_scope(), 64, STR_TERMINATE);
}
-static bool do_nodestatus(struct messaging_context *msg_ctx,
+static bool do_nodestatus(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv)
{
static const struct {
const char *name; /* Option name */
- bool (*fn)(struct messaging_context *msg_ctx,
+ bool (*fn)(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
const struct server_id pid,
const int argc, const char **argv);
const char *help; /* Short help text */
/* Execute smbcontrol command */
-static bool do_command(struct messaging_context *msg_ctx,
+static bool do_command(struct tevent_context *ev_ctx,
+ struct messaging_context *msg_ctx,
int argc, const char **argv)
{
const char *dest = argv[0], *command = argv[1];
for (i = 0; msg_types[i].name; i++) {
if (strequal(command, msg_types[i].name))
- return msg_types[i].fn(msg_ctx, pid,
+ return msg_types[i].fn(ev_ctx, msg_ctx, pid,
argc - 1, argv + 1);
}
exit(1);
}
- ret = !do_command(msg_ctx, argc, argv);
+ ret = !do_command(evt_ctx, msg_ctx, argc, argv);
TALLOC_FREE(frame);
return ret;
}