Module: wine Branch: master Commit: 173a8bb22431bf9340b7419de9b8b6615e8e180d URL: http://source.winehq.org/git/wine.git/?a=commit;h=173a8bb22431bf9340b7419de9...
Author: Gerald Pfeifer gerald@pfeifer.com Date: Fri Nov 23 20:57:58 2007 +0100
inetcomm: Fix error check in InternetTransport_Connect().
---
dlls/inetcomm/internettransport.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/inetcomm/internettransport.c b/dlls/inetcomm/internettransport.c index a056201..19fed54 100644 --- a/dlls/inetcomm/internettransport.c +++ b/dlls/inetcomm/internettransport.c @@ -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 */