const struct server_id pid,
const int argc, const char **argv)
{
- struct server_id myid;
-
- myid = messaging_server_id(msg_ctx);
-
if (argc != 1) {
fprintf(stderr, "Usage: smbcontrol winbindd onlinestatus\n");
return False;
messaging_register(msg_ctx, NULL, MSG_WINBIND_ONLINESTATUS,
print_pid_string_cb);
- if (!send_message(msg_ctx, pid, MSG_WINBIND_ONLINESTATUS, &myid,
- sizeof(myid)))
+ if (!send_message(msg_ctx, pid, MSG_WINBIND_ONLINESTATUS, NULL, 0)) {
return False;
+ }
wait_replies(ev_ctx, msg_ctx, procid_to_pid(&pid) == 0);
{
TALLOC_CTX *mem_ctx;
const char *message;
- struct server_id *sender;
DEBUG(5,("winbind_msg_onlinestatus received.\n"));
- if (!data->data) {
- return;
- }
-
- sender = (struct server_id *)data->data;
-
mem_ctx = talloc_init("winbind_msg_onlinestatus");
if (mem_ctx == NULL) {
return;
return;
}
- messaging_send_buf(msg_ctx, *sender, MSG_WINBIND_ONLINESTATUS,
+ messaging_send_buf(msg_ctx, server_id, MSG_WINBIND_ONLINESTATUS,
(const uint8_t *)message, strlen(message) + 1);
talloc_destroy(mem_ctx);