summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'telepathy-idle-0.2'Alexander Akulich2020-11-013-6/+83
|\
| * build: Add meson build systemJan Tojnar2020-11-011-0/+52
| |
| * Handle modechars properlyDaniel Landau2020-11-011-2/+6
| | | | | | | | | | Never strip out modechars unless we are explicitly trying to parse a nickname with modechars, i.e., atom 'C'
| * Channel names can start with a '!'Daniel Landau2020-11-011-1/+3
| | | | | | | | | | | | | | | | According to RFC2811 (https://tools.ietf.org/html/rfc2811#section-3.2) channel names can start with a bang. Without this check the initial bang gets stripped out and Telepathy tries to ensure as a channel without the prefix. That obviously fails, leading to the messages from that channel arriving as "private" messages.
| * fix compilation on GCC 9.x, add #pragmaDavid Heidelberg2020-11-011-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: In function 'strncpy', inlined from 'idle_server_connection_send_async' at idle-server-connection.c:593:2: /usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 512 equals destination size [-Werror=stringop-truncation] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors Signed-off-by: David Heidelberg <david@ixit.cz>
| * Properly handle long IRC messagesMichael Catanzaro2020-11-011-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | IRC messages are delimited by CRLF. When the string passed to idle_parser_receive() doesn't end in \r or \n, the remaining parts get stashed away to be used to form a message on the next call to idle_parser_receive(). But telepathy-idle improperly assumes that the next call to idle_parser_receive() will definitely contain \r or \n, i.e. it assumes that an IRC message cannot be split between three calls to idle_parser_receive(). That assumption is wrong. Fixes polari#147
| * idle-connection: make sure to always reset force_disconnect_idGuillaume Desmottes2019-10-121-0/+1
| | | | | | | | | | | | Recent GLib raises a critical when trying to remove an invalid source. (cherry picked from commit 12211654baa75db13a05b5c2b3293d1378fcf7a2)
| * Returning FALSE from the timer function causes the timeout to be destroyedDiane Trout2017-11-061-0/+1
| | | | | | | | | | | | | | | | I asked one of the polari devs and was told that yes it is ok to set the timer id to zero in the timer function. With this patch make check works without changing any of the expected test results and without any coredumps
| * ctcp: Don't bling the non-blingFlorian Müllner2016-02-251-2/+7
| | | | | | | | | | | | | | | | | | | | When stripping color codes, we currently remove any sequence of digits following ^C. As color codes use at most two digits, this means that we also remove any numbers at the start of the colored text - make sure we stop doing that and only remove digits that are actually part of a color code. https://bugs.freedesktop.org/show_bug.cgi?id=94189
* | ctcp: Don't bling the non-blingFlorian Müllner2016-02-251-2/+7
| | | | | | | | | | | | | | | | | | | | When stripping color codes, we currently remove any sequence of digits following ^C. As color codes use at most two digits, this means that we also remove any numbers at the start of the colored text - make sure we stop doing that and only remove digits that are actually part of a color code. https://bugs.freedesktop.org/show_bug.cgi?id=94189
* | idle-connection: make sure to always reset force_disconnect_idGuillaume Desmottes2014-02-141-0/+2
| | | | | | | | Recent GLib raises a critical when trying to remove an invalid source.
* | Use telepathy-glib 0.23 for Renaming interfaceSimon McVittie2014-01-071-8/+12
| | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=25147 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | IRC_Command: prevent user of sending commands for which we have proper APIGuillaume Desmottes2013-10-151-0/+53
| |
* | Rename IRC_Command interface to IRCCommand1Simon McVittie2013-10-151-4/+4
| | | | | | | | | | Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70434
* | add IrcCommand extensionGuillaume Desmottes2013-10-131-0/+24
| | | | | | | | Used to send arbitrary IRC commands to the server.
* | Remove GLib < 2.32 code pathsSimon McVittie2013-10-112-8/+0
| | | | | | | | | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54114 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* | s/NUM_TP_*/TP_NUM_*Guillaume Desmottes2013-09-233-3/+3
| |
* | TpBaseConnectionClass->create_channel_factories is going to be removedGuillaume Desmottes2013-09-231-1/+0
| | | | | | | | Will be removed in Telepathy 1.0
* | add missing telepathy-glib-dbus.h includesGuillaume Desmottes2013-09-239-0/+10
|/ | | | Will bee needed for Telepathy 1.0
* use TP_SEAL_ENABLEGuillaume Desmottes2013-09-165-27/+50
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=69311
* Use TP_DISABLE_SINGLE_INCLUDEGuillaume Desmottes2013-09-1624-67/+18
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=69311
* connection: use a hash table to store aliasesGuillaume Desmottes2013-09-121-17/+16
| | | | | | tp_handle_{set,get}_qdata has been deprecated. https://bugs.freedesktop.org/show_bug.cgi?id=64122
* ServerConnection: dispose internal objectsLionel Landwerlin2013-09-051-4/+4
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64923 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* ServerConnection: kill async read when disconnectingLionel Landwerlin2013-09-051-1/+9
| | | | | | | | | | | | | | | | | GSocket creates GSources to provide GInputStream and GOutputStream objects. Interestingly, it doesn't set the GIOCondition on the GSource to handle G_IO_NVAL (ie. your file descriptor is not valid anymore). It means that if your trying to read asynchronously from the socket while someone else closes the socket, you end with an GInputStream that can never complete its asynchronous read operation because the file descriptor isn't valid anymore but that isn't a condition to dispatch the GSource and end the asynchronous read with an error. Alternatively, this wakes up the gmainloop all the time => 100% cpu consumption. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64923 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Add handle-name to RoomList propertiesXavier Claessens2013-06-111-0/+1
| | | | Fixes fdo#65614
* Don't crash when a channel with multiple requests failsSjoerd Simons2013-05-121-1/+1
| | | | | | The iteration over the channel requests tokens accidentally used the wrong variable, causing the same request token to be passed into tp-glib all the time causing crashes..
* Use slightly more concise g_param_spec_object() argumentsSimon McVittie2013-05-011-4/+2
| | | | | I haven't fixed all instances, just the one touched by the interactive TLS code.
* Split property/value pairs one-per-line in interactive TLS checking codeSimon McVittie2013-05-012-3/+10
| | | | | While we're touching these lines anyway, they might as well be in a slightly more Telepathic style.
* ServerConnection: use GSimpleAsyncResult for connect threadWill Thompson2013-05-011-10/+11
| | | | | GTask doesn't make the code any smaller, and this way even new Debian stable can have it.
* ServerConnection: ensure socket connection is not leakedWill Thompson2013-04-301-1/+1
| | | | | | | If we cancel the connect_async cancellable between the call to g_task_return_pointer (which schedules an idle to call the callback) and Connection calling connect_finish(), the socket_connection would previously have leaked.
* ServerConnection: don't leak GTask used to connectWill Thompson2013-04-301-1/+3
|
* Connection: fix default for 'charset' property.Will Thompson2013-04-301-1/+1
|
* Connection: cancel connect_async when Disconnect() is calledWill Thompson2013-04-302-4/+11
|
* Connection: fix a crash on Disconnect() during TLS verificationWill Thompson2013-04-301-4/+5
| | | | | | | | | | | | | | | | Previously, priv->conn was NULL until the TCP session was established, so _iface_shut_down() would take the "no connection yet; call _finish_shutdown_idle_func in an idle" path. But the TLS channel would get closed (because the TLSManager listens for state changes to Disconnected and closes all channels), causing the ServerConnection to call the connect_async() callback and emit ::disconnected, and hence finish shutting down the connection there. Then the idle would crash, because it doesn't take a ref to the connection. We should really cancel the connect_async() call in the new path in _iface_shut_down() to cope with the case where we're still waiting for the TCP connection to be established for some other reason. That, and a test for that, will follow.
* Hide IdleServerConnectionStateWill Thompson2013-04-292-9/+10
|
* Connection: use a boolean for ServerConnection statusWill Thompson2013-04-291-6/+10
|
* ServerConnection: replace ::status-changed with ::disconnectedWill Thompson2013-04-292-30/+14
| | | | | It was already weird that the reason was only used in the disconnected case.
* Start pinging & running message queue after 001 (welcome)Will Thompson2013-04-291-9/+12
| | | | | | | | Previously, keepalives and unloading messages started as soon as the TCP session is established: before even the PASS/NICK/USER messages have been sent! (IdleServerConnection emits ::status-changed(CONNECTED) before connect_async() finishes.) If a message had got into the queue already, this would break the connection process.
* TLSManager: treat unhandled channels as rejected.Will Thompson2013-04-291-0/+6
| | | | This was incorrectly adapted from the Gabble code.
* Don't special-case tls handling in testsSjoerd Simons2013-04-281-10/+0
| | | | | | Don't let the TLS tests accept errors that wouldn't be accepted when idle runs normally, instead implement minimal ServerTLSConnection in the test which need it and add a minimal test for rejecting certificates.
* Add support for interactive TLS certificate checkingSjoerd Simons2013-04-282-2/+93
| | | | | | With the pieces now in place, hook up the TLS channnel manager and pass it to the server connection so it can request interactive certificate checking.
* Connect to the server in the non-main threadSjoerd Simons2013-04-281-3/+21
| | | | | | | | To do interactive certificate verification with GTls one needs to block in the accept-certificate signal handler, which practically means the connection needs to be done in a seperate check. As a first step, instead using _connect_to_host_async in the main thread use a GTask to synchronously connect in a different thread instead.
* Port to TLS handling code to work in IdleSjoerd Simons2013-04-287-221/+105
| | | | | | Instead of server-tls-manager being a Wocky TLS manager add async API to start the certificate verification on request and use a GTlsCertificate to get the needed certificate information instead of WockyTLSsession.
* Copy TLS channel code from gabbleSjoerd Simons2013-04-286-0/+1448
| | | | | Take the TLS channel handling code from Gabble and s/gabble/idle in the various files, but no other changes
* IdleServerConnection: check certificates properly, except in the testsSimon McVittie2013-04-241-5/+10
| | | | | Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63810 Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Include config.h in each source fileSimon McVittie2013-04-2410-0/+11
| | | | | | Among other effects, this makes GLIB_VERSION_MIN_REQUIRED effective. Reviewed-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
* Drop unused build dependency on OpenSSLWill Thompson2013-04-221-2/+0
| | | | | | | Since some time ago, Idle has used GIO's TLS stuff; we should have dropped this back then. Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
* Parse PONG more lenientlyWill Thompson2012-11-161-1/+1
|
* muc-channel: remove content-free/wrong docstringsWill Thompson2012-11-141-24/+1
|
* muc-channel: implement Destroy(), make Close() respawnWill Thompson2012-11-142-3/+50
| | | | | | | | | | | This fixes the issue where empathy-chat crashing means you get kicked out of all your channels. It's technically backwards-incompatible but empathy-chat has been using RemoveMembers() to leave rooms for ages, and it's a pretty destructive and annoying bug, so let's just get on with it. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24614