summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-04-07meta-porter: use a union to avoid strict aliasing problemsHEADmasterJonny Lamb1-13/+18
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>
2011-04-07Save const returns in const variablesSjoerd Simons1-2/+2
2011-04-07meta-porter: add a FIXME for the v6-in-v4 functionsJonny Lamb1-0/+2
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-07c2s-porter: don't blindly disconnect the IQ handler cancellableJonny Lamb1-1/+4
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-06meta-porter: hack around v6-in-v4 addresses being exposedJonny Lamb1-2/+52
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>
2011-04-06meta-porter: disconnect porter signal handlers before trying to close itJonny Lamb1-0/+6
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-06meta-porter: clean up porter closing callbacksJonny Lamb1-23/+22
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>
2011-04-06contact-factory: weak unref an existing LL contact if we're replacing itJonny Lamb1-7/+14
Also, stop making more dups of JIDs than necessary, again. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-05meta-porter: don't start multiple timeouts for freeing the PorterDataJonny Lamb1-0/+5
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>
2011-04-05contact-factory: don't dup a string twice when once will doJonny Lamb1-1/+1
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-05gitignore: ignore more emacs rubbishJonny Lamb1-0/+1
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-01meta-porter: don't assert if we have another connectionJonny Lamb1-3/+14
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>
2011-04-01meta-porter: stamp on a from contact for IQ replies tooJonny Lamb1-1/+4
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-04-01meta-porter: also connect to WockyC2SPorter::remote-errorJonny Lamb1-0/+13
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31Merge branch 'meta-fixes'Jonny Lamb3-14/+46
2011-03-31stanza: add wocky_stanza_copyJonny Lamb3-0/+50
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: unref async result after calling a method on the source objectJonny Lamb1-1/+3
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: store the contact JID on the actual C2S porter objectJonny Lamb1-0/+15
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: use g_clear_errorJonny Lamb1-2/+1
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: close a porter properly before disposing itJonny Lamb1-1/+4
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: keep a ref on self during connecting a connectionJonny Lamb1-2/+5
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: also debug what IP a new connection is fromJonny Lamb1-3/+11
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: unref async result after calling a method on the source objectJonny Lamb1-1/+4
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31meta-porter: get the property name for the socket connection rightJonny Lamb1-1/+1
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31ll-connector: remove unnecessary unrefs of selfJonny Lamb1-3/+0
Whoops, added by mistake. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-31contact-factory: ensure we don't get a NULL when ensuring a LL contactJonny Lamb1-0/+2
This crashes inside GHashTable as it's looking for a NULL key. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-29Merge branch 'whitespace-only-bodies'Will Thompson2-10/+56
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=30042>
2011-03-29Morse and Lewis were Oxfordshire police.Will Thompson1-2/+4
I'm truly ashamed that I got this wrong.
2011-03-29MUC: remove content-free headers and unused returnsWill Thompson1-23/+2
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-25ll-connector: check the cancellable for !NULL before unreffing itJonny Lamb1-2/+5
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-25ll-connector: free the async result before the connector itselfJonny Lamb1-5/+13
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>
2011-03-23Hold off on depending on gio 2.28 just for one function.Stef Walter5-29/+27
Replace g_simple_async_result_take_error() with g_simple_async_result_set_error() and g_simple_async_result_set_from_error()
2011-03-23pubsub-helpers: add make_event_stanza helper functionJonny Lamb2-0/+55
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-22examples: use wocky_session_new_with_connectionJonny Lamb2-2/+2
wocky_session_new() was renamed to this in my meta-porter branch. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-22Merge branch 'meta-porter'Jonny Lamb35-31/+4337
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>
2011-03-22meta-porter: ensure the ClosePorter closure if freed even if there are none ↵Jonny Lamb1-1/+8
to close Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-22meta-porter: fix tallying up calls to the close_async functionJonny Lamb1-9/+8
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>
2011-03-22configure: depend on gio >= 2.28Jonny Lamb2-2/+2
At least g_simple_async_result_take_error needs this. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-21meta-porter: don't leak the stanza if send_iq_finish wasn't calledJonny Lamb1-2/+3
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>
2011-03-21meta-porter: clarify closing all porters codeJonny Lamb1-17/+15
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-21meta-porter: don't create a new GList twice needlesslyJonny Lamb1-2/+0
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-21meta-porter: bail out of start if the socket listener fails to listenJonny Lamb1-0/+1
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-21meta-porter: add the other arguments to stanza_handler_newJonny Lamb1-17/+18
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-21meta-porter: critical on setting the JID twiceJonny Lamb1-5/+2
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2011-03-18SaslAuth: fix a wrong variable name (it's "sasl", not "self")Marco Barisione1-1/+1
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-18SaslAuth: Don't process stanzas received after disconnectionMarco Barisione1-0/+9
Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=35430> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2011-03-17Merge branch 'examples'Will Thompson10-457/+536
Reviewed-by: Jonny Lamb <jonny.lamb@collabora.co.uk> Fixes: <https://bugs.freedesktop.org/show_bug.cgi?id=34308>
2011-03-17examples: correctly publish 'chat' presenceWill Thompson1-1/+3
2011-03-17porter-test: remove stray g_print (G_STRFUNC)sWill Thompson1-4/+0
2011-03-17Connector: simplify building a debug stringWill Thompson1-3/+1