On Wed, 6 Jun 2007, Hans Leidekker wrote: [...]
Changelog Make the passive mode response check case insensitive.
--- a/dlls/wininet/ftp.c +++ b/dlls/wininet/ftp.c [...] - if (strncmp(p, "Entering Passive Mode", 21)) + if (strncasecmp(p, "Entering Passive Mode", 21))
You should not be using str*casecmp() in Wine (because it's a Unix function, and because it uses the wrong locale). Try CompareString() instead.
Francois Gouget fgouget@free.fr writes:
You should not be using str*casecmp() in Wine (because it's a Unix function, and because it uses the wrong locale). Try CompareString() instead.
Actually both would be wrong in this case, the comparison should really be done in the C locale. But it's probably better to not check the string at all, that's what response codes are for.
On Thursday 07 June 2007, Francois Gouget wrote:
if (strncmp(p, "Entering Passive Mode", 21))
if (strncasecmp(p, "Entering Passive Mode", 21))
You should not be using str*casecmp() in Wine (because it's a Unix function, and because it uses the wrong locale). Try CompareString() instead.
I'd say it's okay here because we're comparing a fixed string returned from the FTP server (it's mentioned in the RFC for the ASCII based FTP protocol).
-Hans