summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-01-02 12:49:49 -0800
committerJeremy Allison <jra@samba.org>2009-01-02 12:49:49 -0800
commit3d2d0203e57bacf0cd61cfb72780a4bd9aa42707 (patch)
treefa3e05b704381f1881cfeeb16259553681988df4 /source3/libsmb
parent11576353f645d7d7f44a74d27545b946c6175658 (diff)
downloadsamba-3d2d0203e57bacf0cd61cfb72780a4bd9aa42707.tar.gz
samba-3d2d0203e57bacf0cd61cfb72780a4bd9aa42707.tar.bz2
samba-3d2d0203e57bacf0cd61cfb72780a4bd9aa42707.zip
Remove cli_cm_set_dest_ss() - removes the global dest_ss
from libsmb/clidfs.c. Keep the '-I<address>' option in smbclient working. The intent is to remove all globals from libsmb/clidfs.c. Jeremy.
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clidfs.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index 4597e63c98..ac68700fd0 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -54,8 +54,6 @@ static void cm_set_password(const char *newpass);
static int port;
static int name_type = 0x20;
-static bool have_ip;
-static struct sockaddr_storage dest_ss;
static struct client_connection *connections;
@@ -133,8 +131,11 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
}
sharename = servicename;
if (*sharename == '\\') {
- server = sharename+2;
- sharename = strchr_m(server,'\\');
+ sharename += 2;
+ if (server == NULL) {
+ server = sharename;
+ }
+ sharename = strchr_m(sharename,'\\');
if (!sharename) {
return NULL;
}
@@ -151,8 +152,6 @@ static struct cli_state *do_connect(TALLOC_CTX *ctx,
again:
zero_sockaddr(&ss);
- if (have_ip)
- ss = dest_ss;
/* have to open a new connection */
if (!(c=cli_initialise()) || (cli_set_port(c, port) != port)) {
@@ -550,15 +549,6 @@ void cli_cm_set_fallback_after_kerberos(void)
cm_creds.fallback_after_kerberos = true;
}
-/****************************************************************************
-****************************************************************************/
-
-void cli_cm_set_dest_ss(struct sockaddr_storage *pss)
-{
- dest_ss = *pss;
- have_ip = true;
-}
-
/**********************************************************************
split a dfs path into the server, share name, and extrapath components
**********************************************************************/