Commit Graph

3908 Commits

Author SHA1 Message Date
Jeremy Lakeman
8434656f5e WIP Java sync api 2018-06-26 16:41:27 +09:30
Jeremy Lakeman
44e73b969e Add new rhizome sync status API 2018-06-26 16:41:27 +09:30
Jeremy Lakeman
18bc162361 Add Java API for restful storage information request 2018-06-26 16:41:27 +09:30
Jeremy Lakeman
4aeb6545ad Refactor storage space measurement to expose new status API
Change semantics of fake space limit to exclude used space, otherwise the result will keep changing on each call
2018-06-26 16:41:27 +09:30
Jeremy Lakeman
c2526446ed Don't fail in meshmb if we re-create the same index payload 2018-06-26 15:39:20 +09:30
Jeremy Lakeman
3d2eb1c260 Always return null once a json parser has closed 2018-06-26 14:41:54 +09:30
Jeremy Lakeman
2f3b8cadc4 Fix meshmb api construction order 2018-06-26 13:43:00 +09:30
Jeremy Lakeman
5ec74ea307 Rewrite json parser to encapsulate object and array parsing 2018-06-19 14:25:29 +09:30
Andrew Bettison
f91033820b Use explicit serverMode enum values everywhere 2018-06-01 17:40:09 +09:30
Andrew Bettison
bbe7a87904 Add comments and assertions to server.h and server.c 2018-06-01 10:13:01 +09:30
Andrew Bettison
b8ddad6ff2 Move Rhizome function declaration from server.h to rhizome.h and rename 2018-06-01 10:13:01 +09:30
Jeremy Lakeman
659d726687 Correctly encode rhizome list query parameters 2018-05-28 17:18:21 +09:30
Jeremy Lakeman
9522575417 Use predefined constants for comparing out of range integer values 2018-05-28 11:06:35 +09:30
Jeremy Lakeman
b1fdf380f9 Throw a different exception type for unexpected http status codes 2018-05-23 10:50:09 +09:30
Jeremy Lakeman
0c5a84c305 Fallback to streaming bytes when rename() fails due to crossing filesystems 2018-05-22 16:05:27 +09:30
Andrew Bettison
1520b614f2 Specify Apple Mac OS build dependencies in more detail (fixes #127)
Specifically, need to install libtool from Homebrew; the libtool that
comes with Apple Xcode is insufficient.
2018-05-18 14:19:02 +09:30
Andrew Bettison
9e89a6ddcf Fix response of PUT /restful/keyring/SID/lock (fixes #139)
To be consistent with documentation, the response must contain the
details of the locked identity.  Added relevant assertions to the
lock/unlock test case.
2018-05-17 11:39:37 +09:30
Andrew Bettison
1b2147074f Add more assertions to keyring functions 2018-05-17 11:21:41 +09:30
Andrew Bettison
90e338f239 Fix compile error introduced in c2103e3 (fixes #138) 2018-05-17 11:21:28 +09:30
Jeremy Lakeman
d02bf3b7b9 Don't release keyring entries just because a user requested them (Fixes #137) 2018-05-16 11:47:02 +09:30
Jeremy Lakeman
c2103e3b86 Add MDP_INTERFACE_PEER for external unicast peer discovery to trigger a probe 2018-05-15 11:20:15 +09:30
Jeremy Lakeman
0043e20b81 Keep rhizome sync state for up to 5s while routes flap 2018-05-14 16:05:44 +09:30
Andrew Bettison
98fa034c53 Fix use of va_copy() in logging functions 2018-05-07 23:31:15 +09:30
Andrew Bettison
b8b31ed97a Remove duplicate log.h definition in headerfiles.mk 2018-04-30 21:18:15 +09:30
Andrew Bettison
11e7874fff Improve get_self_executable_path() on Mac OS 2018-04-30 21:18:15 +09:30
Andrew Bettison
0dea727b69 Fix calls to deprecated String.substring() method 2018-04-30 21:18:15 +09:30
Andrew Bettison
7ab9bc0a10 Replace netcat6 with OpenBSD netcat
Netcat6 has been discontinued in favour of OpenBSD netcat.
2018-04-27 17:29:02 +09:30
Andrew Bettison
d1203827e1 Move nibble_tree.c into client library
Needed by test_cli.c
2018-04-24 13:03:50 +09:30
Jeremy Lakeman
2f57fe3a47 Fix msp tests to use unused file descriptor 2018-04-24 12:53:56 +09:30
Jeremy Lakeman
abdb6867cd Restore the ability for test verbose logging to write directly to the console 2018-04-23 13:35:31 +09:30
Andrew Bettison
f2e8198dba Fix tests broken by new Rhizome store directory
The recent faa0f39 did not update these tests that look in the "blob"
subdirectory.
2018-04-23 13:26:11 +09:30
Andrew Bettison
199dc55b27 Fix broken link in tech doc 2018-04-23 08:13:49 +09:30
Paul Gardner-Stephen
ffeb25aa67 remove C99-ism 2018-04-18 16:45:51 +09:30
Paul Gardner-Stephen
504302aea1 pass exec_prefix to libsodium recursed make 2018-04-18 16:45:51 +09:30
Andrew Bettison
faa0f392c5 Improve Rhizome DB path configuration
Change the default 'rhizome.datastore_path' to "rhizome", ie, a sub-
directory of the instance directory.

Add a new erename() operation to "os.h".

Clean up the code around the fix 39f582cca (two commits ago) for a bug
introduced in 2014: the 'rhizome.db' file was always being created in
the instance directory, regardless of the setting of the
'rhizome.datastore_path' config option.

Whenever the Rhizome database is opened (by the server or by a CLI
invocation), if the database file does not exist but there is a
'rhizome.db' file in the legacy location, then move that file (and any
accompanying "blob" and "hash" sub-directories) to the configured
location.

Update copyright notices.
2018-04-17 12:01:02 +09:30
Jeremy Lakeman
9ba27b28a0 Possible race condition in command cleanup due to linking order, (Fixes #136) 2018-04-16 09:36:17 +09:30
Jeremy Lakeman
39f582ccab Auto move rhizome store when config is first set 2018-04-10 16:50:09 +09:30
Jeremy Lakeman
5e0e59e8b8 Fix tests/rhizomeall 2018-04-10 10:52:44 +09:30
Jeremy Lakeman
35fefb1680 Fix compilation and real interfaces on android 2018-04-10 10:52:44 +09:30
Jeremy Lakeman
59b6a70374 Use config to set and remember rhizome database location 2018-04-10 10:52:44 +09:30
Jeremy Lakeman
57767e444d Keep rhizome's external blobs in subfolders, migrating each file on first use 2018-04-10 10:52:44 +09:30
Andrew Bettison
a691a39870 Add Route Swift API
Uses the Route REST API internally.

Create the 'allswift' test script that aggregates the Keyring and Route
Swift API tests.
2018-04-09 14:43:37 +09:30
Andrew Bettison
dce8b378d2 Refactor routing and Swift test set-up
Add some servald config set-up functions to 'testdefs_routing.sh' and
'testdefs_swift.sh' that can be re-used in the Swift Routing API tests.

Improve some commenting on existing functions, for consistency.
2018-04-09 09:22:36 +09:30
Andrew Bettison
12bc773d4d Refactor Keyring Swift API
Factor JSON table parsing into a separate method of ServalRestfulClient
so it can be re-used by other APIs.
2018-04-09 07:50:42 +09:30
Andrew Bettison
bc637e1a5c Update Swift API to use new Keyring REST API
Now uses the correct, documented REST requests (not the legacy ones) and
includes a single-identity query.
2018-04-06 08:51:31 +09:30
Andrew Bettison
e349c8fc9c Remove -Wimplicit-fallthrough #pragma from sqlite3.c (fixes #128)
Replace it with the -Wno-implicit-fallthrough CFLAGS_SQLITE option in
configure.ac, so it no longer causes compile errors with older compilers
that don't support that warning.
2018-04-05 21:21:26 +09:30
Andrew Bettison
189485a513 Add Route Java API 2018-04-05 18:12:59 +09:30
Andrew Bettison
cf9e0b4730 Keep AF_UNIX and file-based interfaces up whenever config re-loads
Whenever the daemon re-loads its config, it keeps any socket-based
(AF_INET) SOCK_DGRAM interfaces open that are matched by the new config,
but it used to close and then re-open all local (AF_UNIX) interfaces and
file-based interfaces such as SOCK_FILE dummy files and SOCK_STREAM
device files.  This made it very difficult to develop the new
'routejava' test suite, because the Java API test harness always causes
a config re-load when it sets the REST API user/password in the config,
which caused the local socket interfaces to bounce, which interfered
with the reachability of nodes.

Now, local socket and file-based interfaces remain up after a config
re-load, as long as they are still matched by the new configuration.

Added INFO messages for interfaces that remain up after a config
re-load, and tweak interface up/down INFO messages to be consistent.
2018-04-05 18:12:23 +09:30
Andrew Bettison
1930c51da4 Minor clean-ups 2018-04-04 12:22:26 +09:30
Andrew Bettison
d1e113d4f3 Fix 'servaldswift' link error 2018-04-04 12:22:07 +09:30