diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-01-10 12:15:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:08:38 -0500 |
commit | 577218b2aded7adb367f3f33bcc5560f3d4c0ec2 (patch) | |
tree | 353a1cad1840485225b0d25d08eae5ae4aa27e5c /source4/rpc_server/drsuapi/dcesrv_drsuapi.c | |
parent | 3136462ea9d2b97e5385386e2c37b1ac403db6ca (diff) | |
download | samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.tar.gz samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.tar.bz2 samba-577218b2aded7adb367f3f33bcc5560f3d4c0ec2.zip |
r4640: first stage in the server side support for multiple context_ids on one pipe
this stage does the following:
- simplifies the dcerpc_handle handling, and all the callers of it
- split out the context_id depenent state into a linked list of established contexts
- fixed some talloc handling in several rpc servers that i noticed while doing the above
(This used to be commit fde042b3fc609c94e2c7eedcdd72ecdf489cf63b)
Diffstat (limited to 'source4/rpc_server/drsuapi/dcesrv_drsuapi.c')
-rw-r--r-- | source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index 5539c9117f..508a2dec5e 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -26,14 +26,6 @@ #include "rpc_server/common/common.h" #include "rpc_server/drsuapi/dcesrv_drsuapi.h" -/* - destroy a general handle. -*/ -static void drsuapi_handle_destroy(struct dcesrv_connection *conn, struct dcesrv_handle *h) -{ - talloc_free(h->data); -} - /* drsuapi_DsBind */ @@ -57,14 +49,13 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem return WERR_FOOBAR; } - handle = dcesrv_handle_new(dce_call->conn, DRSUAPI_BIND_HANDLE); + handle = dcesrv_handle_new(dce_call->context, DRSUAPI_BIND_HANDLE); if (!handle) { talloc_free(b_state); return WERR_NOMEM; } - handle->data = b_state; - handle->destroy = drsuapi_handle_destroy; + handle->data = talloc_steal(handle, b_state); bind_info = talloc_p(mem_ctx, struct drsuapi_DsBindInfoCtr); WERR_TALLOC_CHECK(bind_info); @@ -88,7 +79,7 @@ static WERROR drsuapi_DsBind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem drsuapi_DsUnbind */ static WERROR drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, - struct drsuapi_DsUnbind *r) + struct drsuapi_DsUnbind *r) { struct dcesrv_handle *h; @@ -96,10 +87,7 @@ static WERROR drsuapi_DsUnbind(struct dcesrv_call_state *dce_call, TALLOC_CTX *m DCESRV_PULL_HANDLE_WERR(h, r->in.bind_handle, DRSUAPI_BIND_HANDLE); - /* this causes the callback drsuapi_handle_destroy() to be called by - the handle destroy code which destroys the state associated - with the handle */ - dcesrv_handle_destroy(dce_call->conn, h); + talloc_free(h); ZERO_STRUCTP(r->out.bind_handle); |