Florent Le Coz
0620c8e589
Avoid leaking socket filedescriptors
...
When trying the various results of getaddrinfo, we forgot to close the
socket when one fails, before trying the next one.
Also use the destructor to make sure we do not have some other unrelated
leak.
2015-11-07 23:41:06 +01:00
Florent Le Coz
5ce9d3f142
Make the CA file configurable
2015-11-05 02:17:19 +01:00
Florent Le Coz
e8386bd14e
Provide an adhoc option to let user pass the cert verif for some IRC servers
2015-11-05 02:17:19 +01:00
Florent Le Coz
06db9b366a
Fix the build without botan, caused by credentials_manager
2015-11-02 17:31:35 +01:00
Florent Le Coz
4a51850173
Verify TLS certificate with the given hostname, instead of a hardcoded one
2015-11-02 17:15:32 +01:00
Florent Le Coz
f928f76272
Verify the remote TLS certificates using the system-wide trusted CAs
2015-11-02 03:26:13 +01:00
Florent Le Coz
ccd185d3f5
Remove a useless assignment
2015-10-31 06:18:29 +01:00
Florent Le Coz
4e32fe213c
Refactor XmppParser::end_element to make it clearer
...
Both for me, and apparently for clang static analyzer, who reported a (imo)
false positive.
2015-10-28 02:32:19 +01:00
Florent Le Coz
450de4c336
Style, add a few “this->”
2015-10-26 20:28:36 +01:00
Florent Le Coz
142516a69b
Fix some trivial issues reported by cppcheck
2015-10-26 20:09:39 +01:00
Florent Le Coz
0fcba76c79
Fix a build issue when compiling without cares
2015-10-26 20:01:57 +01:00
Florent Le Coz
c8606e1858
Remove a unused_parameter warning
2015-10-26 02:45:20 +01:00
Florent Le Coz
f57a43f337
Remove some more debug thing
2015-10-26 02:43:33 +01:00
Florent Le Coz
ec53fc9315
Remove some debug thing that should not have been committed
2015-10-26 02:36:33 +01:00
Florent Le Coz
aa340e1c5e
Separate the DNS resolution logic from the TCP communication logic
...
fix #3137
2015-10-15 04:32:02 +02:00
Florent Le Coz
2928598e77
Catch TLS exceptions, close the connection and inform the user of the error
2015-09-22 03:59:14 +02:00
Florent Le Coz
1691cf8f64
Introduce the configure ad-hoc command on irc servers
...
Provides two options for now, and they have no effect yet
2015-09-18 22:09:26 +02:00
Florent Le Coz
1031989fe2
XmlNode::add_child can also take a copy of a node
2015-09-18 22:09:26 +02:00
Florent Le Coz
45e8fe56a6
Add an AdhocCommandsHandler to store commands specific to IRC servers
2015-09-18 22:09:26 +02:00
Florent Le Coz
19666d2ffd
Store the target jid in the AdhocSession objects
2015-09-18 22:09:26 +02: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
c3309d0acf
Trivial cleanup
2015-09-01 20:01:44 +02:00
Florent Le Coz
f3b3d937ae
Use unique_ptr to store the XmlNode’s children
...
Also fix some constness things
2015-09-01 14:47:57 +02:00
Florent Le Coz
38564d77c7
Little cleanup of the XmlNode class
...
Use map instead of unordered map (it's not slower, and it's shorter).
Use the default move constructor.
2015-09-01 04:56:06 +02:00
Florent Le Coz
d7e1214cbc
XmlNode::to_string uses an ostringstream instead of a string
...
On my poor benchmark, it was infinitesimally faster.
2015-09-01 04:53:12 +02:00
Florent Le Coz
e8f22efe34
XmlNodes are now always closed
...
Remove the close() method and closed attribute. Remove all the calls to
close(). (Save one bool per XmlNode, yay, and save a few ifs and some
useless function calls. At best it should be unnoticeably faster and lighter
and save a few keystrokes in the future)
2015-09-01 04:42:12 +02:00
Florent Le Coz
45fd41eb38
Display the resolved IP in debug logs
2015-07-09 15:30:54 +02:00
Florent Le Coz
ece4b4969b
If hostname resolution fails, do not try all possible ports
2015-07-09 15:30:24 +02:00
Florent Le Coz
ac6a74595c
Send the cares error message before cleaning it
...
fix #3083
2015-07-09 14:35:29 +02:00
Florent Le Coz
4130f1679d
Check for timeouts on the DNS resolution using c-ares
...
ref #3083
2015-07-09 14:35:29 +02:00
Florent Le Coz
a42af9e700
Fix the log_* macros to not have two ; at the end of lines
2015-07-09 13:49:08 +02:00
Florent Le Coz
0af536a2be
Minor comment typo
2015-07-08 18:51:05 +02:00
Florent Le Coz
7f7c429ae4
Do not send the admin-only adhoc commands to non-admin users
...
They were not able to execute them anyway, so this was just a little
usability issue.
2015-06-09 14:52:46 +02:00
Florent Le Coz
e1a7114c8d
louloulibs is directly included, instead of being a submodule
...
Because this is a nightmare to manage
2015-05-28 23:46:24 +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
Florent Le Coz
fbeb5af364
Update to latest louloulibs revision, and add test for hostname validity
...
fix #2694
2015-05-13 20:17:43 +02:00
Florent Le Coz
71fec776c4
Update to latest louloulibs
...
fix #3042
2015-05-07 17:42:37 +02:00
Florent Le Coz
a8225dc54c
Properly check for connecting or connected status before reconnecting
...
Note, in our context, is_connecting() includes the resolving part as well as
the actual connection (if we are using c-ares)
fix #3048
2015-04-21 15:38:22 +02:00
Florent Le Coz
0d706741c6
Update louloulibs submodule to the correct revision
2015-04-20 20:35:32 +02:00
Florent Le Coz
ad0465b320
Decode incoming JIDs local part according to xep 0106
...
This let users send message to nicks such as Q@CServe.quakenet.org
fix #3047
2015-04-20 20:33:02 +02:00
Florent Le Coz
c243fea660
Update to latest louloulibs revision
2015-03-04 05:56:44 +01:00
Florent Le Coz
d88ec5fdf1
Update to latest louloulibs revision
2015-03-02 11:32:18 +01:00
Florent Le Coz
e4c696861d
Update louloulibs to last revision
2015-03-02 11:06:40 +01:00
Florent Le Coz
e6569a1090
Only use include_directory() if the directory path is defined
2015-02-27 12:40:50 +01:00
Florent Le Coz
0ec82c104d
Add louloulibs as a submodule
2015-02-27 12:26:48 +01:00