Bug 61302

Summary: Connector: either support multiple uses, or guard against them reliably
Product: Wocky Reporter: Will Thompson <will>
Component: GeneralAssignee: Telepathy bugs list <telepathy-bugs>
Status: NEW --- QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2013-02-22 18:59:00 UTC
I tried to re-use a WockyConnector to reconnect after my successful connection was later disconnected. Initially wocky_connector_connect_async() failed immediately because priv->result was non-NULL, but I noticed that most (but not all!) code paths end up setting priv->result back to NULL. So I made it consistent http://cgit.freedesktop.org/wocky/commit/?id=e77ed03f87 and now it crashes later:

tcp_srv_connected: wocky-connector.c:941: SRV connection succeeded
**
wocky:ERROR:wocky-connector.c:1073:maybe_old_ssl: assertion failed: (priv->conn == NULL)

which is to say: priv->conn, which is the WockyXmppConnection, is never set to NULL once the connection is established.

I think it would be useful to be able to re-use the same connector. A start on fixing this would be to make the WockyXmppConnection (and full JID and session id) be the GSimpleAsyncResult's op_res_gpointer (probably fixing bug 35351 in passing).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.