summaryrefslogtreecommitdiff
path: root/source3/lib/msrpc-client.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-03 04:28:29 +0000
committerGerald Carter <jerry@samba.org>2000-07-03 04:28:29 +0000
commit33f6a1d9bb7ffed681085261a78d5ef4297f73de (patch)
tree378dd3cb3e7d5993def55602686ab994f78a2f00 /source3/lib/msrpc-client.c
parent8d429db41075618372b6a18e7d4eb064f7839467 (diff)
downloadsamba-33f6a1d9bb7ffed681085261a78d5ef4297f73de.tar.gz
samba-33f6a1d9bb7ffed681085261a78d5ef4297f73de.tar.bz2
samba-33f6a1d9bb7ffed681085261a78d5ef4297f73de.zip
first pass at merging rpcclient from TNG to HEAD. You can get a
semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry (This used to be commit 269051aa0c52728278a1d290148564f11cf7f189)
Diffstat (limited to 'source3/lib/msrpc-client.c')
-rw-r--r--source3/lib/msrpc-client.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/source3/lib/msrpc-client.c b/source3/lib/msrpc-client.c
index 60924ed81c..696413b4f9 100644
--- a/source3/lib/msrpc-client.c
+++ b/source3/lib/msrpc-client.c
@@ -130,6 +130,38 @@ BOOL msrpc_receive(int fd, prs_struct *ps)
}
/****************************************************************************
+close the socket descriptor
+****************************************************************************/
+static void ncalrpc_l_close_socket(struct msrpc_local *msrpc)
+{
+ if (msrpc->fd != -1)
+ {
+ close(msrpc->fd);
+ }
+ msrpc->fd = -1;
+}
+
+
+/****************************************************************************
+shutdown a msrpcent structure
+****************************************************************************/
+void ncalrpc_l_shutdown(struct msrpc_local *msrpc)
+{
+ DEBUG(10, ("msrpc_shutdown\n"));
+ if (msrpc->outbuf)
+ {
+ free(msrpc->outbuf);
+ }
+ if (msrpc->inbuf)
+ {
+ free(msrpc->inbuf);
+ }
+ ncalrpc_l_close_socket(msrpc);
+ memset(msrpc, 0, sizeof(*msrpc));
+}
+
+
+/****************************************************************************
open the msrpcent sockets
****************************************************************************/
BOOL msrpc_connect(struct msrpc_state *msrpc, const char *pipe_name)