Commit Graph

721 Commits

Author SHA1 Message Date
Jeremy Lakeman
3333d2faa2 Compare MeshMS sender first, so you can talk to yourself (Fixes #124) 2017-09-06 12:38:53 +09:30
Jeremy Lakeman
d1a1a41f08 Escape codepoints U+10000 to U+10FFFF in json output as surrogate pairs 2017-06-29 19:23:51 +09:30
Jeremy Lakeman
65932e05db Improve reliability of last routing test 2017-06-20 16:32:12 +09:30
Jeremy Lakeman
9cb561229a Allow following a feed that isn't in rhizome yet, and override the displayed name 2017-06-20 12:17:57 +09:30
Jeremy Lakeman
508e95436a Add API's for marking a feed as blocked 2017-06-07 13:52:44 +09:30
Jeremy Lakeman
af2d32c25b Add Java API for importing bundles with manifests in zip comments 2017-05-24 13:33:03 +09:30
Jeremy Lakeman
2db8c24e15 Use chunked transfer encoding and expect header in Java API 2017-05-23 11:37:26 +09:30
Jeremy Lakeman
77b603942f Support "Transfer-Encoding: chunked" for POST'ed content 2017-05-22 16:17:17 +09:30
Jeremy Lakeman
87d171cdf7 Reject rhizome import before sending manifest & payload 2017-05-17 14:55:56 +09:30
Jeremy Lakeman
e376c1cb80 Add proper server support for http/1.1 Expect header 2017-05-17 14:24:28 +09:30
Jeremy Lakeman
a473304c06 Add restful import API 2017-05-17 10:16:46 +09:30
Jeremy Lakeman
9b7d8bfa23 Resume activity newsince when acking our own message 2017-05-10 15:21:21 +09:30
Jeremy Lakeman
3812587a31 Ack the senders ply and thread into activity feed 2017-05-10 11:01:02 +09:30
Jeremy Lakeman
4b98def664 Add newsince request for incoming activity 2017-04-19 14:46:37 +09:30
Jeremy Lakeman
be9c138559 Add restful API for feed activity 2017-04-19 14:46:37 +09:30
Jeremy Lakeman
1973df13b3 cli interface for reading threaded feed activity 2017-04-19 14:46:37 +09:30
Jeremy Lakeman
5ccff053c2 Add bundle author to feed metadata 2017-04-19 14:46:36 +09:30
Jeremy Lakeman
d2dfe71f26 Restful meshmb list subscribed feeds 2017-04-19 14:46:36 +09:30
Jeremy Lakeman
e7ca268dbc Add restful API's for follow and ignore 2017-04-19 14:46:36 +09:30
Jeremy Lakeman
a8c29bbb15 Add MeshMB cli commands to follow and ignore feeds 2017-04-19 14:46:36 +09:30
Jeremy Lakeman
2f60b8417f Test and fix rhizome clean verify 2017-04-19 14:46:36 +09:30
Jeremy Lakeman
88d70fc386 Don't assert if a query parameter is empty 2017-03-22 13:04:58 +10:30
Jeremy Lakeman
77198dd163 Read earlier journal payload out of store 2017-03-08 13:37:26 +10:30
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
3726fe2f73 Move vomp console feature to test binary 2016-11-21 11:09:27 +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
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
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
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
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
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
c8bf8a7733 Refactor JNI out of CLI and server main loop
The CLI and server main loop now have no conditional JNI code.  All JNI
code has been moved into separate source files, which #include the new
"jni_common.h" instead of <jni.h>.  The "cli.h" header no longer
includes <jni.h>, so the rest of the Serval source code is now
unaffected by JNI definitions.

The 'cf_limbo' global variable is now thread-local, so that each thread
has its own independent copy of the loaded configuration.  The JNI
server entry point now calls cf_init() once.  The new 'cf_initialised'
flag prevents clobbering the config state by redundant calls to
cf_init().

The CLI "stop" command now sends SIGHUP to the specific thread in which
the server is running.  This is achieved by writing the PID and TID
(Linux Thread ID) into the pidfile, separated by a space, on systems
that support the Linux gettid() and tgkill() system calls.  The server's
signal handler has been overhauled, and its logging improved.
2016-10-13 16:23:18 +10:30
Andrew Bettison
a15396b793 Add server status test case 2016-10-13 16:01:22 +10:30
Andrew Bettison
fc10a83a1d Improve test framework
The execute() and executeOk() functions now set $TFWEXECUTED instead
of $executed.

The execute() and executeOk() functions now make a hard link from the
--stdout-file=PATH and --stderr-file=PATH files to the default files
of 'stdout' and 'stderr' so that post-fork handling can still cat their
contents into the log file.

The fork() function now sets the variables $TFWFORKSTDOUT_<label>
$TFWFORKSTDERR_<label> $TFWFORKPID_<label>.
2016-10-13 16:01:22 +10:30
Jeremy Lakeman
62a1ca46bc Wait for path establishment in network scan test 2016-09-27 15:51:23 +09:30
Jeremy Lakeman
ced74d0b6b Simplify BK handling using new signing key typedefs 2016-09-27 15:20:12 +09:30
Andrew Bettison
e34141a2a5 Upgrade to SQLite 3.14.2
Ignores a variety of warnings when compiling sqlite3.c.

Uses the new sqlite3_trace_v2() function for logging SQL statements, now
that sqlite3_trace() and sqlite3_profile() are deprecated.

Fixes a rhizomeops test failure caused because SQLite 3.12 increased the
default block size from 1024 to 4096, causing the fixed overhead of an
empty Rhizome db to exceed 32KB.  This caused the test to fail because
the first "file add" failed.  Now the test fixture adapts to the fixed
overhead.

Deletes the SQLite 3.10.2 source amalgamation.
2016-09-21 22:47:35 +09:30
Jeremy Lakeman
adf0a880bc Any identity could be the main one, check for any valid route 2016-09-21 17:27:39 +09:30
Andrew Bettison
298b83f97b Fix a failing keyringrestful test
The recent randomising of keyring slots broke an assumption
about the order of the 'keyring list' output.  Now the test's
assertions do not assume any order.
2016-09-21 12:16:50 +09:30
Jeremy Lakeman
a531c0e960 Use a random walk to find free keyring slots
Always round the file size up to the nearest 16 slots
2016-09-20 16:47:30 +09:30
Jeremy Lakeman
275c99bc4e Add cli option for changing an entry pin 2016-09-20 10:00:02 +09:30
Andrew Bettison
2f61c447a9 Add a new rhizomerestful test case: update a bundle to empty payload 2016-09-19 14:30:04 +09:30
Andrew Bettison
0657e27dea Fix a failing meshmsrestful test
On OS-X, "sed" is BSD sed(1); must use $SED instead to get GNU sed(1).
2016-09-15 17:17:34 +09:30
Andrew Bettison
21679e3865 Fix rhizomeprotocol test on OS-X 2016-09-12 15:09:46 +09:30
Andrew Bettison
43bd0bd33f Fix a failing keyring test
The in-memory identity creation test was failing intermittently because
the server only creates the in-memory identity on the first tick, and
under load the server sometimes does not tick for a while, leading to a
race with the "servald id self" command.

The test case now waits for the server to emit a tick before running the
"id self" command.  This necessitated a new DEBUG() statement and a new
debug flag 'overlaytick'.

Also disabled Rhizome for all the keyring tests, as unnecessary Rhizome
DB creation was slowing down the fixtures.
2016-09-06 15:00:21 +09:30
Andrew Bettison
2cfdafdb56 Add some MDP client DEBUG trace statements 2016-09-06 13:31:38 +09:30