Commit Graph

1091 Commits

Author SHA1 Message Date
Andrew Bettison
8fca6b5c5e Rename "rhizome list" output column headers
_inserttime -> .inserttime
_selfsigned -> .selfsigned
2012-06-13 18:11:14 +09:30
Andrew Bettison
eeb8a22495 Fix rhizome list column count field 2012-06-12 18:13:21 +09:30
Andrew Bettison
56cb12f507 Refactor rhizome db creation and execution functions 2012-06-12 18:12:36 +09:30
Andrew Bettison
b2ffc6e72c Merge branch 'master' into andrew 2012-06-12 11:56:50 +09:30
Andrew Bettison
50ed301ccc Fix failing tests from addition of rhizome list '_selfsigned' column 2012-06-12 11:48:15 +09:30
Andrew Bettison
7be0d9d00d Pass author SID parameters in binary, not hex 2012-06-08 18:32:14 +09:30
Daniel O'Connor
c2411780a9 Cleanup overlay_check_ticks() and overlay_interface_register().
- Remove [f]printf()s.
- Reduce nested if's.
- Add glorious whitespace.
2012-06-08 18:29:27 +09:30
Andrew Bettison
637ef02f30 Add _selfsigned column to "rhizome list" output
Add <pin,pin...> arg1 to "rhizome list" command, so it can open the keyring

Some tests in tests/rhizome fail
2012-06-08 18:25:43 +09:30
Daniel O'Connor
86c5e6945f Don't force signedness for name in overlay_interface_register().
I can't see any point to forcing the signedness, it causes warnings on platforms with a signed-char by default.
2012-06-08 17:01:50 +09:30
Daniel O'Connor
9d8d6ed94f Pretty up doifaddrs() same as lsif(). 2012-06-08 17:00:50 +09:30
Daniel O'Connor
ea9993dc91 Fix detection on OSX and make detection smarter.
- Fix lsif() on OSX.
- Make lsif() smarter and avoid non-broadcast and no AF_INET addresses.
- Don't run multiple interface detectors, run one at a time until one works.
- Factor out HAVE_IFADDRS_H code into a separate function into lsif.c with the other interface detection routines.
- Prefer HAVE_IFADDRS_H (random bias..)
2012-06-08 16:36:33 +09:30
Andrew Bettison
7a71a521f8 Pass author SID parameters in binary, not hex 2012-06-08 15:27:15 +09:30
Andrew Bettison
f5998b3862 Improve comments on test utility functions 2012-06-08 13:23:17 +09:30
Andrew Bettison
86c7819f97 Remove spurious ERROR messsages
Tests assert that stderr contains no ERROR: lines after a successful exit

Rewrote sqlite_exec_int64() to separate error outcomes from legitimate
result values

Changed several WHY() calls to DEBUG()

Improved test framework
2012-06-08 13:13:26 +09:30
Andrew Bettison
b14db5c28b Improve "rhizome add file" for empty payloads
Accept the empty string for a payload pathname to mean a zero-length
payload.
2012-06-05 15:45:53 +09:30
Andrew Bettison
a9ad1b6afc Add <bsk> optional arg to "rhizome add file"
Improve regular expressions for common data types in test scripts

Revert column count field delimiter in "rhizome list" from ":" to "\n"

Add a few more test cases
2012-06-05 13:58:59 +09:30
Andrew Bettison
c857aea237 Improve rhizome test script
Escape grep metacharacters when matching manifest names
2012-06-05 11:05:56 +09:30
Andrew Bettison
72640e830a First server start/stop test
On the way to multi-instance test scripts
2012-06-04 18:28:38 +09:30
Andrew Bettison
824763f5f0 Improve test framework
error() returns 254 if it does not exit (ie, during teardown)
2012-06-04 18:28:38 +09:30
Andrew Bettison
05721d3725 Remove obsolete tests, rename others 2012-06-04 18:28:38 +09:30
Daniel O'Connor
b5581c9861 Remove generation of serval.c. It was only used (AFAIK) for the Asterisk plugin which can't/won't work at this stage. 2012-06-04 13:08:30 +09:30
Andrew Bettison
304db6e5f4 Fix SEGV bug in "rhizome extract file" command
Add optional <key> argument, validate and parse it properly.
2012-06-01 18:12:59 +09:30
Daniel O'Connor
051191ba32 Fix braino in non-Linux code. 2012-05-29 09:48:22 +09:30
Daniel O'Connor
8f409cc7c5 Remove unused variables. 2012-05-29 09:45:24 +09:30
Daniel O'Connor
8a468e2a96 Merge branch 'master' of github.com:servalproject/serval-dna 2012-05-29 09:42:21 +09:30
Daniel O'Connor
bf2d1ca669 Supress unused-value warnings because WHY*() return -1 but this is commonly not used and clang warns about it. 2012-05-29 09:40:29 +09:30
gardners
2aaea99bfa added function for computing bundle shared secret, e.g., for
MeshMS encryption.  Currently just returns NULL (no encryption),
and not yet hooked in.
2012-05-28 13:51:24 +02:00
gardners
cdf2753412 fixed filesize display bug for "rhizome list"
(%u is 32bit on android, but filesize is 64bit)
2012-05-28 13:51:24 +02:00
gardners
b31817f564 fixed signed/unsigned comparison bug in rhizome manifest cache lookup
that was probably stopping some manifest retrievals for meshms.
debugging tweaks.
2012-05-28 13:51:24 +02:00
gardners
0cccb5bf83 debug cleanup 2012-05-28 13:51:23 +02:00
gardners
6861b9cd1b bug fix for rhizome manifest cache (hopefully realises when
database has been updated now).
2012-05-28 13:51:23 +02:00
Jeremy Lakeman
0f214ed46f Adjust database schema 2012-05-28 19:24:02 +09:30
Daniel O'Connor
8882515d03 Fix compilation on OSX.
- /proc/net/route is Linux only.
- lsif() will work anywhere SIOCGIFCONF is defined.
- Abstract namespace UNIX domain sockets are Linux only.
- Rework code to reduce indent levels.
2012-05-28 15:00:54 +09:30
Jeremy Lakeman
36389d2b78 Insert manifest within a transaction 2012-05-28 14:08:01 +09:30
Jeremy Lakeman
0e75cbdcad Document recommended sql queries 2012-05-28 09:06:07 +09:30
gardners
884e427fbb work towards making manifests only accept UPPERCASE hex strings
(mixing them between versions of manifests causes confusion).
2012-05-27 17:56:11 +02:00
gardners
07fc646fed various fixes to rhizome re-fetch logic after a failed partial fetch
(which seems to be what is tripping things up)
2012-05-27 17:29:50 +02:00
gardners
60057681b7 cleaned up some debug output. 2012-05-27 16:36:06 +02:00
gardners
782e9dca03 updated to handle new 10-field format of output from servald rhizome lists.
Passes all 23 tests.
2012-05-27 14:54:56 +02:00
gardners
4da9824ab0 fixed bug in storing file that could cause entertaining file hash
problems.
2012-05-27 14:44:53 +02:00
gardners
9d811876c7 added code to make sure that we only store the original number
of bytes when storing a growing journal.  Also make sure that
hash matches.
2012-05-27 14:24:55 +02:00
gardners
40ed766880 debugging fiddles. 2012-05-27 08:52:36 +02:00
gardners
30e53f963c fixed various manifest synchronisation bugs, including probably
the main one that was stopping meshms (large manifests would
practically never get advertised under certain (common) conditions).
2012-05-27 08:31:48 +02:00
Jeremy Lakeman
b3819835ca Allow for huge result sets 2012-05-27 15:04:37 +09:30
gardners
4b96860535 prevent segfault in libserval.so 2012-05-26 15:46:08 +02:00
gardners
cf42cf08a4 cleanup some debugging. 2012-05-26 14:56:58 +02:00
gardners
7d345ee2d1 made rhizome manifest cache code a little simpler and saner. 2012-05-26 14:36:12 +02:00
gardners
b1e1a36898 fixed typo. 2012-05-26 14:36:00 +02:00
gardners
94d17a9260 more work on encrypting bundles. code passes all 23 rhizome tests. 2012-05-26 11:36:19 +02:00
gardners
58cc45043b added code to encrypt files when storing into the database. 2012-05-26 11:36:19 +02:00