Age | Commit message (Collapse) | Author | Files | Lines |
|
This solution was taken from my solution to the same thing in
https://bugzilla.gnome.org/show_bug.cgi?id=646082.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
This commit should be reverted when we depend on a GLib new enough to
fix bgo#646082.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
They all share more code now, the signal handler disconnection is in
its own function and the porter timeouts are no longer removed.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Also, stop making more dups of JIDs than necessary, again.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
1. open a connection to a contact
2. create a PorterData struct, the timeout starts
3. call hold, the timeout stops
4. remote contact closes connection, the porter disappears and the
timeout stops
5. call unhold, the refcount is now 0 so the timeout starts
6. a new connection appears for the contact so it's referenced by the
PorterData struct and a timeout is started
BINGO! THAT'S TWO TIMEOUTS STARTED!
7. the first timeout is called, the porter is closed and struct
freed
8. the second timeout is called, the struct is already freed so we
crash here
I think this is the right fix, because this means that if you hold()
the PorterData struct will stay around, but if you unhold() it will
disappear.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
It turns out this assertion was being hit a little too often and it
was actually somewhat feasible. Let's clear up new connections when
they're not needed. I thought about adding some kind of support for
multiple porters for this case but it got a bit hairy and I feel that
if you already have an open connection to a contact and another
appears, this is possibly a bug elsewhere.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Whoops, added by mistake.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
This crashes inside GHashTable as it's looking for a NULL key.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=30042>
|
|
I'm truly ashamed that I got this wrong.
|
|
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
We need to allow the LL connector to dispose properly by dropping its
last ref held by the GSimpleAsyncResult before actually unreffing
itself.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Replace g_simple_async_result_take_error() with
g_simple_async_result_set_error() and g_simple_async_result_set_from_error()
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
wocky_session_new() was renamed to this in my meta-porter branch.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Conflicts:
docs/reference/wocky-docs.sgml
wocky/wocky-debug.h
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|
to close
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
PorterData* can have a NULL porter, which means the meta-porter
doesn't need to close it. However, previously, the close_all_porters
function didn't care about that and treated as that a remaining
porter anyway.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
At least g_simple_async_result_take_error needs this.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
We get a new ref to the new stanza from the c2s porter's
send_iq_finish. We now set that as the simple async result's gpointer
with free func of g_object_unref. The finish func returns a new ref to
the stanza so that when the simple async result is completed it unrefs
the stanza leaving the only ref in the callback (unless it has already
been unreffed there).
Bingo.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
|
|
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=35430>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
|
|
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=34308>
|
|
|
|
|
|
|