summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-12-06vcard-manager: copy vcards using WockyNodeTree.Will Thompson1-26/+20
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.
2012-12-06vcard-manager: use WockyNodeTree to copy vCard nodesWill Thompson1-55/+19
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…
2012-12-06vcard-manager: add children more neatlyWill Thompson1-6/+4
2012-12-06ft-channel: add metadata forms a bit less stupidlyWill Thompson1-19/+7
2012-12-06conn-presence: stop using _gabble_connection_send_with_reply()Will Thompson1-105/+92
_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.
2012-12-06Merge branch 'telepathy-gabble-0.16'Will Thompson1-7/+4
2012-12-06privacy lists: don't crash on malformed repliesWill Thompson1-3/+3
2012-12-06Don't crash when creating invisible privacy list fails.Will Thompson1-4/+1
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57521
2012-12-06bytestream-socks5: send empty offer if we can't initiate.Will Thompson1-15/+20
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
2012-12-06bytestream_factory_negotiate_stream(): don't pass stream id to callbacksWill Thompson5-5/+2
None of them use it, so…
2012-12-06bytestream_factory_negotiate_stream(): remove return valueWill Thompson5-33/+15
It's always TRUE, so it's unneeded.
2012-12-06bytestream_factory_negotiate_stream(): use send_iq_asyncWill Thompson1-22/+18
This clarifies that this function can never fail, which can be the next thing we clean up…
2012-12-06bytestream-factory: stop NIHing TpWeakRefWill Thompson1-34/+14
Step one in cleaning up gabble_bytestream_factory_negotiate_stream() is to simplify its context structure.
2012-12-06Split gabble_bytestream_socks5_initiate() in twoWill Thompson1-39/+51
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.
2012-12-06bytestream-socks5: stop using _conn_send_with_replyWill Thompson1-39/+44
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.
2012-12-06Merge branch '57615-misc-cleanup'Will Thompson16-112/+79
2012-12-06Merge branch '25961-stun-srv'Will Thompson9-106/+272
https://bugs.freedesktop.org/show_bug.cgi?id=25961 https://bugs.freedesktop.org/show_bug.cgi?id=25385
2012-11-29Export o.f.T.Channel.Type.FileTransfer.FUTURE interfaceDaniele E. Domenichelli1-0/+1
2012-11-29Fix o.f.T.Channel.Interface.FileTransfer.MetadataDaniele E. Domenichelli1-0/+14
Fixes: fd.o#57267
2012-11-27Don't use add_child_with_content with NULL/"" contentWill Thompson11-21/+21
This is harmless, but looks messy. It's leftover clutter from the loudmouth era.
2012-11-27Avoid manually setting WockyNode.ns where sensible.Will Thompson12-74/+48
There's still one case in the Jingle code which seems justifiable.
2012-11-27jingle-session: tidy up sending content-reject in idleWill Thompson1-18/+11
2012-11-26JingleInfo: add a TODO for Google returning >1 STUN serversWill Thompson1-2/+4
2012-11-26jingle-info: discover a STUN server using SRVWill Thompson1-0/+71
Derived from a patch by Mike Ruprecht. https://bugs.freedesktop.org/show_bug.cgi?id=25961
2012-11-26jingle-info: don't discard google:jingleinfo pushes.Will Thompson3-10/+68
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.
2012-11-26jingle-info: make get_stun_server pluralWill Thompson6-84/+103
In practice it still returns at most one server, but just you wait…
2012-11-26JingleInfo: refactor google:jingleinfo feature stuffWill Thompson3-15/+31
2012-11-23jingle: correctly send back unknown-session errorsWill Thompson1-1/+1
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.
2012-11-21Don't put const before GSList, the g_slist* functions aren't const-markedOlivier Crête1-2/+2
2012-11-14Make line-wrapped base64 allocation clearerWill Thompson1-1/+5
2012-11-14Fix allocation of the string passed to g_base64_encode_step.Alban Browaeys1-1/+1
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
2012-11-07muc_factory_broadcast_presence(): don't crash if disconnectedWill Thompson1-0/+3
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52362 (I hope)
2012-11-06muc_factory_broadcast_presence(): don't crash if disconnectedWill Thompson1-0/+3
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52362 (I hope)
2012-11-05muc-factory: clarify cancelling queued requests.Will Thompson1-10/+15
2012-11-05muc-factory: use find_text_channel function.Will Thompson1-10/+6
Reducing the number of places we directly access priv->text_channels will make it easier to do the right thing when it's NULL.
2012-11-05sidecars: fix enqueuing requests made before connectingWill Thompson1-1/+1
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
2012-11-05Use GLib's base64 implementation rather than Gabble's ownHeiher12-253/+38
(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>
2012-10-21connection: Don't reset the capabilities in UpdateCapabilitiesDebarshi Ray3-37/+2
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>
2012-10-21connection: Don't reset the capabilities in UpdateCapabilitiesDebarshi Ray3-37/+2
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>
2012-09-11Remove useless tp_handle_unref()Xavier Claessens1-2/+0
2012-09-11Stop accessing sealed tp-glib structsXavier Claessens32-228/+332
2012-09-11Disable tp-glib single includeXavier Claessens2-4/+1
2012-09-11Merge branch 'telepathy-gabble-0.16'Simon McVittie23-4/+48
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
2012-09-11Now that camera-v1 has a caps URI, don't treat it as part of video-v1Simon McVittie2-3/+7
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>
2012-09-11Add Google camera-v1 as a first-class caps bundleSimon McVittie4-0/+20
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
2012-08-28Merge branch 'only-one-tube'Jonny Lamb16-3149/+1377
Conflicts: src/tubes-channel.c src/tubes-channel.h Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2012-07-24muc-factory: clarify code deciding whether to announce text channelsJonny Lamb1-12/+11
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2012-07-20muc-channel: remove ::appeared signal, replace with is_respawning checkJonny Lamb2-22/+8
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2012-07-20private-tubes-factory: add further assertions in parsing a tube inviteJonny Lamb1-0/+3
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
2012-07-20private-tubes-factory: ensure (not lookup) handles from tube invitesJonny Lamb1-4/+5
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>