****************************************************************************/
static void debug_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
const char *params_str = (const char *)buf;
****************************************************************************/
static void debuglevel_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
char *message = debug_list_class_names_and_levels();
initialised = True;
- message_register(MSG_DEBUG, debug_message);
- message_register(MSG_REQ_DEBUGLEVEL, debuglevel_message);
+ message_register(MSG_DEBUG, debug_message, NULL);
+ message_register(MSG_REQ_DEBUGLEVEL, debuglevel_message, NULL);
for(p = default_classname_table; *p; p++) {
debug_add_class(*p);
* Respond to a POOL_USAGE message by sending back string form of memory
* usage stats.
**/
-static void msg_req_dmalloc_mark(int UNUSED(msg_type), struct process_id UNUSED(src_pid),
- void *UNUSED(buf), size_t UNUSED(len))
+static void msg_req_dmalloc_mark(int UNUSED(msg_type),
+ struct process_id UNUSED(src_pid),
+ void *UNUSED(buf), size_t UNUSED(len),
+ void *private_data)
{
#ifdef ENABLE_DMALLOC
our_dm_mark = dmalloc_mark();
static void msg_req_dmalloc_log_changed(int UNUSED(msg_type),
struct process_id UNUSED(src_pid),
- void *UNUSED(buf), size_t UNUSED(len))
+ void *UNUSED(buf), size_t UNUSED(len),
+ void *private_data)
{
#ifdef ENABLE_DMALLOC
dmalloc_log_changed(our_dm_mark, True, True, True);
**/
void register_dmalloc_msgs(void)
{
- message_register(MSG_REQ_DMALLOC_MARK, msg_req_dmalloc_mark);
- message_register(MSG_REQ_DMALLOC_LOG_CHANGED, msg_req_dmalloc_log_changed);
+ message_register(MSG_REQ_DMALLOC_MARK, msg_req_dmalloc_mark, NULL);
+ message_register(MSG_REQ_DMALLOC_LOG_CHANGED,
+ msg_req_dmalloc_log_changed, NULL);
DEBUG(2, ("Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED\n"));
}
static struct dispatch_fns {
struct dispatch_fns *next, *prev;
int msg_type;
- void (*fn)(int msg_type, struct process_id pid, void *buf, size_t len);
+ void (*fn)(int msg_type, struct process_id pid, void *buf, size_t len,
+ void *private_data);
+ void *private_data;
} *dispatch_fns;
/****************************************************************************
****************************************************************************/
static void ping_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
const char *msg = buf ? (const char *)buf : "none";
CatchSignal(SIGUSR1, SIGNAL_CAST sig_usr1);
- message_register(MSG_PING, ping_message);
+ message_register(MSG_PING, ping_message, NULL);
/* Register some debugging related messages */
for (dfn = dispatch_fns; dfn; dfn = dfn->next) {
if (dfn->msg_type == msg_type) {
DEBUG(10,("message_dispatch: processing message of type %d.\n", msg_type));
- dfn->fn(msg_type, src, len ? (void *)buf : NULL, len);
+ dfn->fn(msg_type, src,
+ len ? (void *)buf : NULL, len,
+ dfn->private_data);
n_handled++;
break;
}
void message_register(int msg_type,
void (*fn)(int msg_type, struct process_id pid,
- void *buf, size_t len))
+ void *buf, size_t len,
+ void *private_data),
+ void *private_data)
{
struct dispatch_fns *dfn;
dfn->msg_type = msg_type;
dfn->fn = fn;
+ dfn->private_data = private_data;
DLIST_ADD(dispatch_fns, dfn);
}
* usage stats.
**/
void msg_pool_usage(int msg_type, struct process_id src_pid,
- void *UNUSED(buf), size_t UNUSED(len))
+ void *UNUSED(buf), size_t UNUSED(len),
+ void *private_data)
{
struct msg_pool_usage_state state;
**/
void register_msg_pool_usage(void)
{
- message_register(MSG_REQ_POOL_USAGE, msg_pool_usage);
+ message_register(MSG_REQ_POOL_USAGE, msg_pool_usage, NULL);
DEBUG(2, ("Registered MSG_REQ_POOL_USAGE\n"));
}
**************************************************************************** */
static void nmbd_terminate(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
terminate();
}
**************************************************************************** */
static void msg_reload_nmbd_services(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
write_browse_list( 0, True );
dump_all_namelists();
}
static void msg_nmbd_send_packet(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
struct packet_struct *p = (struct packet_struct *)buf;
struct subnet_record *subrec;
if(reload_after_sighup) {
DEBUG( 0, ( "Got SIGHUP dumping debug info.\n" ) );
msg_reload_nmbd_services(MSG_SMB_CONF_UPDATED,
- pid_to_procid(0), (void*) &no_subnets, 0);
+ pid_to_procid(0), (void*) &no_subnets, 0, NULL);
if(no_subnets)
return;
reload_after_sighup = 0;
pidfile_create("nmbd");
message_init();
- message_register(MSG_FORCE_ELECTION, nmbd_message_election);
+ message_register(MSG_FORCE_ELECTION, nmbd_message_election, NULL);
#if 0
/* Until winsrepl is done. */
- message_register(MSG_WINS_NEW_ENTRY, nmbd_wins_new_entry);
+ message_register(MSG_WINS_NEW_ENTRY, nmbd_wins_new_entry, NULL);
#endif
- message_register(MSG_SHUTDOWN, nmbd_terminate);
- message_register(MSG_SMB_CONF_UPDATED, msg_reload_nmbd_services);
- message_register(MSG_SEND_PACKET, msg_nmbd_send_packet);
+ message_register(MSG_SHUTDOWN, nmbd_terminate, NULL);
+ message_register(MSG_SMB_CONF_UPDATED, msg_reload_nmbd_services, NULL);
+ message_register(MSG_SEND_PACKET, msg_nmbd_send_packet, NULL);
TimeInit();
***************************************************************************/
void nmbd_message_election(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
struct subnet_record *subrec;
***************************************************************************/
void nmbd_wins_new_entry(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
WINS_RECORD *record;
struct name_record *namerec = NULL;
}
/* React on 'smbcontrol winbindd reload-config' in the same way as on SIGHUP*/
-static void msg_reload_services(int msg_type, struct process_id src, void *buf, size_t len)
+static void msg_reload_services(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
/* Flush various caches */
flush_caches();
}
/* React on 'smbcontrol winbindd shutdown' in the same way as on SIGTERM*/
-static void msg_shutdown(int msg_type, struct process_id src, void *buf, size_t len)
+static void msg_shutdown(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
do_sigterm = True;
}
DEBUG(3, ("got SIGHUP\n"));
- msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0);
+ msg_reload_services(MSG_SMB_CONF_UPDATED, pid_to_procid(0), NULL, 0, NULL);
do_sighup = False;
}
/* React on 'smbcontrol winbindd reload-config' in the same way
as to SIGHUP signal */
- message_register(MSG_SMB_CONF_UPDATED, msg_reload_services);
- message_register(MSG_SHUTDOWN, msg_shutdown);
+ message_register(MSG_SMB_CONF_UPDATED, msg_reload_services, NULL);
+ message_register(MSG_SHUTDOWN, msg_shutdown, NULL);
/* Handle online/offline messages. */
- message_register(MSG_WINBIND_OFFLINE,winbind_msg_offline);
- message_register(MSG_WINBIND_ONLINE,winbind_msg_online);
- message_register(MSG_WINBIND_ONLINESTATUS,winbind_msg_onlinestatus);
+ message_register(MSG_WINBIND_OFFLINE, winbind_msg_offline, NULL);
+ message_register(MSG_WINBIND_ONLINE, winbind_msg_online, NULL);
+ message_register(MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus,
+ NULL);
poptFreeContext(pc);
Child failed to find DC's. Reschedule check.
****************************************************************/
-static void msg_failed_to_go_online(int msg_type, struct process_id src, void *buf, size_t len)
+static void msg_failed_to_go_online(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_domain *domain;
const char *domainname = (const char *)buf;
Actually cause a reconnect from a message.
****************************************************************/
-static void msg_try_to_go_online(int msg_type, struct process_id src, void *buf, size_t len)
+static void msg_try_to_go_online(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_domain *domain;
const char *domainname = (const char *)buf;
if (child_pid != 0) {
/* Parent */
- message_register(MSG_WINBIND_TRY_TO_GO_ONLINE,msg_try_to_go_online);
- message_register(MSG_WINBIND_FAILED_TO_GO_ONLINE,msg_failed_to_go_online);
+ message_register(MSG_WINBIND_TRY_TO_GO_ONLINE,
+ msg_try_to_go_online, NULL);
+ message_register(MSG_WINBIND_FAILED_TO_GO_ONLINE,
+ msg_failed_to_go_online, NULL);
message_unblock();
return True;
}
/* Set our domains as offline and forward the offline message to our children. */
-void winbind_msg_offline(int msg_type, struct process_id src, void *buf, size_t len)
+void winbind_msg_offline(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_child *child;
struct winbindd_domain *domain;
/* Set our domains as online and forward the online message to our children. */
-void winbind_msg_online(int msg_type, struct process_id src, void *buf, size_t len)
+void winbind_msg_online(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_child *child;
struct winbindd_domain *domain;
}
/* Forward the online/offline messages to our children. */
-void winbind_msg_onlinestatus(int msg_type, struct process_id src, void *buf, size_t len)
+void winbind_msg_onlinestatus(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_child *child;
/* Deal with a request to go offline. */
-static void child_msg_offline(int msg_type, struct process_id src, void *buf, size_t len)
+static void child_msg_offline(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_domain *domain;
const char *domainname = (const char *)buf;
/* Deal with a request to go online. */
-static void child_msg_online(int msg_type, struct process_id src, void *buf, size_t len)
+static void child_msg_online(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
struct winbindd_domain *domain;
const char *domainname = (const char *)buf;
return buf;
}
-static void child_msg_onlinestatus(int msg_type, struct process_id src, void *buf, size_t len)
+static void child_msg_onlinestatus(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
TALLOC_CTX *mem_ctx;
const char *message;
message_unblock();
/* Handle online/offline messages. */
- message_register(MSG_WINBIND_OFFLINE,child_msg_offline);
- message_register(MSG_WINBIND_ONLINE,child_msg_online);
- message_register(MSG_WINBIND_ONLINESTATUS,child_msg_onlinestatus);
+ message_register(MSG_WINBIND_OFFLINE, child_msg_offline, NULL);
+ message_register(MSG_WINBIND_ONLINE, child_msg_online, NULL);
+ message_register(MSG_WINBIND_ONLINESTATUS, child_msg_onlinestatus,
+ NULL);
if ( child->domain ) {
child->domain->startup = True;
* drivers are installed
*/
- message_register( MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer );
+ message_register(MSG_PRINTER_DRVUPGRADE, do_drv_upgrade_printer, NULL);
/*
* register callback to handle updating printer data
* when a driver is initialized
*/
- message_register( MSG_PRINTERDATA_INIT_RESET, reset_all_printerdata );
+ message_register(MSG_PRINTERDATA_INIT_RESET, reset_all_printerdata,
+ NULL);
/* of course, none of the message callbacks matter if you don't
tell messages.c that you interested in receiving PRINT_GENERAL
this is the receive function of the background lpq updater
****************************************************************************/
static void print_queue_receive(int msg_type, struct process_id src,
- void *buf, size_t msglen)
+ void *buf, size_t msglen,
+ void *private_data)
{
fstring sharename;
pstring lpqcommand, lprmcommand;
exit(1);
}
- message_register(MSG_PRINTER_UPDATE, print_queue_receive);
+ message_register(MSG_PRINTER_UPDATE, print_queue_receive,
+ NULL);
DEBUG(5,("start_background_queue: background LPQ thread waiting for messages\n"));
while (1) {
/****************************************************************************
receive a set profile level message
****************************************************************************/
-void profile_message(int msg_type, struct process_id src, void *buf, size_t len)
+void profile_message(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
int level;
receive a request profile level message
****************************************************************************/
void reqprofile_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
int level;
}
profile_p = &profile_h->stats;
- message_register(MSG_PROFILE, profile_message);
- message_register(MSG_REQ_PROFILELEVEL, reqprofile_message);
+ message_register(MSG_PROFILE, profile_message, NULL);
+ message_register(MSG_REQ_PROFILELEVEL, reqprofile_message, NULL);
return True;
}
********************************************************************/
static void receive_notify2_message_list(int msg_type, struct process_id src,
- void *msg, size_t len)
+ void *msg, size_t len,
+ void *private_data)
{
size_t msg_count, i;
char *buf = (char *)msg;
over all printers, upgrading ones as necessary
**********************************************************************/
-void do_drv_upgrade_printer(int msg_type, struct process_id src, void *buf, size_t len)
+void do_drv_upgrade_printer(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
fstring drivername;
int snum;
**********************************************************************/
void reset_all_printerdata(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
fstring drivername;
int snum;
if ( !spoolss_connect_to_client( ¬ify_cli_pipe, client_ip, unix_printer ))
return False;
- message_register(MSG_PRINTER_NOTIFY2, receive_notify2_message_list);
+ message_register(MSG_PRINTER_NOTIFY2,
+ receive_notify2_message_list, NULL);
/* Tell the connections db we're now interested in printer
* notify messages. */
register_message_flags( True, FLAG_MSG_PRINT_NOTIFY );
}
static void received_unlock_msg(int msg_type, struct process_id src,
- void *buf, size_t len);
+ void *buf, size_t len,
+ void *private_data);
/****************************************************************************
Function to push a blocking lock request onto the lock queue.
/* Ensure we'll receive messages when this is unlocked. */
if (!set_lock_msg) {
- message_register(MSG_SMB_UNLOCK, received_unlock_msg);
+ message_register(MSG_SMB_UNLOCK, received_unlock_msg,
+ NULL);
set_lock_msg = True;
}
*****************************************************************************/
static void received_unlock_msg(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
DEBUG(10,("received_unlock_msg\n"));
process_blocking_lock_queue();
#define MSG_BLOCKING_LOCK_CANCEL_SIZE (sizeof(blocking_lock_record *) + sizeof(NTSTATUS))
-static void process_blocking_lock_cancel_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+static void process_blocking_lock_cancel_message(int msg_type,
+ struct process_id src,
+ void *buf, size_t len,
+ void *private_data)
{
NTSTATUS err;
const char *msg = (const char *)buf;
if (!initialized) {
/* Register our message. */
message_register(MSG_SMB_BLOCKING_LOCK_CANCEL,
- process_blocking_lock_cancel_message);
+ process_blocking_lock_cancel_message,
+ NULL);
initialized = True;
}
share are unmounted
the special sharename '*' forces unmount of all shares
****************************************************************************/
-void msg_force_tdis(int msg_type, struct process_id pid, void *buf, size_t len)
+void msg_force_tdis(int msg_type, struct process_id pid, void *buf, size_t len,
+ void *private_data)
{
connection_struct *conn, *next;
fstring sharename;
}
static void notify_message_callback(int msgtype, struct process_id pid,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
struct notify_message msg;
files_struct *fsp;
return False;
}
- message_register(MSG_SMB_NOTIFY, notify_message_callback);
+ message_register(MSG_SMB_NOTIFY, notify_message_callback, NULL);
return True;
}
smbd process.
****************************************************************************/
-void msg_file_was_renamed(int msg_type, struct process_id src, void *buf, size_t len)
+void msg_file_was_renamed(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
files_struct *fsp;
char *frm = (char *)buf;
*******************************************************************/
static void process_oplock_async_level2_break_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
struct share_mode_entry msg;
files_struct *fsp;
*******************************************************************/
static void process_oplock_break_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
struct share_mode_entry msg;
files_struct *fsp;
*******************************************************************/
static void process_kernel_oplock_break(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
SMB_DEV_T dev;
SMB_INO_T inode;
}
static void process_oplock_break_response(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
struct share_mode_entry msg;
}
static void process_open_retry_message(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len,
+ void *private_data)
{
struct share_mode_entry msg;
DEBUG(3,("init_oplocks: initializing messages.\n"));
message_register(MSG_SMB_BREAK_REQUEST,
- process_oplock_break_message);
+ process_oplock_break_message,
+ NULL);
message_register(MSG_SMB_ASYNC_LEVEL2_BREAK,
- process_oplock_async_level2_break_message);
+ process_oplock_async_level2_break_message,
+ NULL);
message_register(MSG_SMB_BREAK_RESPONSE,
- process_oplock_break_response);
+ process_oplock_break_response,
+ NULL);
message_register(MSG_SMB_KERNEL_BREAK,
- process_kernel_oplock_break);
+ process_kernel_oplock_break,
+ NULL);
message_register(MSG_SMB_OPEN_RETRY,
- process_open_retry_message);
+ process_open_retry_message,
+ NULL);
if (lp_kernel_oplocks()) {
#if HAVE_KERNEL_OPLOCKS_IRIX
********************************************************************/
static void smb_conf_updated(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
DEBUG(10,("smb_conf_updated: Got message saying smb.conf was updated. Reloading.\n"));
reload_services(False);
********************************************************************/
static void smb_stat_cache_delete(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
const char *name = (const char *)buf;
DEBUG(10,("smb_stat_cache_delete: delete name %s\n", name));
****************************************************************************/
static void msg_sam_sync(int UNUSED(msg_type), struct process_id UNUSED(pid),
- void *UNUSED(buf), size_t UNUSED(len))
+ void *UNUSED(buf), size_t UNUSED(len),
+ void *private_data)
{
DEBUG(10, ("** sam sync message received, ignoring\n"));
}
****************************************************************************/
static void msg_sam_repl(int msg_type, struct process_id pid,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
uint32 low_serial;
}
static void msg_exit_server(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
DEBUG(3, ("got a SHUTDOWN message\n"));
exit_server_cleanly(NULL);
#ifdef DEVELOPER
static void msg_inject_fault(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
int sig;
/* Listen to messages */
- message_register(MSG_SMB_SAM_SYNC, msg_sam_sync);
- message_register(MSG_SMB_SAM_REPL, msg_sam_repl);
- message_register(MSG_SHUTDOWN, msg_exit_server);
- message_register(MSG_SMB_FILE_RENAME, msg_file_was_renamed);
- message_register(MSG_SMB_CONF_UPDATED, smb_conf_updated);
- message_register(MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete);
+ message_register(MSG_SMB_SAM_SYNC, msg_sam_sync, NULL);
+ message_register(MSG_SMB_SAM_REPL, msg_sam_repl, NULL);
+ message_register(MSG_SHUTDOWN, msg_exit_server, NULL);
+ message_register(MSG_SMB_FILE_RENAME, msg_file_was_renamed, NULL);
+ message_register(MSG_SMB_CONF_UPDATED, smb_conf_updated, NULL);
+ message_register(MSG_SMB_STAT_CACHE_DELETE, smb_stat_cache_delete,
+ NULL);
#ifdef DEVELOPER
- message_register(MSG_SMB_INJECT_FAULT, msg_inject_fault);
+ message_register(MSG_SMB_INJECT_FAULT, msg_inject_fault, NULL);
#endif
/* now accept incoming connections - forking a new process
TimeInit();
/* register our message handlers */
- message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis);
+ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis, NULL);
smbd_process();
/****************************************************************************
a useful function for testing the message system
****************************************************************************/
-static void pong_message(int msg_type, struct process_id src, void *buf, size_t len)
+static void pong_message(int msg_type, struct process_id src,
+ void *buf, size_t len, void *private_data)
{
pong_count++;
}
pid = atoi(argv[1]);
n = atoi(argv[2]);
- message_register(MSG_PONG, pong_message);
+ message_register(MSG_PONG, pong_message, NULL);
for (i=0;i<n;i++) {
message_send_pid(pid_to_procid(pid), MSG_PING, NULL, 0, True);
}
void do_drv_upgrade_printer(int msg_type, struct process_id src,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
return;
}
/* Message handler callback that displays the PID and a string on stdout */
-static void print_pid_string_cb(int msg_type, struct process_id pid, void *buf, size_t len)
+static void print_pid_string_cb(int msg_type, struct process_id pid, void *buf,
+ size_t len, void *private_data)
{
printf("PID %u: %.*s", (unsigned int)procid_to_pid(&pid),
(int)len, (const char *)buf);
/* Message handler callback that displays a string on stdout */
static void print_string_cb(int msg_type, struct process_id pid,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
printf("%.*s", (int)len, (const char *)buf);
num_replies++;
/* Ping a samba daemon process */
-static void pong_cb(int msg_type, struct process_id pid, void *buf, size_t len)
+static void pong_cb(int msg_type, struct process_id pid, void *buf,
+ size_t len, void *private_data)
{
char *src_string = procid_str(NULL, &pid);
printf("PONG from pid %s\n", src_string);
if (!send_message(pid, MSG_PING, NULL, 0, False))
return False;
- message_register(MSG_PONG, pong_cb);
+ message_register(MSG_PONG, pong_cb, NULL);
wait_replies(procid_to_pid(&pid) == 0);
/* Return the profiling level */
-static void profilelevel_cb(int msg_type, struct process_id pid, void *buf, size_t len)
+static void profilelevel_cb(int msg_type, struct process_id pid, void *buf,
+ size_t len, void *private_data)
{
int level;
const char *s;
}
static void profilelevel_rqst(int msg_type, struct process_id pid,
- void *buf, size_t len)
+ void *buf, size_t len, void *private_data)
{
int v = 0;
if (!send_message(pid, MSG_REQ_PROFILELEVEL, NULL, 0, False))
return False;
- message_register(MSG_PROFILELEVEL, profilelevel_cb);
- message_register(MSG_REQ_PROFILELEVEL, profilelevel_rqst);
+ message_register(MSG_PROFILELEVEL, profilelevel_cb, NULL);
+ message_register(MSG_REQ_PROFILELEVEL, profilelevel_rqst, NULL);
wait_replies(procid_to_pid(&pid) == 0);
if (!send_message(pid, MSG_REQ_DEBUGLEVEL, NULL, 0, False))
return False;
- message_register(MSG_DEBUGLEVEL, print_pid_string_cb);
+ message_register(MSG_DEBUGLEVEL, print_pid_string_cb, NULL);
wait_replies(procid_to_pid(&pid) == 0);
return False;
}
- message_register(MSG_POOL_USAGE, print_string_cb);
+ message_register(MSG_POOL_USAGE, print_string_cb, NULL);
/* Send a message and register our interest in a reply */
return False;
}
- message_register(MSG_WINBIND_ONLINESTATUS, print_pid_string_cb);
+ message_register(MSG_WINBIND_ONLINESTATUS, print_pid_string_cb, NULL);
if (!send_message(pid, MSG_WINBIND_ONLINESTATUS, &myid, sizeof(myid), False))
return False;