Commit Graph

3166 Commits

Author SHA1 Message Date
Jeremy Lakeman
51540a3017 Implement read and write pointer using memcpy, might fix #78 2014-07-07 16:28:20 +09:30
Jeremy Lakeman
20d6bdf317 Add Java API getter for servald binary path 2014-07-07 15:08:21 +09:30
Jeremy Lakeman
63226143ac Don't log an error when MDP fetch fails due to missing bundle 2014-07-07 11:31:09 +09:30
Jeremy Lakeman
096c9670ca Remember when we last verified each payload 2014-07-04 14:25:28 +09:30
Jeremy Lakeman
9395120b05 Fix off by one error in packet acknowledgment 2014-07-04 12:23:18 +09:30
Andrew Bettison
838f971850 Fix Makefile.in for OpenWRT build
Was not passing $(CFLAGS) $(DEFS) to compile servald_version.c, which
provoked a "cc1: note: someone does not honour COPTS correctly, passed 0
times" warning

Also was not doing "mkdir -p opts" before the compile, which produced an
"opts/version.o: No such file or directory: error
2014-07-02 10:09:13 +09:30
Jeremy Lakeman
c8b317b328 Fix sqlite compiler warnings, when building with gcc 2014-07-01 18:31:31 +09:30
Jeremy Lakeman
6f5160bf54 Don't return from server() as we can't guarentee that everything is cleaned up. 2014-06-30 22:37:55 +09:30
Jeremy Lakeman
8f3acce75f Remove dead code 2014-06-30 10:32:24 +09:30
Jeremy Lakeman
bdac56cdb4 Omit more features of sqlite, and fix warnings 2014-06-30 10:14:12 +09:30
Jeremy Lakeman
20af8a9477 Squelch info message that is occuring while fetching a journal bundle 2014-06-30 08:40:48 +09:30
Jeremy Lakeman
31dbfa4e58 Improve debug info for rhizome sync 2014-06-28 20:27:29 +09:30
Jeremy Lakeman
75d488b339 Add new debug flag to show what payloads are being included in network packets 2014-06-28 20:17:26 +09:30
Jeremy Lakeman
e862b42074 Fix is_interesting(bar) test 2014-06-28 20:11:43 +09:30
Jeremy Lakeman
58ea5a1c8b Simplify fetch decisions when manifest arrives 2014-06-28 17:41:05 +09:30
Jeremy Lakeman
588b95ab20 Ensure temporary id is unique 2014-06-28 17:36:06 +09:30
Jeremy Lakeman
b5bafe3c50 Sort timing details by duration then call count 2014-06-27 15:08:25 +09:30
Jeremy Lakeman
804cc93be6 Fix HTTP transfers of large payloads 2014-06-27 15:07:26 +09:30
Jeremy Lakeman
186b6cbc2f Allow more servald's to be running during tests 2014-06-27 12:46:29 +09:30
Jeremy Lakeman
537a09812c Ignore some types of sendto errors 2014-06-27 12:45:53 +09:30
Jeremy Lakeman
42a50e5c13 Reduce memory usage when there are no bars to fetch 2014-06-27 12:20:26 +09:30
Jeremy Lakeman
63f02607e6 Fix duplicate payload detection over unicast links 2014-06-26 17:20:06 +09:30
Jeremy Lakeman
a9545ea004 Display where packets came from in debug messages 2014-06-26 16:47:23 +09:30
Andrew Bettison
6c16b95a38 Fix SEGV on empty /restful/meshms/.../conversationlist.json 2014-06-26 15:08:48 +09:30
Andrew Bettison
776d4de894 Split up 'rhizomehttp' test script
New scripts 'rhizomerestful' and 'meshmsrestful'
New testdefs_json.sh
Improved testdefs.sh functions for discovering HTTP server port
2014-06-26 15:08:48 +09:30
Jeremy Lakeman
5df5a33721 Measure free space on Android using statfs() 2014-06-26 12:17:36 +09:30
Jeremy Lakeman
82b13caac4 Deprecate JNI meshms interface 2014-06-25 12:52:47 +09:30
Jeremy Lakeman
2cdd2cec81 Use Long (int64) for meshms offsets 2014-06-25 12:52:25 +09:30
Andrew Bettison
660daf0438 Merge latest MeshMS Java API additions into 'development' 2014-06-24 15:10:16 +09:30
Andrew Bettison
c79a382a27 MeshMS Java API: mark messages as read 2014-06-24 12:12:48 +09:30
Andrew Bettison
7736a4ceb1 New HTTP RESTful requests: MeshMS read message(s) 2014-06-24 12:11:58 +09:30
Jeremy Lakeman
0cb68c98a3 Open the database immediately on config load 2014-06-23 15:31:26 +09:30
Jeremy Lakeman
7d86fcd573 Add java API wrapper for performing multiple config changes in one hit 2014-06-23 15:31:25 +09:30
Jeremy Lakeman
9f6ace518a Test that msp listen --service_name shuts down 2014-06-23 14:23:30 +09:30
Jeremy Lakeman
ca8f651b8d Cleanup the rhizome database every 30 minutes or so 2014-06-23 13:49:58 +09:30
Andrew Bettison
eba7f6555f MeshMS Java API: send message 2014-06-23 13:20:57 +09:30
Jeremy Lakeman
2ef73884a1 Add configurable limit to ensure a minimum amount of free space is preserved
- default to 100MB of free space
- currently disabled on android due to missing sys/statvfs.h
2014-06-23 13:06:21 +09:30
Andrew Bettison
819b8dc9e7 MeshMS RESTful API stricter on incoming form data
/restful/meshms/SID/SID/sendmessage now enforces Content-Disposition:
form-data (was ignoring), and enforces Content-Type: text/plain;
charset=utf-8 (was ignoring)

New negative test cases to ensure that these are treated strictly
2014-06-23 12:27:09 +09:30
Jeremy Lakeman
533c0be445 Rename mdp lookup helper function to match class name 2014-06-20 15:14:00 +09:30
Jeremy Lakeman
68dbaef38d Refactor Java API
Add stateful class to represent the state of the serval daemon, shifting some functions from BatPhone
Add convenience functions to get pre-configured MDP and HTTP Restful client classes
2014-06-20 10:55:09 +09:30
Jeremy Lakeman
47f051917d Rhizome cleanup will now expire payloads and vacuum the db file. 2014-06-19 14:23:43 +09:30
Andrew Bettison
f948f8e12e Include Java tests in 'tests/all' if Java compiler available 2014-06-19 11:38:39 +09:30
Andrew Bettison
b14c58bdf6 Merge NAF4 MeshMS Java API into development
Currently implements "list conversations" and "list messages"
2014-06-19 11:21:37 +09:30
Jeremy Lakeman
7ff89afcf4 Reinstate rhizome database storage limit
- old / large payloads should be evicted to fit more payloads
- if there isn't enough space, new payloads will not be added
2014-06-19 11:09:09 +09:30
Andrew Bettison
e9437e9a61 MeshMS Java API: list messages 2014-06-19 10:37:33 +09:30
Andrew Bettison
0a54414744 Refactor Java JSON parsing into JSONTokeniser 2014-06-19 09:55:12 +09:30
Andrew Bettison
9cbd7c365c MeshMS Java API: list conversations 2014-06-19 09:55:12 +09:30
Andrew Bettison
d879189299 Fix HTTP Authorization header parsing
Was returning status 500 if Authorization: Basic token was long, because
_reserve() did not have enough free space at start of buffer.  The
solution was to _commit(r) before attempting the _reserve_str() calls
for the decoded username and password.

As a separate issue, the status 500 also triggered an assertion failure
because http_request_parse_header() was returning 400 but
response.result_code had already been set to 500.
2014-06-19 09:55:12 +09:30
Andrew Bettison
f2772b0ce8 Refactor tests: testdefs_java.sh, testdefs_meshms.sh
meshms_add_messages() now puts message texts into TEXT[$n] array
instead of "text$n" files
2014-06-19 09:54:29 +09:30
Andrew Bettison
4fbaf8865a Improve test framework: create_file
create_file '-' sends to standard output
create_file --label=LABEL
create_file passes other options to tfw_createfile
2014-06-19 09:52:17 +09:30