Age | Commit message (Collapse) | Author | Files | Lines |
|
This is actually less efficient than what was there before, because it
copies the tree twice. I think this is symptomatic of Gabble's edit
representation being wrong.
|
|
There's actually another implementation of copying a node tree in this
file which is a little more involved. I wasn't going to touch it when I
thought there was just one, but finding TWO…
|
|
|
|
|
|
_gabble_connection_send_with_reply() does not call its callback if it
doesn't get a reply. This means all these cases were leaking the
GSimpleAsyncResult if the connection died while the IQ was in flight.
|
|
|
|
|
|
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57521
|
|
This looks pretty ridiculous, so needs some explanation. If you have no
network connection (suppose you're on a train, testing tubes using
Prosody on localhost), then get_local_interfaces_ips() returns NULL
(the loopback interface is explicitly skipped). So previously, after the
recipient has accepted the tube, gabble_bytestream_socks5_initiate()
would fail for the initiator. bytestream-multiple doesn't fall back if
it fails immediately; so the whole bytestream-establishment fails. The
initiator's tube channel would close, but no stanza gets sent to the
peer to tell it to stop waiting for the bytestream offer, so it's just
hanging there waiting forever.
Just making bytestream-multiple fall back immediately doesn't help,
because the peer is still expecting a SOCKS5 offer, rather than a
in-band bytestream offer, so rejects it. Unlike Jingle, SI doesn't have
a way to cancel an offer once it's been accepted but before the
transport has been negotiated. So… if we send the peer an empty offer,
they'll send back an error, and both sides know to fall back (if they
understand bytestream-multiple) or give up (if not).
There is no test case for this, because it's difficult to make
get_local_interfaces_ips() or gibber_listener_listen_tcp() fail from the
test suite. I tested it with a pair of simple D-Bus tube clients and no
network connection, and/or hacking get_local_interfaces_ips() to always
return NULL.
Although this trick is schema-compliant
<http://xmpp.org/extensions/xep-0065.html#schema>, it's not compliant
with the wording of XEP-0065. Quoth §5.3.1
<http://xmpp.org/extensions/xep-0065.html#direct-proto-initiate>:
> The <query/> element MUST contain one or more <streamhost/> elements,
> each of which MUST possess the 'host', 'jid', and 'port' attributes.
But it also says:
> If the request is malformed …, the Target MUST return an error of
> <bad-request/>.
So this should work with any (robust) implementation.
The option would be to (try to) start listening before sending the
SI offer—if it fails, don't offer to use SOCKS5 bytestreams.
https://bugs.freedesktop.org/show_bug.cgi?id=48050
|
|
None of them use it, so…
|
|
It's always TRUE, so it's unneeded.
|
|
This clarifies that this function can never fail, which can be the next
thing we clean up…
|
|
Step one in cleaning up gabble_bytestream_factory_negotiate_stream() is
to simplify its context structure.
|
|
This more clearly separates the code which sets up the listener (which
can fail) and the subsequent code to transmit IP addresses to the peer
(which cannot fail), I think.
|
|
This makes it clearer that gabble_bytestream_socks5_initiate() can only
fail synchronously for local reasons.
_gabble_connection_send_with_reply() only returns FALSE if we have no
porter; but from the moment we go to state CONNECTED (before which you
can't request channels) to the moment the connection is disconnected, we
do have a porter.
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=25961
https://bugs.freedesktop.org/show_bug.cgi?id=25385
|
|
|
|
Fixes: fd.o#57267
|
|
This is harmless, but looks messy. It's leftover clutter from the
loudmouth era.
|
|
There's still one case in the Jingle code which seems justifiable.
|
|
|
|
|
|
Derived from a patch by Mike Ruprecht.
https://bugs.freedesktop.org/show_bug.cgi?id=25961
|
|
Previously, Google's reply to our original google:jingleinfo query would
be used correctly, but the act of passing it to
gabble_jingle_info_take_stun_server would set get_stun_from_jingle to
FALSE, causing any later calls to got_jingle_info_stanza() to ignore the
updated STUN server information.
We address this by distinguishing between user-set and server-provided
STUN servers, as opposed to just between fallback or not.
|
|
In practice it still returns at most one server, but just you wait…
|
|
|
|
I broke this in c1be75d9 but it wasn't tested. Luckily
WOCKY_JINGLE_ERROR_UNKNOWN_SESSION (2) is a valid WockyXmppError too so
we didn't crash before, we just sent <gone> instead.
https://bugs.freedesktop.org/show_bug.cgi?id=33789 is relevant.
|
|
|
|
|
|
As per g_base64 documentation the minimum size is :
avatar->len / 3 + 1) *4 + 4)
and if line breaks are enabled:
+ ((avatar->len / 3 + 1) * 4 + 4) / 72 + 1
https://bugs.freedesktop.org/show_bug.cgi?id=57080
|
|
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52362 (I hope)
|
|
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52362 (I hope)
|
|
|
|
Reducing the number of places we directly access priv->text_channels
will make it easier to do the right thing when it's NULL.
|
|
tp_base_connection_get_status() returns DISCONNECTED in two states: when
the connection is yet to connect (internally, it is in state NEW) and
when the connection is defunct. tp_base_connection_is_destroyed() allows
us to distinguish the two in this case. This was introduced in commit
fde8437 and was caught by gateways.py.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=55908
|
|
(Patch modified to add aggravating signed <-> unsigned casts, and to
adjust some tests to cope with GLib appending a trailing newline where
Gabble's home-grown line-breaking did not.)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=54760
Signed-off-by: Will Thompson <will.thompson@collabora.co.uk>
|
|
This ensures that a running Gabble process will always create Call1
channels once it has seen such a client in its lifetime.
Remove gabble_caps_channel_manager_reset_capabilities and its
implementation in GabbleMediaFactory, since it is not used anymore.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56181
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
|
|
This ensures that a running Gabble process will always create Call1
channels once it has seen such a client in its lifetime.
Remove gabble_caps_channel_manager_reset_capabilities and its
implementation in GabbleMediaFactory, since it is not used anymore.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56181
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
|
|
|
|
|
|
|
|
Conflicts:
NEWS
configure.ac
src/conn-addressing.c
src/jingle-info.c
src/media-channel-hold.c
src/message-util.c
src/muc-tube-dbus.c
src/muc-tube-stream.c
src/olpc-activity.c
src/presence-cache.c
src/protocol.c
src/room-config.c
|
|
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54634
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
|
|
This is partly a point of principle - given any caps bundle that we have
ever advertised support for, we should be prepared to define when asked -
but mainly a workaround for the iChat bug mentioned in commit af55ea3d.
If we return an error, it will keep disco'ing us repeatedly in a loop.
This leaves us with the problem of finding out what the bundle contains.
In Google's usage it is only its name that is important (ignoring that
XEP-0115 explicitly makes bundle names opaque), but replying to disco
requests for it requires us to be able to turn it into a set of 0 or
more capability URIs. Because of the Google server bug mentioned in
commit cd0da0a8, we can't just ask a Google client, because they're
all on Google servers, so they can't usefully be disco'd.
We assume here that it behaves like the voice-v1 and video-v1 bundles
in containing exactly one URI, and that that URI corresponds to the
bundle name in the same way.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54634
|
|
Conflicts:
src/tubes-channel.c
src/tubes-channel.h
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>
|