inetcomm: Fix error check in InternetTransport_Connect().

This commit is contained in:
Gerald Pfeifer 2007-11-23 20:57:58 +01:00 committed by Alexandre Julliard
parent 7670393508
commit 173a8bb224
1 changed files with 5 additions and 2 deletions

View File

@ -110,6 +110,8 @@ HRESULT InternetTransport_Connect(InternetTransport *This,
for (ai_cur = ai; ai_cur; ai_cur = ai->ai_next)
{
int so;
if (TRACE_ON(inetcomm))
{
char host[256];
@ -122,12 +124,13 @@ HRESULT InternetTransport_Connect(InternetTransport *This,
InternetTransport_ChangeStatus(This, IXP_CONNECTING);
This->Socket = socket(ai_cur->ai_family, ai_cur->ai_socktype, ai_cur->ai_protocol);
if (This->Socket < 0)
so = socket(ai_cur->ai_family, ai_cur->ai_socktype, ai_cur->ai_protocol);
if (so == -1)
{
WARN("socket() failed\n");
continue;
}
This->Socket = so;
/* FIXME: set to async */