summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-27 22:53:28 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-27 22:53:28 +0000
commitad1e5fdd96aa2c2d42b14a55c88d39ec0b927014 (patch)
treed31ef2bff4753e758a05dca7e69889c17538054c /source3/rpc_client
parentc80b85803b9fbc11cbf77486b847da9f38ba3684 (diff)
downloadsamba-ad1e5fdd96aa2c2d42b14a55c88d39ec0b927014.tar.gz
samba-ad1e5fdd96aa2c2d42b14a55c88d39ec0b927014.tar.bz2
samba-ad1e5fdd96aa2c2d42b14a55c88d39ec0b927014.zip
moved browser command brsinfo over to new abstracted connection
(This used to be commit 601d217f44ea1ce3735b9267b6f829b472a982b4)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_brs.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/rpc_client/cli_brs.c b/source3/rpc_client/cli_brs.c
index 01fc043953..f4e055f394 100644
--- a/source3/rpc_client/cli_brs.c
+++ b/source3/rpc_client/cli_brs.c
@@ -33,8 +33,7 @@ extern int DEBUGLEVEL;
/****************************************************************************
do a BRS Query
****************************************************************************/
-BOOL do_brs_query_info(struct cli_state *cli, uint16 fnum,
- const char *server_name, uint32 switch_value,
+BOOL brs_query_info( const char *srv_name, uint32 switch_value,
void *id)
{
prs_struct rbuf;
@@ -42,7 +41,14 @@ BOOL do_brs_query_info(struct cli_state *cli, uint16 fnum,
BRS_Q_QUERY_INFO q_o;
BOOL valid_info = False;
- if (server_name == NULL || id == NULL) return False;
+ struct cli_connection *con = NULL;
+
+ if (!cli_connection_init(srv_name, PIPE_BROWSER, &con))
+ {
+ return False;
+ }
+
+ if (id == NULL) return False;
prs_init(&buf , 1024, 4, SAFETY_MARGIN, False);
prs_init(&rbuf, 0 , 4, SAFETY_MARGIN, True );
@@ -52,13 +58,13 @@ BOOL do_brs_query_info(struct cli_state *cli, uint16 fnum,
DEBUG(4,("BRS Query Info\n"));
/* store the parameters */
- make_brs_q_query_info(&q_o, server_name, switch_value);
+ make_brs_q_query_info(&q_o, srv_name, switch_value);
/* turn parameters into data stream */
brs_io_q_query_info("", &q_o, &buf, 0);
/* send the data on \PIPE\ */
- if (rpc_api_pipe_req(cli, fnum, BRS_QUERY_INFO, &buf, &rbuf))
+ if (rpc_con_pipe_req(con, BRS_QUERY_INFO, &buf, &rbuf))
{
BRS_R_QUERY_INFO r_o;
BOOL p;
@@ -84,6 +90,8 @@ BOOL do_brs_query_info(struct cli_state *cli, uint16 fnum,
prs_mem_free(&rbuf);
prs_mem_free(&buf );
+ cli_connection_unlink(con);
+
return valid_info;
}