gardners
0207d8e541
added cursor limit pickling, restoration functions. cursor
...
functions now try to honour these. Not yet tested. #9
2012-09-09 08:30:38 +09:30
gardners
53228f078e
rhizome direct now has a cursor function to iterate through all
...
bundles in the rhizome database in an appropriate priority order
(currently small before big). #9
2012-09-08 20:26:18 +09:30
gardners
3e4b20f5df
rhizome_direct_get_bars() now allows selections to be based on
...
size of associated data in a bundle, so that we can synchronise
small things first. Also preliminary work on making a general
cursor-type wrapper function for get_bars() so that it is easy
for any rhizome direct transport driver to iterate over the
known bundles in a rhizome datastore. #9
2012-09-08 20:00:14 +09:30
gardners
b13c23de6a
rhizome_direct_get_bars() now sets bid_high correctly. #9
2012-09-08 09:35:58 +09:30
gardners
89b09563a3
Wrote function to get a range of BARs from the Rhizome database
...
for use in Rhizome Direct synchronisation requests. #9
2012-09-08 07:55:57 +09:30
gardners
446adaa868
Added note regarding new architecture to existing comment. #1
2012-09-08 07:55:32 +09:30
gardners
6d725535f9
starting work on the actual synchronisation code for rhizome direct.
2012-09-07 22:53:16 +09:30
gardners
5aa4c8bb82
added rhizome import via http post test. #9
2012-09-06 16:29:39 +09:30
gardners
d3f5c6e598
Merged rhizome direct httpd back into main rhizome httpd server.
...
bundles can be imported via HTTP POST multi-part form. #9
2012-09-06 13:21:13 +09:30
gardners
f9a29645a8
prevent double-processing of form when fully received.
...
add actual call to servald rhizome import bundle.
seems to work, though yet to be tested with a genuine bundle. #9
2012-09-06 07:52:12 +09:30
gardners
d342e7b0d2
Added multipart form end processing stage. Now has place holder
...
for calling rhizome import. #9
2012-09-06 07:34:53 +09:30
gardners
edf99e9be3
implemented removal of extraneous CRLF from end of each form field
...
file. #9
2012-09-06 07:15:52 +09:30
gardners
2d9a620352
removed fclose() for form field file from other code paths, so
...
that there is only one path. This is where we will add the 2
byte rewind that our parser requires.
2012-09-06 07:11:09 +09:30
gardners
95f2bc273e
fixed bug with boundary line handling that prevented end of form
...
from being detected. #9
2012-09-06 07:08:10 +09:30
gardners
b51a7b2dbf
more work on parser. Now writes field files, but fails to detect
...
the boundary string at the end of the form. #9
2012-09-06 06:59:26 +09:30
gardners
3dad0798a4
further work on multipart POST form parser. Now does almost
...
everything except actually write manifest and data to files
for importing. #9
2012-09-06 06:29:05 +09:30
gardners
6aca69a54f
Further work on multi-part POST parser. Simple state machine
...
partially implemented that recognises the field elements being
submitted and complains if they are wrong. #9
2012-09-06 06:09:38 +09:30
gardners
dc15ac5a34
Make simple http response clear request type so that it always
...
works. #9
2012-09-06 06:09:16 +09:30
gardners
f3662c0d04
fixed CRLF handling in multi-part POST parser so that CRLF
...
presence is not forgotten. #9
2012-09-06 05:49:43 +09:30
gardners
9d7507c8b5
Fixed byte munching bug in multi-part post parser. Also removed
...
need for any parser look-ahead, i.e., it is now LALR(1), and well
suited to parsing streaming data. #9
2012-09-06 05:43:29 +09:30
gardners
35ec3bae0d
revamped multi-part form parser to tokenise into lines. This
...
feels like a much simpler and cleaner design. Still more to do. #9
2012-09-06 05:34:25 +09:30
gardners
db79190c81
more work on multi-part POST form data parser. #9
2012-09-06 05:15:25 +09:30
gardners
ecbe8e4f8c
improve HTTP server response code handling, including fixing
...
iching calculator bug - unknown response codes not more than four
no longer result in "a suffusion of yellow".
Also stopped dropping HTTP requests on empty reads when parsing
a multi-part POST.
2012-09-05 16:35:08 +09:30
gardners
95f59ab7b0
Fixed handling of multi-part form POST requests (removed HTTP
...
response stub that was causing instakill of such requests).
2012-09-05 16:02:39 +09:30
gardners
4cab16598c
added code to rhizome http request client poll routine to call
...
multi-part form data parser.
2012-09-05 15:53:16 +09:30
gardners
e73f0262c7
Added prototype for HTTP multi-part post parser for rhizome direct.
2012-09-05 15:51:22 +09:30
gardners
ed7edd3865
Added boundarystring field to rhizome_http_request structure.
...
Added call to new (currently stub) function for processing bytes
received from a HTTP POST multipart encoded form. #9
2012-09-01 14:11:23 +09:30
gardners
8170df7447
added extra field to rhizome http request structure and update
...
rhizome direct code to remember the path in a multipart form post
operation, and also the boundary string that will separate the
parts.
2012-08-31 13:15:05 +09:30
gardners
211f75cb53
Added initial parsing of POST requests, extracting content-length
...
and content-type, and complaining if they aren't in the format we
expect. #9
2012-08-31 13:01:29 +09:30
gardners
0a7c633977
swapped arg order to what seemed a more sensible order. #9
2012-08-31 13:01:29 +09:30
gardners
fb82043246
added str_str() to help parse http POST requests for rhizome direct. #9
2012-08-31 13:01:29 +09:30
gardners
389ae8e989
added skeleton HTTP request parser for rhizome direct.
...
Doesn't know how to do POST yet, which is needed for all rhizome
direct operations. #9
2012-08-31 13:01:29 +09:30
gardners
9d2aa61792
Refactoring of Rhizome http server code so that we can supply a
...
different request parser, but otherwise share code between
rhizome transfers and rhizome direct. #9
2012-08-31 13:01:28 +09:30
gardners
bde9d1c56a
Rhizome http server now allows specification of client socket callback
...
when starting, so that same server code can be shared for rhizome transfers
and rhizome direct. #9
2012-08-31 13:01:28 +09:30
gardners
2b29893a02
Initial work towards rhizome direct syncrhonisation functions #9
2012-08-31 12:58:37 +09:30
Andrew Bettison
420add0f4b
Merge branch 'master' into rhizomedirect
2012-08-30 09:38:19 +09:30
Andrew Bettison
9149c80297
Improve test framework: assert '!' command...
...
The assert command now supports leading '!' args in its command, each negating
the sense of the following command.
2012-08-30 09:33:15 +09:30
Andrew Bettison
b3f9e437b3
Issue #9 , add test case for local HTTP add
2012-08-27 17:57:41 +09:30
Andrew Bettison
41680ff663
Move functions from testdefs.sh to testdefs_rhizome.sh
...
... where they should have been in the first place.
Also, clean up the RHIZOME HTTP SERVER START log message.
Issue #9 .
2012-08-27 17:07:44 +09:30
gardners
bae2e2e4c2
Updated non-Android build process to work again (sqlite3 include path fixed,
...
also improved so that sqlite3.c doesn't need to exist as a symlink to the
real file).
2012-08-27 17:03:50 +09:30
Andrew Bettison
f93e32b4bc
Add 'rhizomeprotocol' tests for push, pull, sync
...
See issue #9 .
These commands are not yet implemented, so of course the new
tests fail.
2012-08-27 16:29:46 +09:30
Andrew Bettison
00c9c540f5
DNA helper treat poll(2) POLLNVAL like POLLERR
...
Fixes #5 , test cases failing on Mac OS X
2012-08-27 13:03:13 +09:30
Andrew Bettison
60d84817bf
Add WARNF_perror() macro
2012-08-27 13:03:13 +09:30
Daniel O'Connor
19dd10b1cc
Log the address & port of the sender of a broken Rhizome packet.
2012-08-27 12:11:06 +09:30
Daniel O'Connor
00b350aeb1
Add a note about why we aren't using SIPS/ZRTP.
2012-08-27 11:28:06 +09:30
Andrew Bettison
30e21810e4
Improve dnahelper diagnostics to investigate issue #5
2012-08-27 11:19:59 +09:30
Andrew Bettison
836a6d9b6a
Issue #5 , fix one failing test, two to go
...
On Max OS X, /bin/sh does not support echo -n option, but /bin/bash does
2012-08-24 18:40:30 +09:30
Andrew Bettison
25fbd6ffe0
Improve test framework: colours on Max OS X
...
Fixes #7 .
2012-08-24 16:30:41 +09:30
Andrew Bettison
3a6b424c2d
Fix test framework: job tracking on Mac OS X
...
Caused by difference in basic regular expressions supported by sed(1) on Mac
and on Linux: Mac does not support the \+ repeater, have to use \{1,\} instead.
2012-08-24 16:02:21 +09:30
Andrew Bettison
3f1e0dd763
Finish sleep-retry on locked Rhizome db
...
Closes #2 .
Rewrite all Rhizome db query code using new retry primitives defined in
"rhizome.h": sqlite_step_retry(), sqlite_retry(), sqlite_retry_done(), etc.
Replace all calls to sqlite3_prepare_v2() with sqlite_prepare() which does
proper error logging.
Fix bug: re-invoking sqlite3_blob_close() on SQLITE_BUSY return causes process
to abort. Use an explicit BEGIN...COMMIT around the blob writing code instead.
Tested using repeated invocations of batphone/tests/meshms1.
Delete deprecated Rhizome db code in rhizome_crypto.c that has been replaced
with keyring file.
2012-08-24 15:38:39 +09:30