diff options
author | Gerald Carter <jerry@samba.org> | 2005-10-17 16:44:26 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:01 -0500 |
commit | 846d52efaed2c3272c2327dcded76b2d335d53d2 (patch) | |
tree | 8c7049bf719814414ab246aa9bef3e365e7f93f3 /source3/libmsrpc/libmsrpc.c | |
parent | c246649e3d7fb828b6d1c9531dfea40c92e2e368 (diff) | |
download | samba-846d52efaed2c3272c2327dcded76b2d335d53d2.tar.gz samba-846d52efaed2c3272c2327dcded76b2d335d53d2.tar.xz samba-846d52efaed2c3272c2327dcded76b2d335d53d2.zip |
r11124: Commit Chris' fixes for libmsrpc after the rpc_client
rewrite. His comments:
I've gotten the libmsrpc code to work with TRUNK.
I've put the patch at:
www.uoguelph.ca/~cnicholl/libmsrpc_trunk_v1.patch.gz
It is from revision 11093.
I also fixed a minor bug in the svcctl code, the timeout
parameter for all the control functions was working
in milliseconds instead of seconds.
Also fixed bug in Makefile when building libmsrpc.a
(This used to be commit d3a52900ec223316779e59a13cea87ecb500bccc)
Diffstat (limited to 'source3/libmsrpc/libmsrpc.c')
-rw-r--r-- | source3/libmsrpc/libmsrpc.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/libmsrpc/libmsrpc.c b/source3/libmsrpc/libmsrpc.c index 05f2dfe6272..252e4ae0be9 100644 --- a/source3/libmsrpc/libmsrpc.c +++ b/source3/libmsrpc/libmsrpc.c @@ -214,22 +214,18 @@ int cac_Connect(CacServerHandle *hnd, const char *srv) { void cac_FreeHandle(CacServerHandle * hnd) { SMBCSRV *srv = NULL; uint32 i = 0; + struct rpc_pipe_client *pipe_hnd = NULL; if(!hnd) return; - - /*see if there are any sessions*/ - while(i <= PI_MAX_PIPES && hnd->_internal.pipes[i] == False) - i++; - if(i < PI_MAX_PIPES) { - /*then one or more sessions are open*/ - srv = cac_GetServer(hnd); - if(srv) - cli_nt_session_close(&(srv->cli)); + if(srv) { + /*close all pipe sessions*/ + cli_nt_pipes_close(&(srv->cli)); } + /*only free the context if we created it*/ if(!hnd->_internal.user_supplied_ctx) { smbc_free_context(hnd->_internal.ctx, True); |