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
8a4433d6
Commit
8a4433d6
authored
May 29, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Do not set connectionless sockets into the CONNECTING or CONNECTED state.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=53058
parent
568a7153
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
9 deletions
+13
-9
sock.c
dlls/ws2_32/tests/sock.c
+6
-6
sock.c
server/sock.c
+7
-3
No files found.
dlls/ws2_32/tests/sock.c
View file @
8a4433d6
...
@@ -13035,7 +13035,7 @@ static void test_connect_time(void)
...
@@ -13035,7 +13035,7 @@ static void test_connect_time(void)
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
!
ret
,
"got %d
\n
"
,
ret
);
ok
(
!
GetLastError
(),
"got error %lu
\n
"
,
GetLastError
());
ok
(
!
GetLastError
(),
"got error %lu
\n
"
,
GetLastError
());
ok
(
len
==
sizeof
(
time
),
"got len %d
\n
"
,
len
);
ok
(
len
==
sizeof
(
time
),
"got len %d
\n
"
,
len
);
todo_wine
ok
(
time
==
~
0u
,
"got time %u
\n
"
,
time
);
ok
(
time
==
~
0u
,
"got time %u
\n
"
,
time
);
len
=
sizeof
(
time
);
len
=
sizeof
(
time
);
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -13116,19 +13116,19 @@ static void test_connect_udp(void)
...
@@ -13116,19 +13116,19 @@ static void test_connect_udp(void)
todo_wine
ok
(
GetLastError
()
==
WSAENOTCONN
,
"got error %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
GetLastError
()
==
WSAENOTCONN
,
"got error %lu
\n
"
,
GetLastError
());
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
todo_wine
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
++
addr
.
sin_port
;
++
addr
.
sin_port
;
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
todo_wine
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memset
(
&
addr
,
0
,
sizeof
(
addr
));
addr
.
sin_family
=
AF_UNSPEC
;
addr
.
sin_family
=
AF_UNSPEC
;
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
ret
=
connect
(
client
,
(
struct
sockaddr
*
)
&
addr
,
sizeof
(
addr
));
todo_wine
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
!
ret
,
"got error %lu
\n
"
,
GetLastError
());
ret
=
getpeername
(
client
,
(
struct
sockaddr
*
)
&
ret_addr
,
&
len
);
ret
=
getpeername
(
client
,
(
struct
sockaddr
*
)
&
ret_addr
,
&
len
);
todo_wine
ok
(
ret
==
-
1
,
"got %d
\n
"
,
ret
);
ok
(
ret
==
-
1
,
"got %d
\n
"
,
ret
);
todo_wine
ok
(
GetLastError
()
==
WSAENOTCONN
,
"got error %lu
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
WSAENOTCONN
,
"got error %lu
\n
"
,
GetLastError
());
closesocket
(
server
);
closesocket
(
server
);
closesocket
(
client
);
closesocket
(
client
);
...
...
server/sock.c
View file @
8a4433d6
...
@@ -2385,13 +2385,17 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
...
@@ -2385,13 +2385,17 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
if
(
!
ret
)
if
(
!
ret
)
{
{
sock
->
state
=
SOCK_CONNECTED
;
if
(
sock
->
type
!=
WS_SOCK_DGRAM
)
sock
->
connect_time
=
current_time
;
{
sock
->
state
=
SOCK_CONNECTED
;
sock
->
connect_time
=
current_time
;
}
if
(
!
send_len
)
return
;
if
(
!
send_len
)
return
;
}
}
sock
->
state
=
SOCK_CONNECTING
;
if
(
sock
->
type
!=
WS_SOCK_DGRAM
)
sock
->
state
=
SOCK_CONNECTING
;
if
(
params
->
synchronous
&&
sock
->
nonblocking
)
if
(
params
->
synchronous
&&
sock
->
nonblocking
)
{
{
...
...
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