Commit 173a8bb2 authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

inetcomm: Fix error check in InternetTransport_Connect().

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