Commit Graph
145 Commits
Author SHA1 Message Date
louiz’ 42e85d921b Remove some useless virtual method from SocketHandler 2016-11-16 23:07:27 +01:00
louiz’ 9dd0cf8f7a Fix an error on gcc 4.9, because it is so stupid it can’t find operator""s 2016-11-16 20:28:48 +01:00
louiz’ d90f75dc60 Trivial include cleanup 2016-11-16 20:03:01 +01:00
louiz’ ae445f0e59 Remove an unused variable 2016-11-16 20:02:44 +01:00
louiz’ 4ab3cd653f Fix some little compilation errors with some configs, from last commit 2016-11-15 00:49:55 +01:00
louiz’ d872c2b492 Support the ident protocol
fix #3211
2016-11-15 00:23:19 +01:00
louiz’ ed7e66471f Add missing cstring include for strerror 2016-11-11 03:03:42 +01:00
louiz’ 0c8adc85f7 Move all the connect() logic from TCPSocketHandler into a subclass
This way, TCPSocketHandler only deal with the message sending/receiving, not
the connect() or anything else.  This will be used for implementing servers
(because when a client is accepted, we don’t need all the connect() and dns
resolution stuff).
2016-11-11 02:54:48 +01:00
louiz’ b5beb04332 Remove a never reached (and non-sensical) error 2016-11-07 21:57:39 +01:00
louiz’ a52baa52e2 Workaround for debian and other old OS that do not have std::put_time 2016-11-07 20:26:28 +01:00
louiz’ 94cebfcd77 Add a missing <chrono> include 2016-11-07 14:49:51 +01:00
louiz’ 7376831bc8 Add get-irc-connection-info adhoc command
fix #3171
2016-11-07 14:43:07 +01:00
louiz’ f50f50653d Refactor load_certs() 2016-11-01 19:43:56 +01:00
louiz’ ae02e58b9d Some cleanups 2016-10-31 14:03:37 +01:00
louiz’ 8c26b4d19f Remove unused roster code 2016-10-31 02:01:01 +01:00
louiz’ 3e7c8ab4bc Trivial cleanup 2016-10-31 01:39:35 +01:00
louiz’ 911258bc65 Make AddrinfoDeleter a class 2016-10-31 01:39:35 +01:00
louiz’ 0d8a2bfd13 Rename a variable that shadows a class member 2016-10-31 01:39:35 +01:00
louiz’ ac61450184 Refactor remove_invalid_xml_chars to use correct types directly 2016-10-27 01:37:55 +02:00
louiz’ 6d5d7eff68 Directly use Botan::byte instead of char, to avoid an unnecessary cast 2016-10-27 01:15:26 +02:00
louiz’ 021f025cb0 Refactor the sha1 digest into its own function, and do not use sprintf 2016-10-26 21:19:53 +02:00
louiz’ aa4255224e Optimize tcp_socket::on_send by using vector::erase() only once per call 2016-10-20 20:08:29 +02:00
louiz’ ce06c25e93 Very little optimization by using a simpler scope_guard when possible
The version with the vector, that can be disabled etc, is “very” slow, so we
use unique_ptr when we don’t need to disable it, and when it only contains
one function
2016-10-20 19:32:20 +02:00
louiz’ 827a1eedf8 On EINPROGRESS, we need to also check for read events (because openBSD lies)
“It is possible to select(2) or poll(2) for completion by selecting the
socket for writing”

Yeah, sure, “writing”…
2016-10-12 21:00:05 +02:00
louiz’ 5f2e4820df Fix an off-by-one issue in the POLL code 2016-10-12 21:00:05 +02:00
louiz’ c54f28d29d Conditionally use strptime if we don’t have std::get_time 2016-10-11 21:00:56 +02:00
louiz’ dfc0793ef2 Include a private and no-copy nodes in private <message/> to avoid carbon duplication 2016-10-11 00:43:46 +02:00
louiz’ 548e4ad473 Parse the timezone myself, instead of using the broken strptime
See

https://lab.louiz.org/louiz/biboumi/issues/3215
https://github.com/andikleen/glibc/blob/master/time/strptime_l.c#L746-L747

for why strptime() sucks

We use std::get_time now, to parse the date and time. And we parse the
timezone by hand.

fix #3215
2016-10-11 00:20:43 +02:00
louiz’ 8ac8d2b242 Correctly set status="110" in the presence for the target of a kick 2016-10-07 23:28:40 +02:00
louiz’ 954d271d50 Fix the argument of strerror after bind()
fix coverity CID 134470
2016-10-06 22:28:25 +02:00
louiz’ 92c99bb9dd Remove a branch that execute identical code in both cases
fix coverity CID 134469
2016-10-06 22:28:25 +02:00
louiz’ 1d197ff26c Respond to muc#traffic requests
fix #3069
2016-10-04 19:32:45 +02:00
louiz’ 45aebb8d8a Avoid an exception due to some bad logic in the DNS resolution mechanic
fix #3207
2016-10-03 21:12:16 +02:00
louiz’ b29225601a Fix some compilation warning/errors that appear on FreeBSD 2016-10-03 17:58:16 +02:00
louiz’ e5b392ece8 Fix parse_datetime by always using a 'z' as the timezone
Because some plateform accept Z and z, but some only accept z…
2016-10-03 17:58:16 +02:00
louiz’ 76a8189b46 Implement result-set-management for LIST queries
ref #2948
2016-10-03 01:08:48 +02:00
louiz’ 265b5df61b Re-add the ad-hoc command the was removed by mistake in the previous commit
Thank you, e2e tests
2016-09-29 23:10:41 +02:00
louiz’ ee4cf5dc2d Add AdhocCommandHandlers::add_command to simplify the usage of this class
And make things a little bit clearer
2016-09-29 20:53:40 +02:00
louiz’ 363a0bf02c Look for uuid/uuid.h instead of just uuid.h
Avoids a conflict between /usr/include/uuid.h and
/usr/local/include/uuid/uuid.h on freebsd
2016-09-29 20:11:35 +02:00
louiz’ 985da8f2b2 Remove unused code in sha1 module 2016-09-28 20:14:41 +02:00
louiz’ aaa2ca670a Fix the parse_datetime by using %Z instead of %z
If anybody knows why fedora accepts both, but it only works with %z on
debian, please tell me.
2016-09-17 00:34:28 +02:00
louiz’ 3047bd41b2 MAM results can be filtered by start and end dates 2016-09-04 22:58:38 +02:00
louiz’ 1140db3b88 Add parse_datetime 2016-08-31 01:58:13 +02:00
louiz’ 2a4905df01 Fix to_string(time_t) and write a unit test for it 2016-08-31 01:17:45 +02:00
louiz’ 9727f4cf00 Add the missing includes back 2016-08-29 19:20:27 +02:00
louiz’ 7536a1b3f3 Respond to MAM requests on a channel JID
At the moment, result-set-management is not implemented, the whole history
(well, at most 1024 messages) is returned.
2016-08-28 22:42:50 +02:00
louiz’ b59fc2a834 Use Z instead of z in the timestamp format 2016-08-23 20:52:37 +02:00
louiz’ a195939cda Don't use put_time() because it’s not in gcc 4.9, in shitty-debian “stable”
Use strftime instead
2016-08-23 20:48:39 +02:00
louiz’ 5e59cc517f Add missing ctime include 2016-08-22 20:25:41 +02:00
louiz’ e13d3fdf4d Move get_first_non_empty to louloulibs/utils 2016-08-22 21:29:22 +02:00