summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-27 22:34:12 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-27 22:34:12 +0000
commit9fef73c27e07dbf658681e6c1027602328ed0add (patch)
tree5ef358490d5a4d922a650a574e9b55e6fb63c04e /source3/rpc_client
parent4a6761a58d5718c386c7ab4fa89c34fa08dca53b (diff)
downloadsamba-9fef73c27e07dbf658681e6c1027602328ed0add.tar.gz
samba-9fef73c27e07dbf658681e6c1027602328ed0add.tar.bz2
samba-9fef73c27e07dbf658681e6c1027602328ed0add.zip
updated \PIPE\wkssvc commands to use new abstracted connection system.
modified resolve_srv_name() to return dest host of *SMBSERVER if server name is \\ip.add.ress.format (This used to be commit 3204829225792974c8b20efb6ba6e24661a4f658)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_wkssvc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_wkssvc.c b/source3/rpc_client/cli_wkssvc.c
index 06ba8b88c8..99141bae6c 100644
--- a/source3/rpc_client/cli_wkssvc.c
+++ b/source3/rpc_client/cli_wkssvc.c
@@ -34,16 +34,21 @@ extern int DEBUGLEVEL;
/****************************************************************************
do a WKS Open Policy
****************************************************************************/
-BOOL do_wks_query_info(struct cli_state *cli, uint16 fnum,
- char *server_name, uint32 switch_value,
+BOOL wks_query_info( char *srv_name, uint32 switch_value,
WKS_INFO_100 *wks100)
{
prs_struct rbuf;
prs_struct buf;
WKS_Q_QUERY_INFO q_o;
BOOL valid_info = False;
+ struct cli_connection *con = NULL;
- if (server_name == 0 || wks100 == NULL) return False;
+ if (wks100 == NULL) return False;
+
+ if (!cli_connection_init(srv_name, PIPE_WKSSVC, &con))
+ {
+ return False;
+ }
prs_init(&buf , 1024, 4, SAFETY_MARGIN, False);
prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True );
@@ -53,13 +58,13 @@ BOOL do_wks_query_info(struct cli_state *cli, uint16 fnum,
DEBUG(4,("WKS Query Info\n"));
/* store the parameters */
- make_wks_q_query_info(&q_o, server_name, switch_value);
+ make_wks_q_query_info(&q_o, srv_name, switch_value);
/* turn parameters into data stream */
wks_io_q_query_info("", &q_o, &buf, 0);
/* send the data on \PIPE\ */
- if (rpc_api_pipe_req(cli, fnum, WKS_QUERY_INFO, &buf, &rbuf))
+ if (rpc_con_pipe_req(con, WKS_QUERY_INFO, &buf, &rbuf))
{
WKS_R_QUERY_INFO r_o;
BOOL p;
@@ -85,6 +90,8 @@ BOOL do_wks_query_info(struct cli_state *cli, uint16 fnum,
prs_mem_free(&rbuf);
prs_mem_free(&buf );
+ cli_connection_unlink(con);
+
return valid_info;
}