Commit Graph

491 Commits

Author SHA1 Message Date
Jason Rhinelander 86247bc5c7 Add missing header 2021-01-14 21:48:09 -04:00
Jason Rhinelander 4f1047d7e9 1.2.3 release 2021-01-14 16:11:49 -04:00
Jason Rhinelander 4c97ac26b4 Rename deb package name 2021-01-14 16:11:18 -04:00
Jason Rhinelander 9fac1e0ea9 Rediff patches 2021-01-14 15:42:22 -04:00
Jason Rhinelander 55ffe0e85f Merge remote-tracking branch 'origin/stable' into debian/sid 2021-01-14 15:37:30 -04:00
Jason Rhinelander 46c1a97b14 Merge branch 'dev' into stable 2021-01-14 15:32:59 -04:00
Jason Rhinelander 396f591fae Remove deprecated string_view compat shim 2021-01-14 15:32:38 -04:00
Jason Rhinelander b49a94fb83 Export compile commands and use ccache by default 2021-01-14 15:32:38 -04:00
Jason Rhinelander 0738695eb9 Add lokimq compatibility headers 2021-01-14 15:32:38 -04:00
Jason Rhinelander 2ae6b96016 Rename LokiMQ to OxenMQ 2021-01-14 15:32:38 -04:00
Jason Rhinelander bd9313bf19 Fix decoding into a std::byte
Decoding into a std::byte output iterator was not working because the
`*out++ = val` assignment doesn't work when the output is std::byte and
val is a char/unsigned char/uint8_t.  Instead we need to explicitly
cast, but figuring out what we have to cast to is a little bit tricky.

This PR makes it work (and bumps the version for this and the is_hex
fix).
2020-12-14 13:05:14 -04:00
Jason Rhinelander 1959f8747d
Merge pull request #28 from jagerman/is-hex-mod-2
Make lokimq::is_hex check for size being a multiple of 2
2020-12-12 21:06:59 -04:00
Jason Rhinelander 90701e5d62 Make lokimq::is_hex check for size being a multiple of 2
`is_hex()` is a bit misleading as `from_hex()` requires an even-length
hex string, but `is_hex()` also allows odd-length hex strings, which
means currently callers should be doing `if (lokimq::is_hex(str) &&
str.size() % 2 == 0)`, but probably aren't.

Since the main point of `lokimq/hex.h` is for byte<->hex conversions it
doesn't make much sense to allow `is_hex()` to return true for something
that can't be validly decoded via `from_hex()`, thus this PR changes it
to return false.

If someone *really* wants to test for an odd-length hex string (though
I'm skeptical that there is a need for this), this also exposes
`is_hex_digit` so that they could use:

    bool all_hex = std::all_of(str.begin(), str.end(), lokimq::is_hex_digit<char>)
2020-12-12 20:25:01 -04:00
Jason Rhinelander 3d53f9a7de fix lib version 2020-11-17 15:46:50 -04:00
Jason Rhinelander daacfbf763 Refresh .so versioning patch 2020-11-17 15:46:50 -04:00
Jason Rhinelander 0fb4c0a0ef 1.2.2 stable release 2020-11-17 15:29:44 -04:00
Jason Rhinelander d0c23a05d4 Merge remote-tracking branch 'origin/stable' into debian/sid 2020-11-17 15:29:39 -04:00
Jason Rhinelander e7487fd0c8
Merge pull request #26 from loki-project/dev
1.2.2 release
2020-11-17 14:32:48 -04:00
Jason Rhinelander 178bd4f674 Bump version for 1.2.2 release 2020-11-17 12:42:37 -04:00
Jason Rhinelander b1543513bb Don't install when building as a static subdirectory
This is making lokimq headers & static lib get installed when lokimq is
used as a project subdirectory, which is very annoying.

This adds an option for enabling the install lines, and only enables it
if doing a shared library or a top-level project build.
2020-11-17 12:40:59 -04:00
Jason Rhinelander 253f1ee66e Move socket holding into LokiMQ instance
The thread_local `std::map` here can end up being destructed *before*
the LokiMQ instance (if both are being destroyed during thread joining),
in which case we segfault by trying to use the map.  Move the owning
container into the LokiMQ instead (indexed by the thread) to prevent
that.

Also cleans this code up by:

- Don't close control sockets from the proxy thread; socket_t's aren't
necessarily thread safe so this could be causing issues where we trouble
double-closing or using a closed socket.

- We can just let them get closed during destruction of the LokiMQ.

- Avoid needing shared_ptr's; instead we can just use a unique pointer
with raw pointers in the thread_local cache.  This simplifies closing
because all closing will happen during the LokiMQ destruction.
2020-11-17 11:54:39 -04:00
Jason Rhinelander d889f308ae cppzmq 4.7+ compatibility
Updates bundled cppzmq to 4.7.1, and replaces deprecated functions with
new API.
2020-11-13 15:20:30 -04:00
Jason Rhinelander 768a639dea Crank clang to 11 2020-10-23 18:18:18 -03:00
Jason Rhinelander c3cc5cd006 1.2.1 deb package 2020-10-21 00:19:01 -03:00
Jason Rhinelander ec9b88399a Merge branch 'stable' into debian/sid 2020-10-21 00:17:59 -03:00
Jason Rhinelander 95d7e0964f Merge branch 'dev' into stable 2020-10-19 23:45:57 -03:00
Jason Rhinelander ec0d44e143 Stable release bump 2020-10-19 23:44:24 -03:00
Jason Rhinelander ea484729c7 Fix var::get<I> to return references 2020-10-15 17:43:25 -03:00
Jason Rhinelander 7049d3cb5a Test suite: use different ports for each test
Apple, in particular, often fails tests with an address already in use
if attempt to reuse a port that the process just closed, because it is a
wonderful OS.
2020-10-15 16:55:33 -03:00
Jason Rhinelander 8ed529200b macOS 10.12 compatibility
Add var::get/var::visit implementations of std::get/std::visit that get
used if compiling for an old macos target, and use those.

The issue is that on a <10.14 macos target Apple's libc++ is missing
std::bad_variant_access, and so any method that can throw it (such as
std::get and std::visit) can't be used.  This workaround is ugly, but
such is life when you want to support running on Apple platforms.
2020-10-15 16:55:33 -03:00
Jason Rhinelander 318781a6d4 Update macos build to use 10.14 compatibility 2020-10-15 15:49:54 -03:00
Jason Rhinelander 36957078cd Update macos build to use 10.14 compatibility 2020-10-13 18:10:34 -03:00
Jason Rhinelander c2335395e0 1.2.0 debs 2020-09-30 17:15:44 -03:00
Jason Rhinelander eb0d3f959a Merge branch 'master' into debian/sid 2020-09-30 17:14:53 -03:00
Jason Rhinelander 53481cdfa9 Merge remote-tracking branch 'origin/dev' into master 2020-09-30 17:00:18 -03:00
Jason Rhinelander 6ab57f3b21 New 1.2.0 dev snapshot 2020-09-25 21:09:36 -03:00
Jason Rhinelander 0ffc1b38c9 Merge branch 'dev' into deb-sid 2020-09-25 21:05:18 -03:00
Thomas Winget f37e619d7b add method to get current buffer from bt list/dict consumer 2020-09-25 13:23:23 -03:00
Jason Rhinelander 9f79aa851b Don't build tests 2020-09-23 18:39:33 -03:00
Jason Rhinelander 0e2f89bc02 drop mapbox-variant 2020-09-23 17:45:52 -03:00
Jason Rhinelander da5cf7859b Add separate submodules step
Avoids needing ca-certificates in main build
2020-09-23 17:39:10 -03:00
Jason Rhinelander 5aa0f9e5a1 DRY 2020-09-23 17:12:39 -03:00
Jason Rhinelander e0d9dfc78a Remove old cmake flag 2020-09-23 14:35:00 -03:00
Jason Rhinelander 6775e29a80 Allow binary 2020-09-23 14:30:45 -03:00
Jason Rhinelander 876bca841b de-https 2020-09-23 14:27:59 -03:00
Jason Rhinelander 066192d675 fix typo 2020-09-23 14:18:35 -03:00
Jason Rhinelander 0ba2876f69 single apt-get update; include gpg pubkey 2020-09-23 14:17:36 -03:00
Jason Rhinelander 72c0892db8 Parallelize 2020-09-23 13:49:46 -03:00
Jason Rhinelander 1cdc52056e Remove mapbox variant dep 2020-09-22 14:02:37 -03:00
Jason Rhinelander 90c061bef6 Add repo & no recommends 2020-09-22 13:36:41 -03:00