diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-13 23:25:15 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-13 23:25:15 +0000 |
commit | d262b8c3c79b2fbb0bf8c330d765f89210948a26 (patch) | |
tree | 0492a6fa66101b94f5dc368480c2ab027e4f8b77 /source4/smbd | |
parent | 8d79eb52f104d023122de3965592b4ea36adbb2b (diff) | |
download | samba-d262b8c3c79b2fbb0bf8c330d765f89210948a26.tar.gz samba-d262b8c3c79b2fbb0bf8c330d765f89210948a26.tar.bz2 samba-d262b8c3c79b2fbb0bf8c330d765f89210948a26.zip |
completed the linkage between the endpoint mapper and the dcerpc
server endpoints. We can now successfully setup listening endpoints on
high ports, then use our endpoint mapper redirect incoming clients to
the right port.
also greatly cleanup the rpc over tcp session handling.
(This used to be commit 593bc29bbe0e46d356d001160e8a3332a88f2fa8)
Diffstat (limited to 'source4/smbd')
-rw-r--r-- | source4/smbd/process_single.c | 7 | ||||
-rw-r--r-- | source4/smbd/process_standard.c | 9 | ||||
-rw-r--r-- | source4/smbd/process_thread.c | 10 |
3 files changed, 26 insertions, 0 deletions
diff --git a/source4/smbd/process_single.c b/source4/smbd/process_single.c index a19577b3cf..8f1362bed3 100644 --- a/source4/smbd/process_single.c +++ b/source4/smbd/process_single.c @@ -81,6 +81,12 @@ static void terminate_connection(struct server_context *server, const char *reas server_terminate(server); } +/* called when a rpc connection goes down */ +static void terminate_rpc_connection(void *r, const char *reason) +{ + rpc_server_terminate(r); +} + static int get_id(struct request_context *req) { return (int)req->smb->pid; @@ -100,6 +106,7 @@ void process_model_single_init(void) ops.accept_connection = accept_connection; ops.accept_rpc_connection = accept_rpc_connection; ops.terminate_connection = terminate_connection; + ops.terminate_rpc_connection = terminate_rpc_connection; ops.exit_server = NULL; ops.get_id = get_id; diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c index 507c179a26..505c2aafbf 100644 --- a/source4/smbd/process_standard.c +++ b/source4/smbd/process_standard.c @@ -121,6 +121,14 @@ static void terminate_connection(struct server_context *server, const char *reas exit(0); } +/* called when a rpc connection goes down */ +static void terminate_rpc_connection(void *r, const char *reason) +{ + rpc_server_terminate(r); + /* terminate this process */ + exit(0); +} + static int get_id(struct request_context *req) { return (int)req->smb->pid; @@ -140,6 +148,7 @@ void process_model_standard_init(void) ops.accept_connection = accept_connection; ops.accept_rpc_connection = accept_rpc_connection; ops.terminate_connection = terminate_connection; + ops.terminate_rpc_connection = terminate_rpc_connection; ops.get_id = get_id; /* register ourselves with the process model subsystem. We register under the name 'standard'. */ diff --git a/source4/smbd/process_thread.c b/source4/smbd/process_thread.c index 634e826395..d02238c840 100644 --- a/source4/smbd/process_thread.c +++ b/source4/smbd/process_thread.c @@ -134,6 +134,15 @@ static void terminate_connection(struct server_context *server, const char *reas pthread_exit(NULL); /* thread cleanup routine will do actual cleanup */ } +/* called when a rpc connection goes down */ +static void terminate_rpc_connection(void *r, const char *reason) +{ + rpc_server_terminate(r); + + /* terminate this thread */ + pthread_exit(NULL); /* thread cleanup routine will do actual cleanup */ +} + /* mutex init function for thread model */ @@ -457,6 +466,7 @@ void process_model_thread_init(void) ops.accept_connection = accept_connection; ops.accept_rpc_connection = accept_rpc_connection; ops.terminate_connection = terminate_connection; + ops.terminate_rpc_connection = terminate_rpc_connection; ops.exit_server = NULL; ops.get_id = get_id; |