Andrew Bettison
e3ceedddf8
Fix link state routing timing logic
...
Avoid calling schedule() with zero alarm time
2013-11-26 15:33:54 +10:30
Andrew Bettison
a9ccd38adc
Improve overlay buffer ob_xxx() primitives
...
All ob_append_xxx(b,...) functions return void
ob_makespace() returns 1 if successful, 0 if not
Add ob_overrun(b) predicate to check for overrun after any number of
appends
2013-11-26 15:33:54 +10:30
Andrew Bettison
9cdf053320
Fix RETURN macros
...
Remove trailing semicolon
Fix RETURNNULL(X) -- was not executing X at all
2013-11-25 13:22:40 +10:30
Andrew Bettison
45450386db
Improve sendto(2) failure diagnostics
...
In MDP client and server MDP overlay code
2013-11-22 13:12:29 +10:30
Andrew Bettison
3805650736
Use ssize_t for sendto(2) return value, not int
...
Also improve error checking on ssize_t values (use ==-1 not <0) test
and cast ssize_t to size_t for comparisons
2013-11-22 11:55:09 +10:30
Andrew Bettison
e92e7cb65e
Improve sendto(2) error log messages
2013-11-22 11:55:09 +10:30
Andrew Bettison
9ddcfb87aa
Fix output delimiter in "reverse lookup" command
2013-11-22 11:55:09 +10:30
Jeremy Lakeman
0085291ae6
Remove stop file last during server shutdown to allow database cleanup
2013-11-21 18:11:47 +10:30
Jeremy Lakeman
a13189e554
Fix printf formats
2013-11-21 18:11:47 +10:30
Andrew Bettison
67a724b29d
Fix Android compiler warnings ("%zd" and ssize_t)
...
Also squash some unconditional DEBUG statements
2013-11-21 17:32:58 +10:30
Andrew Bettison
702d22de99
Fix version_string.sh: check for .git directory was too early
2013-11-21 17:09:25 +10:30
Andrew Bettison
711364ad8d
Merge branch 'meshextender' into 'development'
2013-11-21 17:05:03 +10:30
Andrew Bettison
8c06881fa3
Fix compiler warning
2013-11-21 16:49:44 +10:30
gardners
003603b97c
minor tweaks to bash compatibility fixes.
2013-11-21 16:36:59 +10:30
gardners
22258b60c0
fixes and improvements to handling of git repo with no tags on branch.
2013-11-21 16:35:02 +10:30
Jeremy Lakeman
36bc5ff390
Fix string buffer overflow
2013-11-21 16:29:10 +10:30
Jeremy Lakeman
8a3ee79797
Fix printf format
2013-11-21 16:19:14 +10:30
Jeremy Lakeman
56e91518b8
Fix fetch insert assertion
2013-11-21 16:16:12 +10:30
Andrew Bettison
7564d529a1
Add missing copyright/license comment blocks
...
Update a few existing copyright notices to reflect recent work
2013-11-21 16:05:18 +10:30
Andrew Bettison
562e011847
Consolidate Rhizome string parsing functions
...
Remove unused rhizome_str[n]_is_...() functions in favour of
str[n]_to_rhizome_..._t() functions
Ensure that all str_to_..._t() functions accept a NULL 'dst' pointer
so they can be used easily to validate strings
2013-11-21 16:05:18 +10:30
Andrew Bettison
c2b9f75fcc
Deprecate RHIZOME_MANIFEST_ID_... in favour of RHIZOME_BUNDLE_ID_...
2013-11-21 16:05:17 +10:30
Andrew Bettison
92253ca97d
Revive config_test.c
...
Move config-dependent code (recvwithttl) from net.c to mdp_net.c (new)
Move log-implementation-independent code from log.c to log_util.c (new)
Build config_test binary in Makefile
2013-11-21 16:05:17 +10:30
Andrew Bettison
513aa15968
Finish HTTP /restful/rhizome/newsince/... test case
...
Uses new test framework fork support
2013-11-20 15:06:58 +10:30
Andrew Bettison
a882b8ebc6
Fix Rhizome Direct stress test - longer command timeouts
...
Since a default timeout was added to the execute() primitive
(b1b5a79
) the Rhizome Direct test fails.
2013-11-20 15:06:07 +10:30
Andrew Bettison
874a3a9ef7
Improve test framework: shell backtraces
...
When in a the finalise part of a test (possibly as a result of a
failure or error), make sure that shell backtraces do not list the
test case functions that failed, since they have already been
reported in a backtrace at the point of failure
2013-11-20 15:03:48 +10:30
Andrew Bettison
c5014baf62
Improve test framework: better fork functions
...
Replace forkKillAll with fork_terminate_all
Replace forkWaitAll with fork_wait_all
Add fork_terminate and fork_wait functions
Introduce fork labels '%<alphanumeric>' as arguments to all fork
functions
Treat a forked process exit status 143 (killed with SIGTERM) as a
failure or error -- it happens when a forked process is terminated
using fork_terminate or fork_terminate_all
2013-11-20 15:01:37 +10:30
Andrew Bettison
29fab6dcb7
Add 'rhizome.api.restful.newsince_poll_ms' config option
2013-11-20 14:50:57 +10:30
Andrew Bettison
833466411c
Test case for HTTP /restful/rhizome/newsince/...
...
Not passing yet
2013-11-19 17:28:04 +10:30
Andrew Bettison
8ca34749de
Improve test framework: slightly clearer logging
2013-11-19 17:27:25 +10:30
Andrew Bettison
6e4acb6ab9
HTTP /restful/rhizome/newsince/... token validation
...
Ensure that token has the same UUID as the Rhizome database.
2013-11-19 16:56:24 +10:30
Andrew Bettison
fce0893173
Implement HTTP /restful/rhizome/newsince/.../bundlelist.json
...
Now functions as per requirements, blocks for 60 seconds sending
new bundles as they appear, sends new token with each new bundle.
Tested manually.
2013-11-19 15:43:51 +10:30
Andrew Bettison
21b10b2cb7
Rhizome list cursor 'rowid_since' semantics
...
Setting 'rowid_since' now causes the cursor to iterate over bundles
in chronological order (oldest first) from that rowid upward.
2013-11-19 15:41:12 +10:30
Andrew Bettison
1acfff6ab5
Add HTTP server pause response function
2013-11-19 15:38:45 +10:30
Andrew Bettison
2c07f7888e
Improve 'debug.io' fdqueue.c debug logging
2013-11-19 15:37:18 +10:30
Andrew Bettison
cb7b465888
Reduce Rhizome SQL trace logging to once per prepared statement
2013-11-18 16:24:03 +10:30
Andrew Bettison
c1f0c0cb07
Implement HTTP /restful/rhizome/newsince/.../bundlelist.json
...
Not tested
2013-11-18 16:23:27 +10:30
Andrew Bettison
27052384ed
Add Base64URL encode/decode functions
2013-11-18 16:22:55 +10:30
Andrew Bettison
f8f7716544
Improve HTTP /restful/rhizome/bundlelist.json token
...
Now tokens are included in each row instead of a single token in the
enclosing JSON object. Only puts tokens on the first row, and
thereafter all rows with a rowid higher than for the previous row that
had a token.
2013-11-18 15:10:28 +10:30
Andrew Bettison
fb46ae0289
Encode HTTP /restful/rhizome/bundlelist.json token in Base64
2013-11-18 11:40:34 +10:30
Andrew Bettison
e59a62115b
Add base64_encodev() multi-buffer Base64 encoder
...
Also replace base64_encode_len() inline function with macro
BASE64_ENCODED_LEN()
2013-11-18 11:39:23 +10:30
Andrew Bettison
b8e0859880
Fix off-by-one buffer size errors when using tohex()
2013-11-15 17:10:33 +10:30
Andrew Bettison
f2b652c094
Refactor Base64 decoding from HTTP server to str.c
...
Also add a Base64 encoding function, not tested yet
2013-11-15 17:09:55 +10:30
Andrew Bettison
4fd94783d3
Refactor URI character class functions
...
To use array lookup instead of boolean OR expressions
2013-11-15 11:19:51 +10:30
Andrew Bettison
9418f9d65d
Refactor HTTP string utils into str.[hc]
...
Improve "str.h" layout and commenting. Re-implement hexvalue().
2013-11-14 23:13:37 +10:30
Andrew Bettison
973bb9c897
Merge branch 'naf4' into 'development'
2013-11-13 17:59:01 +10:30
Andrew Bettison
4380fdcccd
Token in /restful/rhizome/bundlelist.json output
2013-11-13 16:58:28 +10:30
Andrew Bettison
a14326deeb
Log SQLite PRAGMA statements as well
2013-11-13 12:45:32 +10:30
Andrew Bettison
1634d68dd0
Format UUID strings as lower case hex
2013-11-13 12:45:02 +10:30
Andrew Bettison
64db53a092
Add random UUID to Rhizome database
2013-11-13 12:44:31 +10:30
Jeremy Lakeman
21b123212c
Merge branch 'naf5' into development
2013-11-13 12:32:55 +10:30