Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9bded7bb
Commit
9bded7bb
authored
Aug 26, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Avoid testing errno when it isn't set. Simplify NETCON_getNextLine a bit.
parent
5f727cb2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
netconnection.c
dlls/wininet/netconnection.c
+10
-23
No files found.
dlls/wininet/netconnection.c
View file @
9bded7bb
...
...
@@ -634,8 +634,8 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
if
(
!
connection
->
useSSL
)
{
struct
pollfd
pfd
;
BOOL
bSuccess
=
FALSE
;
DWORD
nRecv
=
0
;
int
ret
;
pfd
.
fd
=
connection
->
socketFD
;
pfd
.
events
=
POLLIN
;
...
...
@@ -644,16 +644,18 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
{
if
(
poll
(
&
pfd
,
1
,
RESPONSE_TIMEOUT
*
1000
)
>
0
)
{
if
(
recv
(
connection
->
socketFD
,
&
lpszBuffer
[
nRecv
],
1
,
0
)
<=
0
)
if
(
(
ret
=
recv
(
connection
->
socketFD
,
&
lpszBuffer
[
nRecv
],
1
,
0
)
)
<=
0
)
{
INTERNET_SetLastError
(
sock_get_error
(
errno
));
goto
lend
;
if
(
ret
==
-
1
)
INTERNET_SetLastError
(
sock_get_error
(
errno
));
break
;
}
if
(
lpszBuffer
[
nRecv
]
==
'\n'
)
{
bSuccess
=
TRUE
;
break
;
lpszBuffer
[
nRecv
++
]
=
'\0'
;
*
dwBuffer
=
nRecv
;
TRACE
(
":%u %s
\n
"
,
nRecv
,
lpszBuffer
);
return
TRUE
;
}
if
(
lpszBuffer
[
nRecv
]
!=
'\r'
)
nRecv
++
;
...
...
@@ -661,22 +663,9 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
else
{
INTERNET_SetLastError
(
ERROR_INTERNET_TIMEOUT
);
goto
lend
;
break
;
}
}
lend:
/* FIXME: don't use labels */
if
(
bSuccess
)
{
lpszBuffer
[
nRecv
++
]
=
'\0'
;
*
dwBuffer
=
nRecv
;
TRACE
(
":%u %s
\n
"
,
nRecv
,
lpszBuffer
);
return
TRUE
;
}
else
{
return
FALSE
;
}
}
else
{
...
...
@@ -714,11 +703,9 @@ BOOL NETCON_getNextLine(WININET_NETCONNECTION *connection, LPSTR lpszBuffer, LPD
TRACE
(
"_SSL:%u %s
\n
"
,
nRecv
,
lpszBuffer
);
return
TRUE
;
}
return
FALSE
;
#else
return
FALSE
;
#endif
}
return
FALSE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment