From: aaron-costello <56684862+aaron-costello@users.noreply.github.com> Date: Fri, 18 Oct 2019 23:03:27 +0000 (+0000) Subject: smblib: Improve SMB server name maintenance (#494) X-Git-Tag: SQUID_5_0_1~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=459bba240aa2366cf36e6a3ba3f95e07efefbc7b;p=thirdparty%2Fsquid.git smblib: Improve SMB server name maintenance (#494) --- diff --git a/lib/smblib/smblib.c b/lib/smblib/smblib.c index 545cc979b0..d5c9a08fdf 100644 --- a/lib/smblib/smblib.c +++ b/lib/smblib/smblib.c @@ -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]);