Commit 11d09f1f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

wininet: Don't strip port part from server name in GetAddress.

Callers take care of that already.
parent 50c21449
......@@ -129,27 +129,15 @@ BOOL GetAddress(LPCWSTR lpszServerName, INTERNET_PORT nServerPort,
struct sockaddr *psa, socklen_t *sa_len)
{
struct addrinfo *res, hints;
WCHAR *found;
char *name;
int len, sz;
int sz;
int ret;
TRACE("%s\n", debugstr_w(lpszServerName));
/* Validate server name first
* Check if there is something like
* pinger.macromedia.com:80
* if yes, eliminate the :80....
*/
found = strchrW(lpszServerName, ':');
if (found)
len = found - lpszServerName;
else
len = strlenW(lpszServerName);
sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, NULL, 0, NULL, NULL );
sz = WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, -1, NULL, 0, NULL, NULL );
if (!(name = heap_alloc(sz + 1))) return FALSE;
WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, len, name, sz, NULL, NULL );
WideCharToMultiByte( CP_UNIXCP, 0, lpszServerName, -1, name, sz, NULL, NULL );
name[sz] = 0;
memset( &hints, 0, sizeof(hints) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment