From 0ae491629917116b2ad587762a258a5649408649 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 13 Dec 2001 08:54:51 +0000 Subject: improved error message from failed connect (This used to be commit 4405a87fb754cece3a5428246ea6ecb9abba1996) --- source3/utils/net.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source3/utils/net.c') diff --git a/source3/utils/net.c b/source3/utils/net.c index 5a1bace8f1..fde23085de 100644 --- a/source3/utils/net.c +++ b/source3/utils/net.c @@ -122,7 +122,8 @@ static struct cli_state *connect_to_ipc(struct in_addr *server_ip, const char *s if (NT_STATUS_IS_OK(nt_status)) { return c; } else { - DEBUG(1,("Cannot connect to server. Error was %s\n", get_nt_error_msg(nt_status))); + DEBUG(0,("Cannot connect to server. Error was %s\n", + get_nt_error_msg(nt_status))); return NULL; } } @@ -144,7 +145,7 @@ static struct cli_state *connect_to_ipc_anonymous(struct in_addr *server_ip, con if (NT_STATUS_IS_OK(nt_status)) { return c; } else { - DEBUG(1,("Cannot connect to server (anonymously). Error was %s\n", get_nt_error_msg(nt_status))); + DEBUG(0,("Cannot connect to server (anonymously). Error was %s\n", get_nt_error_msg(nt_status))); return NULL; } } @@ -238,10 +239,6 @@ struct cli_state *net_make_ipc_connection(unsigned flags) cli = connect_to_ipc(&server_ip, server_name); } SAFE_FREE(server_name); - if(!cli) { - d_printf("\nUnable to connect to target server\n"); - return NULL; - } return cli; } -- cgit