[Bug 39543] Implement whitespace pings
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Aug 1 19:10:59 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=39543
Will Thompson <will.thompson at collabora.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status Whiteboard| |r-
--- Comment #3 from Will Thompson <will.thompson at collabora.co.uk> 2011-08-01 10:10:59 PDT ---
You're missing docstrings for wocky_c2s_porter_send_whitespace_ping_async and
_finish.
You may be interested in wocky_implement_finish_void for future reference.
+typedef struct
+{
+ WockyC2SPorter *self;
+ GSimpleAsyncResult *result;
+} WhitespacePingData;
+ data->self = g_object_ref (self);
+ data->result = g_simple_async_result_new (G_OBJECT (self),
+ callback, user_data, wocky_c2s_porter_send_whitespace_ping_async);
This structure is pointless. GSimpleAsyncResult holds a ref to its source
object: you can get it with g_async_result_get_source_object(). (Danger: that
function returns a ref.)
The only functional issue with this branch is: I think you need to add a guard
to wocky_c2s_porter_send_async() to make sure it doesn't call
wocky_xmpp_connection_send_stanza_async while a
wocky_xmpp_connection_send_whitespace_ping_async call is ongoing. Otherwise the
call to wocky_xmpp_connection_send_stanza_async will fail and then the whole
connection will get blown away.
It already has a guard for g_queue_get_length (priv->sending_queue) == 1 — I
think you need to add && !priv->sending_whitespace_ping there; and a call to
send_head_stanza in the success path of send_whitespace_ping_cb().
--
Configure bugmail: https://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