diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-01-30 22:22:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:17:32 -0500 |
commit | caf8c6a76be051559ffcfe97084edca43e0a3cee (patch) | |
tree | cbab678e47d5174ba24bca915e47992e2b8d8206 /source3/nmbd | |
parent | cb916d33f534aef5e3527c41555d32c319345fef (diff) | |
download | samba-caf8c6a76be051559ffcfe97084edca43e0a3cee.tar.gz samba-caf8c6a76be051559ffcfe97084edca43e0a3cee.tar.bz2 samba-caf8c6a76be051559ffcfe97084edca43e0a3cee.zip |
r21064: The core of this patch is
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;
So this adds a (so far unused) private pointer that is passed from
message_register to the message handler. A prerequisite to implement a tiny
samba4-API compatible wrapper around our messaging system. That itself is
necessary for the Samba4 notify system.
Yes, I know, I could import the whole Samba4 messaging system, but I want to
do it step by step and I think getting notify in is more important in this
step.
Volker
(This used to be commit c8ae60ed65dcce9660ee39c75488f2838cf9a28b)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd.c | 18 | ||||
-rw-r--r-- | source3/nmbd/nmbd_elections.c | 2 | ||||
-rw-r--r-- | source3/nmbd/nmbd_winsserver.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index 4a05fde28c..46f209872b 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -77,7 +77,7 @@ static void terminate(void) **************************************************************************** */ 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(); } @@ -272,7 +272,7 @@ static BOOL reload_nmbd_services(BOOL test) **************************************************************************** */ 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(); @@ -289,7 +289,7 @@ static void msg_reload_nmbd_services(int msg_type, struct process_id src, } 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; @@ -558,7 +558,7 @@ static void process(void) 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; @@ -745,14 +745,14 @@ static BOOL open_sockets(BOOL isdaemon, int port) 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(); diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c index 50e1372936..3aadd70b83 100644 --- a/source3/nmbd/nmbd_elections.c +++ b/source3/nmbd/nmbd_elections.c @@ -379,7 +379,7 @@ yet registered on subnet %s\n", nmb_namestr(&nmbname), subrec->subnet_name )); ***************************************************************************/ 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; diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c index 320415503b..6ea102c391 100644 --- a/source3/nmbd/nmbd_winsserver.c +++ b/source3/nmbd/nmbd_winsserver.c @@ -2371,7 +2371,7 @@ void wins_write_database(time_t t, BOOL background) ***************************************************************************/ 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; |