[Bug 25493] GTalk-compatible file transfers are not implemented

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 22 21:29:51 CET 2010


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





--- Comment #16 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2010-03-22 13:29:51 PST ---
(In reply to comment #11)
> > transport_disconnected_cb
> > > +  /* TODO: what about a FT from gtalk, receiving a directory where the size
> > > +     is just an estimate.. we might be > size, but the FT hasn't completed yet */
> > 
> > What about that? Does GTalk provide a reliable way to tell us "... and
> > that's all"? Perhaps you could look at libjingle and see how they detect the
> > end?
> 
> no, that's ok, we already know the end since it's HTTP, it's transferred with
> chunked content encoding, so we know when the last chunk is received. What I
> meant but that is :
> if the UI disconnects from gabble before the file has finished transferring, we
> go into 'canceled' state with LOCAL_ERROR reason, and it does that by checking
> if transferred_bytes >= size. But when transferring a directory, the size is an
> approximation, and it's lower than the real file size, so it might fail to know
> if the disconnection happened before the file finished transferring... So I'd
> have to keep track somehow of when the file is completed... 

This sounds wrong in any case - if you've pushed n bytes into the buffer,
there's no guarantee that the client has read all those n bytes?

I'm not sure how to solve this; perhaps file a separate bug and reference it in
the comment.

> > > +content_new_channel_cb (GabbleJingleContent *content, const gchar *name,
> > ...
> > > +      (gpointer *)&relay_data->self);
> > 
> > This violates strict aliasing (so the compiler might mis-optimize it). Put
> > a gpointer in the struct :-(
> I would still need to cast 'self' into the relay_data structure, so it's all
> the same. as I said in previous comment, I don't think 'gpointer' breaks
> strict-aliasing. + there are no warnings..

This one definitely does violate the C99 aliasing rules (because it's gpointer*
rather than gpointer), unless there's something I'm missing in the C99 standard
- the cast just suppresses the warning, I think.


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