summaryrefslogtreecommitdiff
path: root/source3/include/rpc_client.h
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-06-08 22:10:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:08 -0500
commitfed660877c16562265327c6093ea645cf4176b5c (patch)
treee92ae1356542ba095d806bbe1093fa56fbc8ddcc /source3/include/rpc_client.h
parent66bb4f03c3466205488f72e4878e8801c5bbb295 (diff)
downloadsamba-fed660877c16562265327c6093ea645cf4176b5c.tar.gz
samba-fed660877c16562265327c6093ea645cf4176b5c.tar.bz2
samba-fed660877c16562265327c6093ea645cf4176b5c.zip
r7415: * big change -- volker's new async winbindd from trunk
(This used to be commit a0ac9a8ffd4af31a0ebc423b4acbb2f043d865b8)
Diffstat (limited to 'source3/include/rpc_client.h')
-rw-r--r--source3/include/rpc_client.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/source3/include/rpc_client.h b/source3/include/rpc_client.h
index 4ac2f43ee0..9ca2d5aa8c 100644
--- a/source3/include/rpc_client.h
+++ b/source3/include/rpc_client.h
@@ -21,9 +21,10 @@
#ifndef _RPC_CLIENT_H
#define _RPC_CLIENT_H
-/* macro to expand cookie-cutter code in cli_xxx() */
+/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req() */
-#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, q_ps, r_ps, q_io_fn, r_io_fn, default_error) \
+#define CLI_DO_RPC( pcli, ctx, pipe_num, opnum, q_in, r_out, \
+ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
{ r_out.status = default_error;\
prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \
prs_init( &r_ps, 0, ctx, UNMARSHALL );\
@@ -38,4 +39,22 @@
prs_mem_free( &r_ps );\
}
+/* macro to expand cookie-cutter code in cli_xxx() using rpc_api_pipe_req_int() */
+
+#define CLI_DO_RPC_EX( pcli, ctx, pipe_num, opnum, q_in, r_out, \
+ q_ps, r_ps, q_io_fn, r_io_fn, default_error ) \
+{ r_out.status = default_error;\
+ prs_init( &q_ps, MAX_PDU_FRAG_LEN, ctx, MARSHALL ); \
+ prs_init( &r_ps, 0, ctx, UNMARSHALL );\
+ if ( q_io_fn("", &q_in, &q_ps, 0) ) {\
+ if ( rpc_api_pipe_req_int(pcli, opnum, &q_ps, &r_ps) ) {\
+ if (!r_io_fn("", &r_out, &r_ps, 0)) {\
+ r_out.status = default_error;\
+ }\
+ }\
+ }\
+ prs_mem_free( &q_ps );\
+ prs_mem_free( &r_ps );\
+}
+
#endif /* _RPC_CLIENT_H */