diff options
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_connect.c | 1 | ||||
-rw-r--r-- | source3/rpc_client/cli_use.c | 33 |
2 files changed, 31 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_connect.c b/source3/rpc_client/cli_connect.c index 0baa279711..d2d23864c3 100644 --- a/source3/rpc_client/cli_connect.c +++ b/source3/rpc_client/cli_connect.c @@ -23,7 +23,6 @@ #define NO_SYSLOG #include "includes.h" -#include "trans2.h" struct user_credentials *usr_creds = NULL; diff --git a/source3/rpc_client/cli_use.c b/source3/rpc_client/cli_use.c index 2f79d4c2cf..a2559fbaab 100644 --- a/source3/rpc_client/cli_use.c +++ b/source3/rpc_client/cli_use.c @@ -287,7 +287,6 @@ BOOL cli_net_use_del(const char* srv_name, DEBUG(10,("cli_net_use_del: %s. force close: %s\n", srv_name, BOOLSTR(force_close))); - dbgflush(); if (strnequal("\\\\", sv_name, 2)) { @@ -321,7 +320,6 @@ BOOL cli_net_use_del(const char* srv_name, DEBUG(10,("idx: %i num_users now: %d\n", i, clis[i]->num_users)); - dbgflush(); if (force_close || clis[i]->num_users == 0) { @@ -336,3 +334,34 @@ BOOL cli_net_use_del(const char* srv_name, return False; } +/**************************************************************************** +enumerate client states +****************************************************************************/ +void cli_net_use_enum(uint32 *num_cons, struct use_info ***use) +{ + int i; + + *num_cons = 0; + *use = NULL; + + for (i = 0; i < num_clis; i++) + { + struct use_info item; + + ZERO_STRUCT(item); + + if (clis[i] == NULL) continue; + + item.connected = clis[i]->cli != NULL ? True : False; + + if (item.connected) + { + item.srv_name = clis[i]->cli->desthost; + item.user_name = clis[i]->cli->usr.user_name; + item.domain = clis[i]->cli->usr.domain; + } + + add_use_to_array(num_cons, use, &item); + } +} + |