]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
smblib: Improve SMB server name maintenance (#494)
authoraaron-costello <56684862+aaron-costello@users.noreply.github.com>
Fri, 18 Oct 2019 23:03:27 +0000 (23:03 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 19 Oct 2019 13:57:35 +0000 (13:57 +0000)
lib/smblib/smblib.c

index 545cc979b071ea32e21385ffef1927931a3f2ccf..d5c9a08fdf4936aa294680a0a59abaf4b52308fb 100644 (file)
@@ -149,10 +149,10 @@ SMB_Handle_Type SMB_Connect_Server(SMB_Handle_Type Con_Handle,
     /* Now connect to the remote end, but first upper case the name of the
        service we are going to call, sine some servers want it in uppercase */
 
-    for (i=0; i < strlen(server); i++)
-        called[i] = xtoupper(server[i]);
+    for (i=0; i < strlen(con -> desthost); i++)
+        called[i] = xtoupper(con -> desthost[i]);
 
-    called[strlen(server)] = 0;    /* Make it a string */
+    called[strlen(con -> desthost)] = 0;    /* Make it a string */
 
     for (i=0; i < strlen(con -> myname); i++)
         calling[i] = xtoupper(con -> myname[i]);
@@ -265,10 +265,10 @@ SMB_Handle_Type SMB_Connect(SMB_Handle_Type Con_Handle,
     /* Now connect to the remote end, but first upper case the name of the
        service we are going to call, sine some servers want it in uppercase */
 
-    for (i=0; i < strlen(host); i++)
-        called[i] = xtoupper(host[i]);
+    for (i=0; i < strlen(con -> desthost); i++)
+        called[i] = xtoupper(con -> desthost[i]);
 
-    called[strlen(host)] = 0;    /* Make it a string */
+    called[strlen(con -> desthost)] = 0;    /* Make it a string */
 
     for (i=0; i < strlen(con -> myname); i++)
         calling[i] = xtoupper(con -> myname[i]);