Commit Graph

1877 Commits

Author SHA1 Message Date
gardners
3e7e29f5f5 improve handling of incomplete files in rhizome database (clean
all out on start up, but only clean out specific ones when inserting).
2012-12-03 12:20:50 +10:30
gardners
7ec695c940 feedback from code review by Jeremy.
Some preparation for out-of-order handling.
Consolidated redundantly redundant fields in fetch slot structure.
Probably fixed spurious alarm bug.
2012-12-03 11:50:35 +10:30
gardners
7b4b9dbf81 improved test coverage for Rhizome over MDP, and made testing
of MDP vs HTTP more explicit for an existing test case.
2012-12-01 10:56:48 +10:30
gardners
115736f0a4 cleaned out excess debugging messages and upped block size from
200 bytes to 1KB to greatly improve throughput.  Will eventually
want to make block size selection be based on network interface.
2012-12-01 10:52:08 +10:30
gardners
b7ae55c143 receiving multiple bundles via rhizome over mdp works now, although
there is a bug with alarms being called on fetch slots after they
complete, even though they apparently get unscheduled.
2012-12-01 10:47:19 +10:30
gardners
55df66f6d6 culled some debug output.
mostly works, but fetch slots can get muddled.
2012-12-01 07:43:18 +10:30
gardners
ac734ff00d fixed bugs with rhizome over mdp receive for files >32*200 bytes
long.  also we request next block of data immediately after
receiving all of the previous block.
2012-12-01 07:37:22 +10:30
gardners
21f562122e added test for rhizome over mdp for a big file, to make sure that
timeout handling works properly.
2012-11-30 22:57:34 +10:30
gardners
7e6d836627 remember to update timeout when storing data via rhizome mdp. 2012-11-30 22:55:10 +10:30
gardners
41261bf122 gadzooks, rhizome over mdp appears to work. 2012-11-30 22:45:27 +10:30
gardners
dbb1fe8d1e rhizome over mdp now writes content for in-order packets, and
import gets triggered, but file hash currently doesn't match.
2012-11-30 22:42:28 +10:30
gardners
79c90dde6e now rhizome mdp replies get parsed and the appropriate slot, if
any, is located.
2012-11-30 22:26:31 +10:30
gardners
ebbc8001cf fixed bug with sending data blocks (was sending packets for beyond
end of file).
2012-11-30 22:02:10 +10:30
gardners
94e8a4b676 fixed composition of rhizome over mdp reply packets. 2012-11-30 21:52:44 +10:30
gardners
1912f24da4 sending MDP Rhizome replies in response to requests now occurs,
and replies are received, but not yet parsed.
2012-11-30 21:50:17 +10:30
gardners
1be28246e4 we now pass bid+version in Rhizome over MDP block request. 2012-11-30 21:13:29 +10:30
gardners
0c7419da5d changed bar to bid in rhizome mdp fetch elements, because that
is probably the better way to address the content.  Should add
version to make sure.
2012-11-30 21:08:06 +10:30
gardners
979ca36ba6 fixed byte order bug in read routines. 2012-11-30 21:07:57 +10:30
gardners
692817ffba added functions for reading values from byte streams. 2012-11-30 21:02:43 +10:30
gardners
e5d5f3f750 fixed bugs with Rhizome over MDP requests. Now seems to output
a series of MDP block requests as it should.
2012-11-30 20:20:33 +10:30
gardners
11cce162dc fixed bugs with preparing Rhizome MDP packets (source sid was not
being set properly).
2012-11-30 20:06:47 +10:30
gardners
05745d9b9a same fix as previous commit, but in another place. 2012-11-30 20:03:53 +10:30
gardners
5becae0136 fixed segfault bug with obtaining own SID. 2012-11-30 20:03:18 +10:30
gardners
6c0e6ef1c2 added extra tests for Rhizome over HTTP and MDP transports.
HTTP transport works, MDP transport segfaults.  To be examined.
2012-11-30 17:42:17 +10:30
gardners
3c4abfb566 improved and simplified test for rhizome http not running 2012-11-30 15:06:31 +10:30
gardners
9e29db827f added test for correct function of rhizome.http.enable config
option.
2012-11-30 15:02:34 +10:30
gardners
b91e832ad7 added improved control of rhizome http and mdp servers via
separate config options with their own predicate functions.
2012-11-30 14:47:27 +10:30
Jeremy Lakeman
d5f78bcffe Rework reachable link flags for simpler bitmask tests 2012-11-30 14:38:09 +10:30
gardners
7a4e3d20f8 Actually send Rhizome over MDP request packets.
Actually call appropriate callback when receiving Rhizome over
MDP packets.
2012-11-30 14:17:05 +10:30
Andrew Bettison
4aac3637ed Improve new config code, SORTED and NO_DUPLICATE flags
Config Object Model parser now returns bitmask result of CFxxx flags and only
allocates root node if the config file is non-empty.

Added emalloc_zero().
2012-11-30 12:32:30 +10:30
gardners
eb7524e068 factored out internal MDP services into a separate file, and made
core case statement in that brief and clear.
2012-11-30 11:48:00 +10:30
gardners
a665750f4c prepare and dispatch mdp frames for rhizome over mdp.
still need to set bodies of frames, and schedule call backs,
and handle the requests when received.
2012-11-29 21:08:11 +10:30
gardners
c05ebada8c more work on rhizome over MDP. 2012-11-29 20:39:30 +10:30
Andrew Bettison
f42292ffc6 Refactor emalloc() etc. into mem.c/.h 2012-11-29 17:12:43 +10:30
Andrew Bettison
3686a4ade4 Improve new config code to use "log.h"
With all the __whence/__WHENCE__ goodness, ready for integration into servald.
2012-11-29 16:44:06 +10:30
gardners
629a36f041 call switch to mdp fetch if http request setup fails. 2012-11-29 16:43:19 +10:30
gardners
a07e5761c4 added code to try switching to mdp if http fetching fails for
any reason.
2012-11-29 16:15:51 +10:30
Andrew Bettison
f654d435b1 Rename some new config source and header files 2012-11-29 16:12:03 +10:30
Andrew Bettison
2853d346f1 Re-organise new config code some more
Split into several source .c files, leave throw-away code in config_test.c.
2012-11-29 16:07:34 +10:30
gardners
faad1f26b1 Pass SID as well as ip:port through rhizome fetch request logic.
This is in preparation for rhizome over MDP.
2012-11-29 15:38:04 +10:30
Andrew Bettison
32debf57ef Reorganise and rename new config code ready for integration 2012-11-29 14:33:32 +10:30
Andrew Bettison
fdb3249522 Improve toprint_str() function
If supplied string pointer is null, return "NULL" result instead of SEGV.
2012-11-29 14:32:43 +10:30
Andrew Bettison
23fff99fee Add remaining config options to new config schema 2012-11-29 13:21:12 +10:30
Andrew Bettison
b940ac8617 Improve new config prototype code
Sort ARRAYs if optional key comparison function is given in schema, no longer
the role of the validator function.
2012-11-29 11:48:01 +10:30
Andrew Bettison
e2f6989fe8 Improve new config prototype code
Rework ARRAYs, replacing label string with typed key, declaring KEY and VALUE
independently.

Implement dna.helper.argv array using key of type unsigned short.

Implement mdp.iftype.<interfacetype>.tick_ms using key of type short for the
interface type code.
2012-11-29 09:24:02 +10:30
Andrew Bettison
58bf0e1752 Improve new config prototype code
Add hosts.SIDHEX.{interface,network,port} config options.
2012-11-29 06:28:28 +10:30
Andrew Bettison
e7cda64190 Improve new config prototype code
The dna.helper.argv validation function now sorts the array in numerical order
of labels using qsort(3).

Add LABELLEN argument to ARRAY schema macros, to control the size of the
label[] string (was fixed at 41 chars before).
2012-11-29 05:47:52 +10:30
Andrew Bettison
c6b2efe396 Improve new config prototype code
Add monitor.socket and monitor.uid to schema.

Remove some deprecated warning functions.
2012-11-28 18:13:53 +10:30
Andrew Bettison
af6a912a1f Improve new config prototype code
Implement dna.helper.argv array label validation.

Ignore comment lines starting with '#'.
2012-11-28 17:54:19 +10:30
Jeremy Lakeman
053fa0d52f Reduce size of MDP port encoding 2012-11-28 15:45:14 +10:30