[Bug 23819] Add high-level API for FileTransfer
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Sep 23 14:48:24 CEST 2009
http://bugs.freedesktop.org/show_bug.cgi?id=23819
--- Comment #10 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2009-09-23 05:48:23 PST ---
> + QTcpServer tcpServer;
> + tcpServer.listen(QHostAddress("127.0.0.1"));
> + quint16 port = tcpServer.serverPort();
> + tcpServer.close();
> +
> + SocketAddressIPv4 addr;
> + addr.address = "127.0.0.1";
> + addr.port = port;
This doesn't look right. Does anything guarantee that the kernel will give you
the same port when you bind() again? I don't think it does!
You have to do something that results in a call to bind() and getsockname()
only, and leaves the socket hanging around for a later outgoing connect() - I
have no idea what in Qt does that. It's not a common high-level thing to do, so
some high-level APIs (wrongly!) abstract away the difference between bind() and
listen()...
Given that Gabble doesn't support this, I think we should revert this change,
and file a bug about it instead (and the same for Gabble).
We may be able to support this access-control mode later by extracting the fd
from the QTcpSocket, and calling bind() and getsockname() directly?
The rest of your changes up to 715aeab look good.
--
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the telepathy-bugs
mailing list