diff options
author | Tim Potter <tpot@samba.org> | 2001-08-10 06:11:31 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2001-08-10 06:11:31 +0000 |
commit | 5836e1f7febc1361f695258f7c0a8f7f95dc3617 (patch) | |
tree | 2bee58795ca4d0c786405c09c0566ee9459346bb /source3/rpc_client | |
parent | 62f7f6a022dea6fd4fbe514dcb3154bda334a07f (diff) | |
download | samba-5836e1f7febc1361f695258f7c0a8f7f95dc3617.tar.gz samba-5836e1f7febc1361f695258f7c0a8f7f95dc3617.tar.bz2 samba-5836e1f7febc1361f695258f7c0a8f7f95dc3617.zip |
Use new client error api.
(This used to be commit b196a52483a6e4ac1e4c311ff43d3c07fca031df)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index d4e161e212..1496f05504 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -81,12 +81,13 @@ static BOOL rpc_read(struct cli_state *cli, prs_struct *rdata, uint32 data_to_re DEBUG(5,("rpc_read: num_read = %d, read offset: %d, to read: %d\n", num_read, stream_offset, data_to_read)); - if (cli_is_dos_error(cli) && - cli_dos_error(cli, &eclass, &ecode) && - (eclass != ERRDOS && ecode != ERRmoredata)) { - DEBUG(0,("rpc_read: Error %d/%u in cli_read\n", - eclass, (unsigned int)ecode)); - return False; + if (cli_is_dos_error(cli)) { + cli_dos_error(cli, &eclass, &ecode); + if (eclass != ERRDOS && ecode != ERRmoredata) { + DEBUG(0,("rpc_read: Error %d/%u in cli_read\n", + eclass, (unsigned int)ecode)); + return False; + } } data_to_read -= num_read; @@ -469,12 +470,12 @@ static BOOL rpc_api_pipe(struct cli_state *cli, uint16 cmd, prs_struct *data, pr prs_give_memory(&hps, hdr_data, sizeof(hdr_data), False); num_read = cli_read(cli, cli->nt_pipe_fnum, hdr_data, 0, RPC_HEADER_LEN+RPC_HDR_RESP_LEN); - if (cli_is_dos_error(cli) && - cli_dos_error(cli, &eclass, &ecode) && - (eclass != ERRDOS && ecode != ERRmoredata)) { - DEBUG(0,("rpc_api_pipe: cli_read error : %d/%d\n", - eclass, ecode)); - return False; + if (cli_is_dos_error(cli)) { + cli_dos_error(cli, &eclass, &ecode); + if (eclass != ERRDOS && ecode != ERRmoredata) { + DEBUG(0,("rpc_api_pipe: cli_read error : %d/%d\n", eclass, ecode)); + return False; + } } DEBUG(5,("rpc_api_pipe: read header (size:%d)\n", num_read)); |