diff options
author | Tim Potter <tpot@samba.org> | 2002-08-08 04:58:19 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-08-08 04:58:19 +0000 |
commit | 335aa54b466896d6623ec2e61c1ca38442cddb6f (patch) | |
tree | c0bff92ceb1dad1d5322ba547446cf6ab6d2b4cb /source3/rpc_client | |
parent | 16c172c3a4bf8395763844fd584c981babf7033b (diff) | |
download | samba-335aa54b466896d6623ec2e61c1ca38442cddb6f.tar.gz samba-335aa54b466896d6623ec2e61c1ca38442cddb6f.tar.bz2 samba-335aa54b466896d6623ec2e61c1ca38442cddb6f.zip |
Merge of incomplete rffpcnex testing code from APPLIANCE_HEAD.
(This used to be commit fe43c2ac2d2e1dd3b3a25c807d4dd379c5ac4960)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_spoolss_notify.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_spoolss_notify.c b/source3/rpc_client/cli_spoolss_notify.c index 922b0fbb1d..f03046558e 100644 --- a/source3/rpc_client/cli_spoolss_notify.c +++ b/source3/rpc_client/cli_spoolss_notify.c @@ -221,3 +221,47 @@ done: return result; } + +WERROR cli_spoolss_rffpcnex(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint32 flags, uint32 options, + char *localmachine, uint32 printerlocal, + SPOOL_NOTIFY_OPTION *option) +{ + prs_struct qbuf, rbuf; + SPOOL_Q_RFFPCNEX q; + SPOOL_R_RFFPCNEX r; + WERROR result = W_ERROR(ERRgeneral); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Initialise input parameters */ + + make_spoolss_q_rffpcnex( + &q, pol, flags, options, localmachine, printerlocal, + option); + + /* Marshall data and send request */ + + if(!spoolss_io_q_rffpcnex("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SPOOLSS_RFFPCNEX, &qbuf, &rbuf)) + goto done; + + /* Unmarshall response */ + + if(!spoolss_io_r_rffpcnex("", &r, &rbuf, 0)) + goto done; + + result = r.status; + +done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} |