Commit Graph

3851 Commits

Author SHA1 Message Date
Jeremy Lakeman
585e573ecf Refactor rhizome storage methods to return database busy status, and pause rhizome sync 2017-03-06 16:12:55 +10:30
Jeremy Lakeman
2540c9e633 Cause rhizome add to poke the daemon and trigger all bundle add notifications 2017-03-06 16:12:55 +10:30
Jeremy Lakeman
c739555e8c Ensure we call rhizome_fail_write when the store was busy 2017-03-01 12:44:47 +10:30
Jeremy Lakeman
39fbcc475e Track call stats of mdp port handlers 2017-02-28 14:32:08 +10:30
Jeremy Lakeman
9ec46f2279 Deal with some database locking during transfers with the rhizome sync keys process.
Push back messages to re-process later
Queue and retry both the start and end of the transfer process
2017-02-28 13:13:31 +10:30
Jeremy Lakeman
4c538a7686 Return payload busy if write fails to flush, treat as an error in most cases 2017-02-28 13:13:09 +10:30
Jeremy Lakeman
f60704b3e1 Tweak caching edge case of reading message ply's backwards 2017-02-14 14:56:40 +10:30
Jeremy Lakeman
8571de4848 Avoid recompiling java class if they have not changed 2017-02-14 14:56:40 +10:30
Jeremy Lakeman
c05775a320 Generalise deterministic key generation 2016-11-21 11:09:27 +10:30
Jeremy Lakeman
3726fe2f73 Move vomp console feature to test binary 2016-11-21 11:09:27 +10:30
Jeremy Lakeman
1e70bcaac6 Clean up some more warnings 2016-11-21 10:34:12 +10:30
Jeremy Lakeman
d11fef3226 Add casts to fix warnings on some versions of gcc 2016-11-19 10:58:57 +10:30
Andrew Bettison
2690a5795b Add SERVAL_ENABLE_DEBUG macro 2016-11-14 11:40:22 +10:30
Andrew Bettison
e769af0067 Compile Java during make, not during tests
Re-organised all Java source code under the java-api subdirectory, which
also contains a Makefile.in that performs the Java compilation.  This
makefile is only invoked if ./configure finds a working Java compiler.
2016-11-14 11:28:08 +10:30
Andrew Bettison
a8867df1b0 Fix Makefile.in for out-of-tree build
Improves support for running make from a current working directory that
is not the repo root.  Only the files that reside in the repo root are
prefixed with $(SOURCE_PREFIX); the files that are created by
./configure are in the current working directory.
2016-11-14 11:28:08 +10:30
Andrew Bettison
ccacd19dfa Add global keyring assertions
Many functions require that the global 'keyring' pointer is set,
but there were no assertions to document this precondition.
2016-11-14 11:28:08 +10:30
Andrew Bettison
6d2eb268ed Add 'cmd_cleanup' trigger
The new 'cmd_cleanup' trigger replaces the old command_cleanup()
function, which was causing linking problems on OS X and inverted strict
dependency.  The keyring cmd_cleanup calls keyring_free(global_keyring),
instead of merely asserting keyring == NULL, so the error exit cases of
many CLI functions have been simplified.
2016-11-14 11:28:03 +10:30
Andrew Bettison
931f25a9e7 Fix strlcpy.c compile error on OS X 2016-11-09 19:03:45 +10:30
Jeremy Lakeman
bd9083d57d Fix tests with clean work folder, renamed libservald to libservaldaemon 2016-11-07 14:23:45 +10:30
Andrew Bettison
a8e394d299 Add "keyring remove" command
Adds a CLI and RESTful API operation for "keyring remove", with simple
test cases.  Added the corresponding Java API operation.  Updated the
API documentation.

API change: for consistency with RESTful API design, the GET
/restful/keyring/add operation now returns "201 Created" not "200 OK" if
successful.
2016-11-07 13:07:49 +10:30
Andrew Bettison
e47d0ce1c7 Fix the RESTful keyring add/set http_status_message
For successful requests (200), was being returned as "application/json",
but should be "OK".
2016-11-07 11:38:20 +10:30
Andrew Bettison
24266b5f3b Add 'api.restful.authorization' config option 2016-11-07 11:38:20 +10:30
Jeremy Lakeman
5b75221c91 Fix compiler warnings when building with android ndk 13b 2016-11-07 10:38:23 +10:30
Jeremy Lakeman
159188d08c Don't overflow the stack if logging config causes more logging due to using memory diagnostics 2016-10-31 15:23:06 +10:30
Jeremy Lakeman
f4210e06d8 Make sure all restful newsince responses can be sorted by the front end 2016-10-31 10:56:10 +10:30
Jeremy Lakeman
84caa24d0f Pass identity name as meshmb manifest name 2016-10-26 13:09:35 +10:30
Jeremy Lakeman
eff46c9030 Add manifest name to meshmb restful output 2016-10-26 13:09:34 +10:30
Jeremy Lakeman
8e9877b3ce Add filter by service / name to restful rhizome list 2016-10-26 13:09:32 +10:30
Jeremy Lakeman
86d4d87ff2 Add java API for restful meshmb send and list 2016-10-26 13:09:30 +10:30
Jeremy Lakeman
4b1f64c0e3 Generalise meshms json list parsing into an abstract class 2016-10-26 13:08:31 +10:30
Jeremy Lakeman
09d04d7c8f Add restful api for listing broadcast messages 2016-10-26 13:08:19 +10:30
Jeremy Lakeman
c2956568d6 Send a meshmb message via restful api 2016-10-26 13:08:13 +10:30
Jeremy Lakeman
7f6316b7df Remove dependence on keyring list order 2016-10-26 13:01:37 +10:30
Jeremy Lakeman
26e38e79cb Tidy up handling of http server socket addresses & log spam 2016-10-25 16:04:41 +10:30
Jeremy Lakeman
9feda5258c Allow client to specify external interface name in config match expression 2016-10-25 16:04:41 +10:30
Andrew Bettison
176de6fa42 Fix Makefile failure when <jni.h> not present
This condition had not been tested since Makefile.in was overhauled.
2016-10-25 09:39:56 +10:30
Andrew Bettison
a72f6ae91b Use AC_CONFIG_SRCDIR in configure.ac
Adds a safety check to ensure that the --srcdir option to ./configure is valid.
2016-10-25 09:34:32 +10:30
Andrew Bettison
6201b97fa3 Shorten trigger names for OS X
Trigger names cannot exceed 11 characters on OS X, so the new "config_change" trigger
has been renamed to "conf_change" and the "config_change_log" trigger has been renamed
to "conf_log".
2016-10-25 09:34:32 +10:30
Jeremy Lakeman
5fbd6a79ef Add feature for meshmb cli to force linking into deamon 2016-10-20 09:28:08 -04:00
Jeremy Lakeman
30aa1c16b8 Set authorship to remote if the sender sid can be generated from the id 2016-10-20 08:51:46 -04:00
Jeremy Lakeman
65831e31d4 Report the state of each network interface in routing table 2016-10-20 08:48:35 -04:00
Jeremy Lakeman
fe7a839df5 Don't depend on the ability to correctly resolve localhost 2016-10-20 08:37:24 -04:00
Jeremy Lakeman
75dfcff213 Fix meshms restful newsince with empty conversation 2016-10-20 08:37:24 -04:00
Andrew Bettison
95cce9109f Fix Android server thread start bug
Was failing to start if a stale pidfile was present.

Introduced the 'debug.server' config option to help diagnose pidfile
issues.
2016-10-20 13:29:01 +10:30
Andrew Bettison
5191d424cb Fix broken Android build
Renamed libservald.so to libservaldaemon.so everywhere to avoid conflicts
with the "servald" module name in Android.mk, and to avoid the overly
generic name "libserval".

Include the JNI entry points in the Android build.
2016-10-20 13:28:12 +10:30
Andrew Bettison
641298b0e6 Fix JNI command-line exception return path
If an exception was raised while executing a CLI command via JNI, then
a warning was logged while cleaning up: calling GetObjectArrayElement()
while an exception is pending.  This fix removes that call.
2016-10-20 13:28:12 +10:30
Andrew Bettison
e2086249ac Load config earlier in the JNI server entry point 2016-10-20 13:28:12 +10:30
Andrew Bettison
1efe6686fc Use config.h instead of -DHAVE_FOO=1
swiftc(1) requires every -D option to be prefixed with -Xcc, which
is not easy to achieve using autoconf.

Now instead of setting configuration macros like HAVE_LSEEK64 on the
command line using -D, they are defined in config.h, which is generated
by ./configure, ignored by Git, and included by all headers and source
files that use any configuration macro.

The dependency on Makefile has been replaced with a dependency on
Makefile.in and config.h, which helps avoid some redundant full
recompiles after running ./configure, because the configure script
does not overwrit config.h if its content does not change.
2016-10-19 16:27:20 +10:30
Andrew Bettison
42f62d2b8b Move JNI setInstancePath() into own source file 2016-10-19 16:26:00 +10:30
Andrew Bettison
a3f3de571a Minor fixes to Makefile.in 2016-10-19 10:54:44 +10:30