Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
9dd32508
Commit
9dd32508
authored
Oct 24, 2000
by
Rein Klazes
Committed by
Alexandre Julliard
Oct 24, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert the value of level when setsockopt is called with
WS_SO_DONTLINGER.
parent
a9f6a9da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
socket.c
dlls/winsock/socket.c
+15
-14
No files found.
dlls/winsock/socket.c
View file @
9dd32508
...
...
@@ -2092,32 +2092,33 @@ INT WINAPI WSOCK32_setsockopt(SOCKET16 s, INT level, INT optname,
int
fd
=
_get_sock_fd
(
s
);
int
woptval
;
if
(
optname
==
WS_SO_DONTLINGER
)
{
if
(
optname
==
WS_SO_DONTLINGER
&&
level
==
WS_SOL_SOCKET
)
{
/* This is unique to WinSock and takes special conversion */
linger
.
l_onoff
=
*
((
int
*
)
optval
)
?
0
:
1
;
linger
.
l_linger
=
0
;
optname
=
SO_LINGER
;
optval
=
(
char
*
)
&
linger
;
optlen
=
sizeof
(
struct
linger
);
level
=
SOL_SOCKET
;
}
else
{
if
(
!
convert_sockopt
(
&
level
,
&
optname
))
{
SetLastError
(
WSAENOPROTOOPT
);
close
(
fd
);
return
SOCKET_ERROR
;
}
}
if
(
optname
==
SO_LINGER
&&
optval
)
{
/* yes, uses unsigned short in both win16/win32 */
linger
.
l_onoff
=
((
UINT16
*
)
optval
)[
0
];
linger
.
l_linger
=
((
UINT16
*
)
optval
)[
1
];
/* FIXME: what is documented behavior if SO_LINGER optval
is null?? */
optval
=
(
char
*
)
&
linger
;
optlen
=
sizeof
(
struct
linger
);
}
else
if
(
optlen
<
sizeof
(
int
)){
woptval
=
*
((
INT16
*
)
optval
)
;
optval
=
(
char
*
)
&
woptval
;
optlen
=
sizeof
(
int
);
if
(
optname
==
SO_LINGER
&&
optval
)
{
/* yes, uses unsigned short in both win16/win32 */
linger
.
l_onoff
=
((
UINT16
*
)
optval
)[
0
];
linger
.
l_linger
=
((
UINT16
*
)
optval
)[
1
];
/* FIXME: what is documented behavior if SO_LINGER optval
is null?? */
optval
=
(
char
*
)
&
linger
;
optlen
=
sizeof
(
struct
linger
)
;
}
else
if
(
optlen
<
sizeof
(
int
)){
woptval
=
*
((
INT16
*
)
optval
);
optval
=
(
char
*
)
&
woptval
;
optlen
=
sizeof
(
int
)
;
}
}
if
(
optname
==
SO_RCVBUF
&&
*
(
int
*
)
optval
<
2048
)
{
WARN
(
"SO_RCVBF for %d bytes is too small: ignored
\n
"
,
*
(
int
*
)
optval
);
...
...
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