summaryrefslogtreecommitdiff
path: root/source4/rpc_server
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-06 14:51:47 +0100
committerGünther Deschner <gd@samba.org>2009-02-06 14:59:22 +0100
commitf157c1a07f3fbbc461a806b10e24e25d0b261070 (patch)
treeef961bae8a5e8a77e29162fb8a9bce318e7ef50f /source4/rpc_server
parent33d2507ba2374afabeaff455c08896fa45babbe8 (diff)
downloadsamba-f157c1a07f3fbbc461a806b10e24e25d0b261070.tar.gz
samba-f157c1a07f3fbbc461a806b10e24e25d0b261070.tar.bz2
samba-f157c1a07f3fbbc461a806b10e24e25d0b261070.zip
s4-spoolss: fix s4 spoolss server build (using a temp macro).
Guenther
Diffstat (limited to 'source4/rpc_server')
-rw-r--r--source4/rpc_server/spoolss/dcesrv_spoolss.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source4/rpc_server/spoolss/dcesrv_spoolss.c b/source4/rpc_server/spoolss/dcesrv_spoolss.c
index 1317dba1a4..4520e33437 100644
--- a/source4/rpc_server/spoolss/dcesrv_spoolss.c
+++ b/source4/rpc_server/spoolss/dcesrv_spoolss.c
@@ -42,6 +42,8 @@ enum spoolss_handle {
((info)?ndr_size_##fn##_info(dce_call, ic, level, count, info):0)
#define SPOOLSS_BUFFER_OK(val_true,val_false) ((r->in.offered >= r->out.needed)?val_true:val_false)
+/* FIXME: temporary macro, will be removed soon - gd */
+#define SPOOLSS_BUFFER_OK_P(val_true,val_false) ((r->in.offered >= *r->out.needed)?val_true:val_false)
static WERROR dcesrv_spoolss_parse_printer_name(TALLOC_CTX *mem_ctx, const char *name,
const char **_server_name,
@@ -412,9 +414,9 @@ static WERROR dcesrv_spoolss_GetPrinterDriverDirectory(struct dcesrv_call_state
status = ntptr_GetPrinterDriverDirectory(ntptr, mem_ctx, r);
W_ERROR_NOT_OK_RETURN(status);
- r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_DriverDirectoryInfo, ic, r->out.info, r->in.level);
+ r->out.info = SPOOLSS_BUFFER_OK_P(r->out.info, NULL);
+ return SPOOLSS_BUFFER_OK_P(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}
@@ -716,9 +718,9 @@ static WERROR dcesrv_spoolss_GetForm(struct dcesrv_call_state *dce_call, TALLOC_
return WERR_FOOBAR;
}
- r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
- r->out.info = SPOOLSS_BUFFER_OK(r->out.info, NULL);
- return SPOOLSS_BUFFER_OK(WERR_OK, WERR_INSUFFICIENT_BUFFER);
+ *r->out.needed = SPOOLSS_BUFFER_UNION(spoolss_FormInfo, ic, r->out.info, r->in.level);
+ r->out.info = SPOOLSS_BUFFER_OK_P(r->out.info, NULL);
+ return SPOOLSS_BUFFER_OK_P(WERR_OK, WERR_INSUFFICIENT_BUFFER);
}