Commit Graph

2937 Commits

Author SHA1 Message Date
Jeremy Lakeman
844afcff0e Calculate golay parity regardless of CPU endian 2013-11-27 13:10:10 +10:30
Jeremy Lakeman
1b34c2dc13 Improve test reliability 2013-11-27 13:10:09 +10:30
Jeremy Lakeman
ad33264834 Rename mavlink to radio_link
- split link state from slip structures and encapsulate it completely
- allocate interface specific buffers on demand
2013-11-27 13:09:26 +10:30
Jeremy Lakeman
a77642fc9e Support for binding internal handlers to mdp ports 2013-11-27 13:08:43 +10:30
Jeremy Lakeman
0d5d878521 Refactor socket name and address length handling 2013-11-27 13:08:37 +10:30
Jeremy Lakeman
5ea19ab538 Better approximation of TDMA timing 2013-11-27 13:00:02 +10:30
Jeremy Lakeman
bea9d36411 Drop radio packets based on the probability of receiving the header 2013-11-27 13:00:01 +10:30
Jeremy Lakeman
6ec6a6c966 Fix printf formats 2013-11-27 12:59:52 +10:30
Andrew Bettison
46363db257 Format MDP port numbers as 0xXXXXXXXX 2013-11-26 17:44:49 +10:30
Andrew Bettison
e97e3db444 Silence unconditional DEBUG log message 2013-11-26 17:44:25 +10:30
Andrew Bettison
56349b962e Remove bogus ERROR messages from Batphone log
Improve overlay buffer primitives to eliminate bugus logged ERRORs
"ob_makespace() failed" and "could not append payload of N bytes" and
also add buffer overflow checks to more packet construction code.

Fix link state timing logic to eliminate logged ERROR "Alarm `link_send`
tried to schedule a deadline 1343871867115ms ago"

Improve debug logging of some MDP and dummy interface read/write code

Add 'debug.overlaybuffer' and 'debug.subscriber' config options
2013-11-26 15:44:16 +10:30
Andrew Bettison
fb39dd84ef Improve dummy file Read/Write debug logging 2013-11-26 15:33:54 +10:30
Andrew Bettison
39d6c4fc3a strbuf_append_sockaddr_in() 2013-11-26 15:33:54 +10:30
Andrew Bettison
851dbb4d64 Add 'debug.subscriber' config option
Add debug logging to find_subscriber() function
2013-11-26 15:33:54 +10:30
Andrew Bettison
59a6ded10c Update 'dnaprotocol' debug flags 2013-11-26 15:33:54 +10:30
Andrew Bettison
97ce07b76c Improve MDP debug logging 2013-11-26 15:33:54 +10:30
Andrew Bettison
1bb60fd8bc Add 'debug.overlaybuffer' logging
Instrument all ob_xxx() primitives with __whence
2013-11-26 15:33:54 +10:30
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