Commit Graph
595 Commits
Author SHA1 Message Date
louiz’ 520711023f Use our botan gh#1276 workaround only for botan < 2.4
fix #3320
2018-01-17 20:59:38 +01:00
louiz’ 7e64a2e361 Add a DEBUG_SQL_QUERIES to log info about the executed SQL queries
fix #3324
2018-01-14 21:46:49 +01:00
louiz’ 3cd6490236 Remove all the ugly database debug 2018-01-14 21:44:22 +01:00
louiz’ b4b9828de5 Follow log_level even when using journald output
fix #3328
2018-01-12 20:08:15 +01:00
louiz’ 7c8a7176d1 Only use sd_journal_* if we really are outputing to journald
We check that the device and inode numbers are actually the same as the
JOURNAL_STREAM value, instead of just checking that the value exists.

This fixes the logger unit tests
2018-01-12 04:03:36 +01:00
Ailin Nemui 435a63a070 Change max line length to more conservative constants 2018-01-10 13:36:53 +01:00
louiz’ 8409e50c1a Fix a subtle iid parsing error in the adhoc code 2017-12-27 19:36:36 +01:00
louiz’ 2d9f516d1d Don’t answer to some requests towards MUC participants
These requests are only meant to be received by the room itself. The
participant must answer with not-implemented instead.

fix #3323
2017-12-27 19:23:28 +01:00
louiz’ 131ef9946f Include the <fin><set><first/><last/></></> nodes in the MAM iq result
fix #3322
2017-12-26 20:21:18 +01:00
louiz’ 37340e593f Add a <x muc#user> node on outgoing private MUC messages
See https://xmpp.org/extensions/xep-0045.html#privatemessage

fix #3321
2017-12-26 19:52:41 +01:00
louiz’ 286aa58c7b Remove a warning (unused argument) 2017-12-17 15:21:40 +01:00
louiz’ a557718bf2 db_name also accepts postgres:// scheme for PostgreSQL connections 2017-12-16 15:34:54 +01:00
louiz’ c3313d0d41 Always free the PGresult pointer returned by PQexec
Fix a somewhat big memory leak
2017-12-05 01:05:45 +01:00
louiz’ 24dc05dd97 Run some of the ci tests against a postgresql docker container 2017-12-03 16:46:14 +01:00
louiz’ 6dc49f3284 Fix a few warnings 2017-12-02 20:08:50 +01:00
louiz’ 414bbca0bc Handle postgresql and sqlite3 libs properly
Do not fail to compile when one of them is missing but the other one is not.

Raise an error when trying to open a database with the missing library.

see #3237
2017-12-02 20:08:50 +01:00
Jonas Wielicki e1c7a6518a Actually free the database on Database::close()
.release() returns the pointer and releases ownership *without*
destruction.
2017-12-02 20:08:50 +01:00
Jonas Wielicki 58f78f31e6 Make destructor of DatabaseEngine virtual 2017-12-02 20:08:50 +01:00
Jonas Wielicki 14dcc57a19 Make destructor of Statement virtual
I got an ASAN error otherwise (type mismatch)
2017-12-02 20:08:50 +01:00
Jonas Wielicki 4f7ad3f985 Support for full postgresql URIs
(cf. https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING)
2017-12-02 20:08:50 +01:00
louiz’ 0168b96b79 Add postgresql support 2017-12-02 20:08:47 +01:00
louiz’ 5b27cee972 Send \r\n at the end of the identd responses
fix #3315
2017-11-27 00:48:40 +01:00
louiz’ 90dd8e8b42 Fix #3304 2017-11-07 23:18:30 +01:00
louiz’ cb6b50dc01 Change how we count the number of connected resources to a server 2017-11-07 23:05:05 +01:00
louiz’ f3b1e39cdd Add a workaround for https://github.com/randombit/botan/issues/1276
ref #3278
2017-10-26 19:13:23 +02:00
louiz’ c5a0268536 Explicitely include all needed botan headers
Most importantely, include parsing.h, since read_cfg is not implicitely
included anymore in botan 2.3, and that does not compile.

Also do not included botan.h anymore, since it’s deprecated in botan 2.3

fix #3296
2017-10-04 21:51:58 +02:00
louiz’ 1c3d4f6f5f Remove a redundant Body definition 2017-10-04 21:51:58 +02:00
Romain DEP. 103e508f3b compat: revert to using sqlite's close() function for compat with older distros.
close_v2(), in use before this commit, was introduced as part of sqlite 3.7.14
 (2012-09-03), and is as such incompatible with debian wheezy (3.7.13) and
 centos6 (3.6.20).
 FTR, Wheezy will be supported until May 2018, and centos6, until November 2020.
2017-09-21 08:38:04 +02:00
louiz’ e217a19784 Fix the build without systemd, by adding a few define 2017-09-09 17:21:51 +02:00
louiz’ bfcf294517 Add the persistent_by_default configuration option
fix #3293
2017-09-09 17:09:17 +02:00
louiz’ 8d99374f1f When biboumi is logging into journald, use sd_journal_send
This makes sure that multi-lines messages are properly parsed as a single
message by journald.

fix #3268
2017-09-06 21:30:44 +02:00
louiz’ dabc48b79b Mark messages from the IRC server as private and no-copy
fix #3284
2017-08-30 16:14:35 +02:00
louiz’ 98227db6ad Remove a forgotten and useless comment
[skip-ci]
2017-08-27 22:41:18 +02:00
louiz’ fcaffb9e77 Add support for the "history" node on MUC join
Supports the "seconds", "maxstanzas", "since" and "maxchars" (but only =0)
attributes.

fix #3270
2017-08-27 22:37:46 +02:00
louiz’ 25243f53c2 In fixed mode, server messages come from biboumi’s hostname directly
Instead of irc.example.com@biboumi, because that’s actually user named
“irc.example.com”, in that case.
And that fixes the raw messages in fixed mode.

fix #3286
2017-08-27 14:32:29 +02:00
louiz’ 2c717d347d Add an index for the muc_log_line table
This immensely speeds up the archive select queries.

fix #3292
2017-08-26 17:42:59 +02:00
louiz’ 655151d88a Cache the encoding_in database value, to avoid doing a query for each message 2017-08-26 13:51:15 +02:00
louiz’ 1997fb5c6a Small refactor in on_quit() 2017-08-24 23:56:00 +02:00
louiz’ c23c99dac1 Don’t forget to remove the user from the channel, when kicked
fix #3291
2017-08-24 23:55:32 +02:00
louiz’ 2a62b8b082 Fix a sqlite3 leak when the database fails to open 2017-08-19 13:02:34 +02:00
louiz’ 9648fd286c Display the correct error message when we fail to open the sqlite3 db
fix #3290
2017-08-19 13:02:13 +02:00
louiz’ cad70ba453 Re-add a removed (by mistake) pointer null check 2017-08-02 22:00:28 +02:00
louiz’ 308869aa73 Do not ignore empty values when receiving a data form
Otherwise, these fields cannot be emptied by the user

fix #3281
2017-07-21 17:27:03 +02:00
louiz’ f125de4833 Add the possibility to invite any external JID to a room
fix #3285
2017-07-20 23:09:37 +02:00
louiz’ 407f95a108 Do not reply with an error when receiving a presence for a user JID
fix #3224
2017-07-20 21:34:27 +02:00
louiz’ 24f2511d7b In fixed mode, fix the iid type of the component JID 2017-07-20 21:28:18 +02:00
louiz’ ffb402f0ad Drop support for botan < 2.0
fix #3274
2017-07-20 21:22:58 +02:00
louiz’ f7cbe8531d Correctly remove the last resource from the channel, in persistent mode
fix #3277
2017-07-16 20:22:23 +02:00
louiz’ 729ea131c9 Send an unsubscribed presence on a probe if we don’t have a roster entry 2017-07-16 00:16:43 +02:00
louiz’ 50a2bd736e Answer to presences of type='probe' 2017-07-16 00:16:43 +02:00