Commit Graph

54 Commits

Author SHA1 Message Date
gardners
8161709c4e work on fixing handling of duplicate rhizome bundle debouncing.
(seems to work from command line, but not from the test framework).
2012-05-26 11:36:18 +02:00
gardners
b0dca7e03f merged in latest changes from team. 2012-05-26 11:36:18 +02:00
Andrew Bettison
d215d90b40 Refactored some rhizome db SQL code
Added sqlite_exec_void() function, so that sqlite_exec_int64() can return
an error if no rows are found instead of 0, which can be misleading.
2012-05-25 19:42:45 +09:30
Andrew Bettison
bea9188cd5 Fix another manifest leak
Add manifest alloc/free debug logging to help, 'debug.manifests' option
2012-05-25 17:01:56 +09:30
Andrew Bettison
49aec4d331 Improve rhizome manifest debugging
Move rhizome_new_manifest() out of rhizome_read_manifest_file() so that the
out-of-manifest report shows the names of the functions where the manifests
were really allocated.
2012-05-25 15:38:13 +09:30
Andrew Bettison
c0ac693957 Remove old payload when updating a manifest with a new payload 2012-05-25 14:29:55 +09:30
Andrew Bettison
fa26b53294 Fix SEGV bug
rhizome_write_manifest_file() was not checking for NULL fopen() result
Standardise rhizome "import" directory pathname handling
2012-05-24 11:28:32 +09:30
Andrew Bettison
1af9125392 All rhizome database keys are uppercase hex
FILES.id, MANIFESTS.id, FILEMANIFESTS.fileid, FILEMANIFESTS.manifestid
Named constants for hex and binary ID sizes
2012-05-23 16:04:00 +09:30
gardners
e3387fbecf periodic sucking in from rhizome prioritised list now works. 2012-05-22 15:57:18 +09:30
gardners
f528110257 almost have priority pre-listing of bundles for rhizome working. 2012-05-22 15:57:18 +09:30
gardners
0abc7ff96e added code to create and maintain priority download list for
rhizome, so that we get things in a sensible order.
2012-05-22 15:57:18 +09:30
gardners
8e9396419c adding ignored manifest list to let us ignore repeated offerings
of broken manifests without wasting effort.
2012-05-22 14:15:35 +09:30
gardners
29bb86d9e7 first cut at supressing rhizome activity during calls. 2012-05-22 13:05:29 +09:30
Andrew Bettison
e6575cb369 Introduce macro constants for Rhizome service names
Use "MeshMS1" instead of "MeshMS"... version 2 won't be far away
2012-05-20 16:07:22 +09:30
Andrew Bettison
33f7ea7103 Add three optional args to "rhizome list" command
service, sender_sid, recipient_sid - not yet implemented
2012-05-16 13:47:58 +09:30
gardners
0eafc34970 BK encoding and decoding complete, but untested. 2012-05-15 20:04:41 +09:30
gardners
525d3c4154 substantial work towards implementing BK field in rhizome manifests. 2012-05-15 17:24:25 +09:30
Andrew Bettison
f90b21ec78 Implement rhizome config options
rhizome.datastore_path - if not set, reverts to serval instance path
rhizome.enable - if not set, defaults to true
2012-05-15 12:56:10 +09:30
Andrew Bettison
b02e9b9ac4 Overhaul rhizome datastore path code
Create datastore directory and all parent dirs if it does not exist
More robust error checking and buffer overflow protection
New mkdirs() and mkdirsn() functions
2012-05-14 18:37:32 +09:30
gardners
0b5a9665b2 first cut code for sending monitor socket announcements when
rhizome bundles are received.
2012-05-12 07:24:52 +09:30
Andrew Bettison
7ba15ccdd7 Add "rhizome extract file" command with tests 2012-05-02 17:57:35 +09:30
Andrew Bettison
146eb7cdfd Add "rhizome extract manifest" command 2012-05-02 16:03:09 +09:30
Andrew Bettison
a73916e85a Implement JNI command-line interface (untested)
- argv is (const char *const *) everywhere, to avoid having to strdup() all the
  Java arg strings
- changed (char*) to (const char*) in lots of places to fix cascading compiler
  warnings as a result of argv constness
- fixed a bug in "config get" command when used without 'variable' arg
2012-04-23 17:18:15 +09:30
Andrew Bettison
de88d3db21 Make "dna rhizome add" work for more test cases
- adding a bundle using an existing manifest with an incorrect payload should
   fail with an error
 - adding a bundle using an existing manifest to update the payload to a new
   version should succeed
 - improve format of "dna rhizome list" output to one bundle per line
2012-04-13 18:03:19 +09:30
Andrew Bettison
7b53fd6782 Rhizome add does not add duplicate files
- If a bundle has the same payload hash and manifest.name as one already in
   the rhizome store, then the "dna rhizome add" command will not add it
 - Now passes fourth test case in tests/dna_rhizome
2012-04-12 18:33:43 +09:30
Andrew Bettison
f52db7f406 Fix bugs revealed by rhizome "add manifest" test case 2012-04-10 18:13:05 +09:30
Andrew Bettison
74986a0c30 Implement "rhizome add file" and "rhizome list" 2012-04-02 17:42:40 +09:30
Daniel O'Connor
a8411edf3f - Use system wide sqlite3 lib via pkg-config
- Remove nacl-gcc-prep, it's now in nacl
- Sort sources and have 1 per line.
- Add missing source files.
- Use naclinc.txt and nacllib.txt generated by nacl/nacl-gcc-prep
- Update ignore file now nacl files don't pollute this directory.
2012-02-27 12:41:48 +10:30
gardners
8a24fb95b1 Converted manifest storage to using static set of manifest structures
and added manifest leak detection and some other memory corruption
protections.
2012-01-28 11:45:45 +10:30
gardners
45e8d68522 Added a manifest:version cache to avoid database lookups when being
offered manifests, thus saving cpu/energy.
2012-01-27 17:11:18 +10:30
gardners
c0676fd530 Fixed various bugs and memory leaks in rhizome file fetching.
Now successfully fetches manifests for files we already have in
the database, using the existing database copy of the file.
Also added filter to stop same file being fetched more than once at
same time..
2012-01-27 16:21:48 +10:30
gardners
cdf1c45da4 Rhizome fetching over http now receives files and imports them.
Still some wrinkles to work out.
2012-01-13 21:13:17 +10:30
gardners
f862ba0af6 Rhizome file transfer via http getting close
(send side needs to send file body)
2012-01-13 17:21:06 +10:30
gardners
bf9f8559f1 Various debug fiddles and conversion from select() to poll()
(although poll() still doesn't let us monitor ordinary files
which is silly.)
2012-01-12 16:47:24 +10:30
gardners
42b5c08321 Refactored rhizome.c into several smaller files.
Manifests are now gleaned from advertisements, and the ones that
are interesting are scheduled for importing into database.
(actual importing is not yet done -- requires fetching of file).
2012-01-12 14:05:05 +10:30
gardners
4e6ef2e69e Various fixes to Rhizome web server and BAR generation.
Can now present a set of BARs via HTTP.
2012-01-03 16:35:02 +10:30
gardners
6231e8784c Added ability to de-hex result rows when streaming results of sql
query.
2012-01-03 14:54:32 +10:30
gardners
c380ab0450 More work on rhizome web server.
Can now serve lists of manifest/file IDs.
2012-01-03 14:45:50 +10:30
gardners
9c8ea5908c Various fixes towards working internal web server. 2012-01-03 08:57:52 +10:30
gardners
d29efac21f More work on getting Rhizome web server working.
Can now produce parsable http responses as well as parse requests.
Now to actually implement some of the requests ...
2011-12-29 10:11:03 +10:30
gardners
ccf26e1fe0 Rhizome web server can now serve a 400 error message, which means
that lots of the underlying stuff is now in place.
2011-12-23 04:25:18 +10:30
gardners
16fb3a3f61 Added missing GPL license statements. 2011-12-21 20:25:05 +10:30
gardners
cbd0cf6117 Began work on rhizome integrated web server. 2011-12-21 16:28:08 +10:30
gardners
b7b795d4fc manifest reading now reads and can verify signatures.
Still incomplete. Doesn't yet count verify errors etc.
2011-12-21 07:46:12 +10:30
gardners
a159edf152 updating manifests now correctly removes old files and old
versions of the manifest.
group subscriptions not yet implemented, and reading of signatures
not yet implemented.  Controls on group membership and pushing files
to groups not yet implemented.  Group ciphers not yet implemented.
2011-12-20 22:09:49 +10:30
gardners
745cade469 Further work on getting signatures and signed manifests working.
Some work on updating existing manifests, although some cascading
consequences need addressing (in particular checking if the file
associated with the old version of the manifest still needs to hang
about, and if so, whether its highest priority has changed).
2011-12-20 17:27:24 +10:30
gardners
cc09a0f994 Some database schema tweaks and additional checks on manifests when
importing (we now need to have either the key for the manifest, or to
be creating the manifest).
2011-12-20 15:48:26 +10:30
gardners
a50c56ac92 Importing of a bundle into the database now seems to work.
(group membership not currently handled, signing not currently
handled).
2011-12-20 13:24:09 +10:30
gardners
312eaa397b Significant progress on Rhizome.
Manifest reading and writing to disk (not database) seems okay now.
Working on database side of things next.
2011-12-20 11:25:52 +10:30
gardners
17f0b5da10 Moved BYTE_ORDER definition to Android.mk 2011-12-19 09:01:03 +10:30