From 053b9759003d3a36856945faaeb9879e8fe445d5 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 13 Sep 2013 11:06:00 +0200 Subject: s3:rpcclient: introduce global rpcclient_cli_state Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- source3/rpcclient/rpcclient.c | 4 +++- source3/rpcclient/rpcclient.h | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index 42c565d211..c88e6b30d8 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -49,6 +49,7 @@ static unsigned int timeout = 0; static enum dcerpc_transport_t default_transport = NCACN_NP; struct user_auth_info *rpcclient_auth_info; +struct cli_state *rpcclient_cli_state; /* List to hold groups of commands. * @@ -1113,7 +1114,7 @@ out_free: #endif /* Load command lists */ - + rpcclient_cli_state = cli; timeout = cli_set_timeout(cli, 10000); cmd_set = rpcclient_command_list; @@ -1161,6 +1162,7 @@ out_free: } done: + rpcclient_cli_state = NULL; if (cli != NULL) { cli_shutdown(cli); } diff --git a/source3/rpcclient/rpcclient.h b/source3/rpcclient/rpcclient.h index 762c54aacd..ae12cac4d0 100644 --- a/source3/rpcclient/rpcclient.h +++ b/source3/rpcclient/rpcclient.h @@ -41,4 +41,6 @@ struct cmd_set { const char *usage; }; +extern struct cli_state *rpcclient_cli_state; + #endif /* RPCCLIENT_H */ -- cgit