diff options
author | Luke Leighton <lkcl@samba.org> | 1999-11-27 22:53:28 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1999-11-27 22:53:28 +0000 |
commit | 601d217f44ea1ce3735b9267b6f829b472a982b4 (patch) | |
tree | 6c203457c918bba8b349268cd0d97ac5c15a6162 /source/rpc_client | |
parent | 4c3556fae73c60693355f95f48ac63834ba4dd10 (diff) | |
download | samba-601d217f44ea1ce3735b9267b6f829b472a982b4.tar.gz samba-601d217f44ea1ce3735b9267b6f829b472a982b4.tar.xz samba-601d217f44ea1ce3735b9267b6f829b472a982b4.zip |
moved browser command brsinfo over to new abstracted connection
Diffstat (limited to 'source/rpc_client')
-rw-r--r-- | source/rpc_client/cli_brs.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source/rpc_client/cli_brs.c b/source/rpc_client/cli_brs.c index 01fc0439539..f4e055f3944 100644 --- a/source/rpc_client/cli_brs.c +++ b/source/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; } |