[Bug 23819] Add high-level API for FileTransfer

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 23 15:12:03 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=23819





--- Comment #12 from Andre Moreira Magalhaes <andrunko at gmail.com>  2009-09-23 06:12:02 PST ---
(In reply to comment #10)
> > +        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?
We will

> The rest of your changes up to 715aeab look good.
> 
Reverted changes for now, will file a bug agains gabble and one against tp-qt4.


-- 
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