Commit Graph

2085 Commits

Author SHA1 Message Date
Andrew Bettison
14ce5af688 Refactor configuration schema code
Replace 'parsefunc' (cf_opt_foo) function arguments in schema
declarations with 'repr' (foo) names, which are used to declare
cf_opt_foo and cf_fmt_foo.
2013-02-25 17:23:44 +10:30
Andrew Bettison
5518859b66 Refactor: move read_symlink() from log.c to os.c 2013-02-25 15:25:53 +10:30
Andrew Bettison
1e61e7a02f Fix bcopy()/bzero() #define hack
Replace #define bcopy(...) memset(...) with inline functions only if
bcopy() is unavailable, as checked by configure script

Ditto bzero()
2013-02-25 15:23:03 +10:30
Andrew Bettison
cb6d65f621 Fix Markdown formatting 2013-02-22 00:05:34 -08:00
Andrew Bettison
74c1025093 Improve documentation for Rhizome mirror daemon 2013-02-22 18:31:42 +10:30
Andrew Bettison
7627be12c8 Fix broken link in Utilities README 2013-02-21 22:37:33 -08:00
Andrew Bettison
b4818c3d6f Improve KiwiEx 2013 utilities
Rhizome mirror daemon and Serval Maps push script handle errors better

Added README.md
2013-02-22 17:01:53 +10:30
Jeremy Lakeman
af584994a2 Ensure encryption buffer doesn't move between nonce and cypher text allocation 2013-02-22 16:29:07 +10:30
Andrew Bettison
48f7cd7d5d Add serval_maps_push.sh script
To be used as the --exec-on-unpack option to rhizome_mirrord

Rsyncs all the unpacked zip files to the Serval Maps testing server and fetches
the Serval Maps re-scan URL

Is invoked with arg1 = path of unpack directory, args2..N = names of newly
unpacked directories within arg1

If the RHIZOME_MIRRORD_LOG_STDOUT env var is set, then enables shell execution
tracing
2013-02-22 15:28:41 +10:30
Andrew Bettison
1b281aa532 Improve 'rhizome.external_blobs' config option
Now only affects when a blob is written, but reading will attempt the
database first, and look for an external blob file if that fails

Test case recently added in b20e714ffb now
passes
2013-02-22 14:25:48 +10:30
Andrew Bettison
4fd32e803c Improve Rhizome mirror daemon script
Report servald exit status in error messages
2013-02-22 14:22:46 +10:30
Jeremy Lakeman
b20e714ffb Test that changing config.rhizome.external_blobs still allows existing blobs to be read (FAILs) 2013-02-22 13:37:01 +10:30
Andrew Bettison
5ac6bd8834 Fix compile error on Linux 2013-02-22 12:06:21 +10:30
Andrew Bettison
7e206d5930 Improve Rhizome mirror daemon script
New options: --unpack-dir --exec-on-unpack --log-to-stdout

Unpacks Zip and Tar files after they are extracted from Rhizome

Runs a given command (executable) after unpacking any Zip or Tar files
2013-02-21 22:42:21 +10:30
Andrew Bettison
66e78194f9 Improve Rhizome mirror daemon script
Deal with servald error conditions and commands that return status=1
2013-02-20 17:37:41 +10:30
Jeremy Lakeman
90386ce1b1 Merge remote-tracking branch 'origin/development' into serial
Conflicts:
	rhizome.h
	rhizome_database.c
	rhizome_fetch.c
	rhizome_store.c
2013-02-20 17:23:03 +10:30
Jeremy Lakeman
5194eece4f Remove useless debug message 2013-02-20 16:18:59 +10:30
Jeremy Lakeman
73786bcb5d Refactor all rhizome reading and writing
- The API in rhizome_store.c is used for all reading and writing
- external storage is now usable for all transport options
2013-02-20 16:18:59 +10:30
Jeremy Lakeman
a6405fe387 Don't advertise http server if it is disabled 2013-02-20 16:18:59 +10:30
Jeremy Lakeman
e5fa357f07 Add slip test to automated testing 2013-02-20 16:18:59 +10:30
gardners
944486c048 simplify external/internal blob storage to a boolean flag instead
of a threshold.
2013-02-20 16:18:59 +10:30
Jeremy Lakeman
bb8b3d6376 Add new mdp trace command 2013-02-20 16:18:58 +10:30
gardners
9e9f93b079 make external blob output conditional on debug flag. 2013-02-20 16:18:58 +10:30
Jeremy Lakeman
10234018b0 Add interface name to route print output 2013-02-20 16:18:58 +10:30
gardners
5a3dec28d9 make rhizome over mdp idle timeout configurable at runtime. 2013-02-20 16:18:57 +10:30
gardners
065a1c6f09 add periodic rhizome transfer statistics 2013-02-20 16:18:57 +10:30
gardners
a23612428b make rhizome over mdp block size configurable.
1K seems too big to be reliable on our prototype UHF radio links,
as CRCs fail almost all the time. #48
2013-02-20 16:18:57 +10:30
gardners
57013c3a03 removed temporary verbose output from test. 2013-02-20 16:18:57 +10:30
gardners
f52214e229 make return codes of "servald stop" discriminate between different
failure modes (makes it easier to debug some test failures)
2013-02-20 16:18:57 +10:30
gardners
3301a51883 fix behaviour when rhizome http service is disabled so that
rhizomeprotocol test 3 can detect when rhizome http is disabled,
even though the http server itself runs for providing informational
services.
2013-02-20 16:18:56 +10:30
gardners
2252fdcaa7 created tool for automatically finding IN()s without matching
OUT()s or where return() is used instead of RETURN().
Added OUT() to end of all functions using IN() that lacked it to
make it easier to statically analyse this invariant.
Fixed several return instead of RETURNs detected through use of
this tool. #49
2013-02-20 16:18:56 +10:30
Andrew Bettison
390655580d Add 'rhizome delete' and 'rhizome clean' commands
sqlite_void_exec() and its ilk now return the count of changed rows, not
just zero, on success

sqlite_exec_prepared() and its ilk now return the count of rows (number
of step results SQLITE_ROW), instead of just zero, on success

rhizome_clean() function now produces an optional report of its changes

rhizome_fail_write() and rhizome_finish_write() now log WARNings not
ERRORs if the SQL DELETE FROM FILES or DELETE FROM FILEBLOBS statements
fail

Refactor rhizome_open_read() to use sqlite_exec_int64()

Ensure that 'rhizome extract' and 'rhizome dump' commands return exit
status of 1 in "not found" conditions, not 255, which is reserved for
errors

Test cases for four new commands: 'rhizome delete bundle', 'rhizome
delete manifest', 'rhizome delete payload' and 'rhizome delete file'
(no test case for 'rhizome clean' yet)
2013-02-20 15:37:09 +10:30
gardners
2bbdd523f0 increase size for unix domain socket pathname from arbitrary 100
to PATH_MAX to solve tests erroring out on OSX with long temporary
file names.
2013-02-20 15:36:32 +10:30
gardners
641d749ab4 Create files for large rhizome bundles
- configurable size threashold
2013-02-20 15:36:32 +10:30
gardners
0ac403717d improve rhizome mdp re-request timeout handling so that it doesn't
do amazingly bad things on low-bandwidth packet radio links.
2013-02-20 15:36:31 +10:30
gardners
c6354a5288 always show sign when displaying link budget. 2013-02-20 15:36:31 +10:30
gardners
34bf9127a1 make rhizome transfer timeouts consistent. 2013-02-20 15:36:31 +10:30
gardners
f681356f52 reformat /rssi web page to better fit on phone screens. 2013-02-20 15:36:31 +10:30
gardners
41dedb5e24 fixed two actual bugs in upper7_decode() 2013-02-20 15:36:31 +10:30
gardners
71ac161dd3 fix segfault bug in slip decoding. 2013-02-20 15:36:31 +10:30
gardners
7cc4324ac6 added facility to log a clue for crash handler to hint where things
got stuck/caused a crash.
2013-02-20 15:36:31 +10:30
gardners
d593b569c1 improve reporting of broken manifests, and make conditional on
debug.rejecteddata
2013-02-20 15:36:30 +10:30
gardners
f465f3a9ee Add lots of profiling to assist in debugging
- made some debug output conditional.
- make it possible to debug slip decoding without getting swamped by other output.
- Improve reporting of unnamed schedule() calls.
- always collect performance statistics, and report on any excess
  use (>1sec in every 3), even if debug.timing is not enabled.
- include file size information in Rhizome transfer messages.
- reduce output when debug.rhizome_rx is set.
2013-02-20 15:36:30 +10:30
gardners
80168e3530 Improve debug logging
- add debug.trace to help track down segfaults
- warn about alarms without names (which are then hard to track down).
2013-02-20 15:36:30 +10:30
gardners
1e76772c3a print a back trace whenever any signal is received. 2013-02-20 15:36:30 +10:30
gardners
e551017896 push profiling down deeper into rhizome_fetch_poll()'s children. 2013-02-20 15:36:29 +10:30
gardners
60015a1aee keep HTTP server running when rhizome over http is disabled, but
don't serve and rhizome requests.
2013-02-20 15:36:29 +10:30
gardners
506ceea309 log when BAR lookups are slow. 2013-02-20 15:36:29 +10:30
gardners
83625198cb tweak BAR lookup filter in light of packets arriving with 20 BARs
at a time, which can take 4seconds(!) to process on a WR703N.
2013-02-20 15:36:29 +10:30
gardners
8befcf7c11 create indexes for ID and VERSION on MANIFESTS table to reduce the
time it takes to lookup whether BARs are interesting.
2013-02-20 15:36:29 +10:30