https://bugs.winehq.org/show_bug.cgi?id=53911
Bug ID: 53911 Summary: DC++ is no longer able to retrieve file list from another user. Product: Wine Version: 6.12 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock Assignee: wine-bugs@winehq.org Reporter: dee3shee7aeno4@mailinator.com Distribution: ---
Since following commit DC++ is no longer able to retrieve the file list from another user:
commit 8312539efe18533f6e2b35882d12e9d1bcbefa0d Author: Zebediah Figura z.figura12@gmail.com Date: Fri Jun 25 20:21:08 2021 -0500
ws2_32: Use IOCTL_AFD_WINE_GET_SO_RCVBUF.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
It looks like the application retrieves the buffer size via a call to getsockopt(SO_RCVBUF), but unfortunately receives a size of zero since the above commit.
The commit seems to not call getsockopt in the DC++ process any longer, instead it returns the value from a wineserver call.
Wine-gdb> bt #0 WS_getsockopt (s=<optimized out>, level=<optimized out>, optname=<optimized out>, optval=0x3f2fba8 "", optlen=<optimized out>) at wine/dlls/ws2_32/socket.c:2571 #1 0x0000000000667c7f in <lambda()>::operator() (__closure=<synthetic pointer>) at dcpp/Socket.cpp:510 #2 dcpp::(anonymous namespace)::check<dcpp::Socket::getSocketOptInt(int)::<lambda()> > (blockOk=false, f=...) at dcpp/Socket.cpp:52 #3 dcpp::Socket::getSocketOptInt (this=0x29d6fc0, option=option@entry=4098) at dcpp/Socket.cpp:510 #4 0x00000000005bd3aa in dcpp::BufferedSocket::threadAccept (this=this@entry=0x29d8820) at dcpp/BufferedSocket.cpp:179 #5 0x00000000005c4418 in dcpp::BufferedSocket::checkEvents (this=this@entry=0x29d8820) at dcpp/BufferedSocket.cpp:463 #6 0x00000000005c48e8 in dcpp::BufferedSocket::run (this=0x29d8820) at dcpp/BufferedSocket.cpp:498 #7 0x000000000098c3da in dcpp::Thread::starter (p=<optimized out>) at dcpp/Thread.h:107
https://sourceforge.net/p/dcplusplus/code/ci/default/tree/dcpp/Socket.cpp#l5... https://sourceforge.net/p/dcplusplus/code/ci/default/tree/dcpp/BufferedSocke...
The wineserver sock->rcvbuf gets initialized here:
(gdb) bt #0 create_socket () at wine/server/file.h:240 #1 0x0000555946fd7619 in accept_socket (sock=0x555949c36cc0) at wine/server/sock.c:1618 #2 0x0000555946fd9c9e in sock_ioctl (fd=<optimized out>, code=<optimized out>, async=0x555949c3fb40) at wine/server/sock.c:2016 #3 0x0000555946fb4481 in req_ioctl (req=0x555949c371c8, reply=0x7ffcfd2ec140) at wine/server/fd.c:2794 #4 0x0000555946fd39cb in call_req_handler (thread=<optimized out>) at wine/server/request.c:312 #5 0x0000555946fdcd10 in thread_poll_event (fd=<optimized out>, event=<optimized out>) at wine/server/thread.c:388 #6 0x0000555946fb1c67 in main_loop_epoll () at wine/server/fd.c:525 #7 0x0000555946fb1ece in main_loop () at wine/server/fd.c:985 #8 0x0000555946fa3a80 in main ()
And following change makes DC++ work again with wine-7.21, unsure if this is correct:
--- a/server/sock.c +++ b/server/sock.c @@ -1998,6 +1998,7 @@ static struct sock *accept_socket( struct sock *sock ) acceptsock->window = sock->window; acceptsock->message = sock->message; acceptsock->connect_time = current_time; + acceptsock->rcvbuf = sock->rcvbuf; if (sock->event) acceptsock->event = (struct event *)grab_object( sock->event );
https://bugs.winehq.org/show_bug.cgi?id=53911
dee3shee7aeno4 dee3shee7aeno4@mailinator.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://dcplusplus.sourcefo | |rge.io/ CC| |z.figura12@gmail.com Distribution|--- |Debian Regression SHA1| |8312539efe18533f6e2b35882d1 | |2e9d1bcbefa0d
https://bugs.winehq.org/show_bug.cgi?id=53911
Gijs Vermeulen gijsvrm@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression Summary|DC++ is no longer able to |DC++ can't retrieve file |retrieve file list from |list from another user |another user. |
https://bugs.winehq.org/show_bug.cgi?id=53911
Zeb Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |1ef2cc0f643ba0614d189708b7a | |7af4bccee389f
--- Comment #1 from Zeb Figura z.figura12@gmail.com --- Thanks for the report and the diagnosis; should be fixed in https://source.winehq.org/git/wine.git/commitdiff/1ef2cc0f643ba0614d189708b7a7af4bccee389f.
https://bugs.winehq.org/show_bug.cgi?id=53911
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #2 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc2.