summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/namequery.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index e774dbae15..8aaeb165cd 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -665,6 +665,8 @@ BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
struct in_addr *ip)
{
BOOL ret;
+ const char *sv_name = srv_name;
+
DEBUG(10,("resolve_srv_name: %s\n", srv_name));
if (srv_name == NULL || strequal("\\\\.", srv_name))
@@ -674,12 +676,12 @@ BOOL resolve_srv_name(const char* srv_name, fstring dest_host,
return True;
}
- if (!strnequal("\\\\", srv_name, 2))
+ if (strnequal("\\\\", srv_name, 2))
{
- return False;
+ sv_name = &srv_name[2];
}
- fstrcpy(dest_host, &srv_name[2]);
+ fstrcpy(dest_host, sv_name);
ret = resolve_name(dest_host, ip, 0x20);
if (is_ip_address(dest_host))