From 250c9801197ea1c949bd94c1c891f81ab118b130 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Nov 2002 23:15:52 +0000 Subject: Removed global_myworkgroup, global_myname, global_myscope. Added liberal dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a) --- source3/rpcclient/rpcclient.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/rpcclient') diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c index e23140bdb0..646a6d9035 100644 --- a/source3/rpcclient/rpcclient.c +++ b/source3/rpcclient/rpcclient.c @@ -435,7 +435,8 @@ static void add_command_set(struct cmd_set *cmd_set) static NTSTATUS do_cmd(struct cli_state *cli, struct cmd_set *cmd_entry, char *cmd) { - char *p = cmd, **argv = NULL; + char **argv = NULL; + const char *p = cmd; NTSTATUS result = NT_STATUS_UNSUCCESSFUL; pstring buf; int argc = 0, i; @@ -528,7 +529,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) struct cmd_list *temp_list; BOOL found = False; pstring buf; - char *p = cmd; + const char *p = cmd; NTSTATUS result = NT_STATUS_OK; int len = 0; @@ -578,7 +579,6 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) int main(int argc, char *argv[]) { - extern pstring global_myname; static int got_pass = 0; BOOL interactive = True; int opt; @@ -694,8 +694,8 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) load_interfaces(); - get_myname((*global_myname)?NULL:global_myname); - strupper(global_myname); + if (!init_names()) + return 1; /* Resolve the IP address */ @@ -719,7 +719,7 @@ static NTSTATUS process_cmd(struct cli_state *cli, char *cmd) if (!strlen(username) && !got_pass) get_username(username); - nt_status = cli_full_connection(&cli, global_myname, server, + nt_status = cli_full_connection(&cli, global_myname(), server, &server_ip, 0, "IPC$", "IPC", username, domain, -- cgit