louiz’
b1564e4ddc
Fix a bunch of int to unsigned int conversion warnings
2018-08-23 20:31:31 +02:00
louiz’
9fa7591058
Split the main() into smaller functions
...
That’s not really enough, but better
2018-08-07 20:49:34 +02:00
louiz’
ed36c26598
Also handle SIGHUP to reload the configuration
...
Because that’s what is typically done on other deamons, and we don’t want to
suprise users.
2018-05-06 12:13:09 +02:00
Ailin Nemui
5ea51fea1b
follow coding style
2018-03-15 10:18:15 +01:00
Ailin Nemui
cf618d5572
optional identd
2018-03-13 11:25: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
louiz’
0168b96b79
Add postgresql support
2017-12-02 20:08:47 +01:00
louiz’
50cadf3dac
Implement our own database ORM, and update the whole code to use it
...
Entirely replace LiteSQL
fix #3271
2017-06-14 00:19:15 +02:00
louiz’
3238404753
Avoid adding more that one “XMPP reconnection” timed event at the same time
...
Fix a semblance of infinite and busy loop, that could occur if biboumi’s
poller is woken up multiple times while the XMPP server is not reachable.
2017-04-17 14:47:21 +02:00
louiz’
8a912ea3a3
Apply a few clang-tidy cppcoreguidelines-* fixes
2017-04-07 11:10:51 +02:00
louiz’
5402a256d1
Apply all the clang-tidy modernize-* fixes
2017-04-07 18:45:24 +02:00
louiz’
e2da6fcddd
Properly destroy the dns_handler socket when first start fails
...
To correctly exit the process
2017-02-01 20:52:50 +01:00
louiz’
5b56007828
Use udns instead of c-ares
...
fix #3226
2017-01-06 22:58:18 +01:00
louiz’
ad22be4171
Do not fail to build if litesql is not there
2016-11-25 09:22:24 +01:00
louiz’
d872c2b492
Support the ident protocol
...
fix #3211
2016-11-15 00:23:19 +01:00
louiz’
e1934a0b5f
Disable e2e tests on openbsd
2016-11-01 17:40:09 +01:00
louiz’
ae02e58b9d
Some cleanups
2016-10-31 14:03:37 +01:00
louiz’
58000c36a6
Rephrase an error message
2016-08-01 09:48:58 +02:00
louiz’
f89361c370
Provide a --help option
...
fix #3183
2016-07-31 18:16:29 +02:00
louiz’
085a48ea48
Do not use the logger before the configuration has been loaded first
2016-07-28 11:56:33 +02:00
louiz’
db503b23e8
Use log_error instead of cerr
2016-07-24 20:03:34 +02:00
louiz’
4c1b9abe7e
Properly catch and handle database errors
...
Do not use a singleton for the database.
fix #3203
2016-07-12 00:31:57 +02:00
louiz’
e8671042f7
Improve the signal handling by disabling them while an handler is running
2016-06-14 12:15:31 +02:00
louiz’
46ff73662c
Clean the Config module, use static things instead of a stupid singleton
2016-06-14 03:02:36 +02:00
Florent Le Coz
9167cdf126
Notify systemd when the process is stopping
2015-12-23 11:05:55 +01:00
Florent Le Coz
33fa1dcd5a
Also a xdg_data_path
2015-09-18 21:50:54 +02:00
Florent Le Coz
ea0b2f2bb8
Create a xdg_path function
2015-09-18 09:20:15 +02:00
Florent Le Coz
810ea19fe3
Exit with 1 if the connection to the XMPP server fails
...
This helps the system understand if the process started correctly or not,
when systemd is not used
fix #3078
2015-06-10 16:47:13 +02:00
Florent Le Coz
897b281e67
Avoid some potential race conditions by blocking the signals we manage
...
They are atomically unblocked in the ppoll/epoll_pwait calls, avoiding any
race condition on the check of the “stop” or “reload” booleans.
2015-05-27 23:44:23 +02:00
Emmanuel Gil Peyrot
e24ed4f70c
Make sure XDG_CONFIG_HOME is absolute, as per XDG basedir spec.
2015-05-04 17:08:08 +02:00
Emmanuel Gil Peyrot
ac30733800
Search for the config file in $XDG_CONFIG_DIR/biboumi.
...
This environment variable points to the location the user expects to
find every program’s config file, or if it isn’t set, ~/.config/biboumi
(with a fallback to . if $HOME isn’t set).
fix #2553
2015-05-04 16:50:35 +02:00
Florent Le Coz
6a28bde1dd
Reset the signal handlers when SIGINT or SIGTERM is received
...
To avoid doing a double exit when receiving bot SIGINT and SIGTERM
2015-04-20 23:58:05 +02:00
Florent Le Coz
d5324ac778
Re-order a few things in main.cpp
2015-04-13 01:53:53 +02:00
Florent Le Coz
33cdc6010e
Set the default value to biboumi.cfg
2015-03-04 05:56:08 +01:00
Florent Le Coz
d600a2843f
Remove all the libs that are now in louloulibs
2015-02-27 12:26:48 +01:00
Florent Le Coz
7115aa3b7f
Add a reload add-hoc command
2015-02-24 16:28:30 +01:00
Florent Le Coz
b86547dc1e
Implement async DNS resolution using c-ares
...
fix #2533
2015-02-23 13:56:08 +01:00
Florent Le Coz
a50ca30e76
Use a timer to try reconnecting to the XMPP server only each 2 seconds
...
When the connection is lost, immediately try to reconnect, then try to
reconnect every 2 seconds. This is much better than the previous “Try to
re-connect as fast as possible”.
2015-02-21 06:45:11 +01:00
Florent Le Coz
03a8accc46
Fix “connections” typo
2015-02-21 05:30:36 +01:00
Florent Le Coz
ae469c21ff
Fix “cleanely” typo
2015-02-21 05:28:21 +01:00
Florent Le Coz
04d999168a
Add a level of inheritance above SocketHandler
...
SocketHandler has been renamed to TCPSocketHandler
SocketHandler is now a simple interface with a few methods, used only by
Poller.
This way we can inherite from the new SocketHandler class, to handle other
types of sockets, and still make them manageable by the poller without any
change in the Poller class.
2014-07-02 03:01:09 +02:00
Florent Le Coz
5c9d2c23ba
TimedEventsManager is now a singleton
2014-05-30 15:51:43 +02:00
Florent Le Coz
d9d30dd782
Use a timed event to force the exit 2 seconds after an exit signal is received
...
fix #2469
2014-05-28 17:31:28 +02:00
Florent Le Coz
5507adbe94
SocketHandlers own the poller and add themself into it only when the socket is created
...
We want to call socket() with the parameters provided by getaddrinfo, so we
can’t addd the fd into the poller immediately. We need to wait the
connection attempt, and then the SocketHandler can call add_socket_handler
itself, if the connection succeeds, or is in progress.
2014-05-27 01:01:44 +02:00
Florent Le Coz
cdc3183d9e
Introduce two new bool, to know if the xmpp component should try to reconnect
...
If we never succeeded our connection+auth process, means we should probably
not attempt any-more, and just give up. If we ever did, this means a
reconnect is a good idea
2014-03-24 20:39:59 +01:00
Florent Le Coz
ffc820e234
Reconnected immediately to the XMPP whenever it closes the connection
2014-03-24 20:31:02 +01:00
Florent Le Coz
5f82c93754
Use store() instead of operator=() for std::atomic<bool> objects
2014-02-24 21:02:21 +01:00
Florent Le Coz
99aba5667d
Connection to servers does not block the process anymore
2014-02-22 21:42:24 +01:00
Florent Le Coz
6804f31546
Set sigaction.sa_flags to 0
2014-02-19 02:38:58 +01:00
Florent Le Coz
8fd2746696
Reload the conf on SIGUSR1/2
2014-02-19 02:24:00 +01:00