Commit Graph

1863 Commits

Author SHA1 Message Date
Andrew Bettison
71ed78e058 Make all 'config' tests pass
Change a test case: configuration options are now case sensitive.

Fix config file load and parse logic in conf.c, always copy 'debug' flags
from config.debug.

The config schema 'interfaces' option is no longer MANDATORY.

Introduce new CLIFLAG_PERMISSIVE_CONFIG to supress bad-config ERROR messages
from the 'config set' and 'config get' commands.

Refactor cli_execute() into cli_parse() and cli_invoke().  Use *const* struct
command_line_option everywhere.
2012-12-04 16:52:49 +10:30
Jeremy Lakeman
6a5efcc445 Remove buggy debug code 2012-12-04 16:50:27 +10:30
gardners
f827c7c1c8 fixed various problems following split of files into fileblobs 2012-12-04 16:47:45 +10:30
Jeremy Lakeman
1dcbb28b61 Send rhizome mdp data unicast if required 2012-12-04 16:38:18 +10:30
Jeremy Lakeman
33e44ed6be Don't unwatch if the file descriptor is already closed 2012-12-04 16:30:01 +10:30
Jeremy Lakeman
55cad42932 Make sure the buffer for cryptobox doesn't move 2012-12-04 16:19:50 +10:30
gardners
6dfe654ab0 adjusted tuning of Rhizome over MDP to use 32x1KB packets for
better throughput.  Still sub-optimal for wired ethernet type
interfaces, but should be ok for WiFi where max broadcast throughput
is 100kb/sec.
2012-12-04 16:19:22 +10:30
gardners
3ace113be1 fixed error in orphan file cleanup sql statement. 2012-12-04 16:19:01 +10:30
Jeremy Lakeman
bd83c192bb Use consistent length constant 2012-12-04 16:18:51 +10:30
gardners
de7ff09930 fixed bug where disabling Rhizome over MDP server also disabled
client functionality.
2012-12-04 16:10:17 +10:30
gardners
fc0c134cbf added speed indication on completion of rhizome transfer.
split files table into files and fileblobs to avoid pathological
delays when updating datavalid flag in files table (sqlite copies
the whole table row, including possibly large blob).
2012-12-04 16:03:56 +10:30
Jeremy Lakeman
10ce16e1f3 Fix reading port number 2012-12-04 15:53:32 +10:30
Jeremy Lakeman
abd804dd0c Remove packetformats again 2012-12-04 15:09:01 +10:30
Jeremy Lakeman
5c7eb4a594 Add unicast probe packets
Probe directory service instead of assuming that it is always reachable
Fix directory service and routing tests
2012-12-04 14:47:57 +10:30
Andrew Bettison
caa209fc1d Integrate new config into servald
Not passing any tests yet, but compiles and links and simple uses do not
SEGV.
2012-12-04 14:12:28 +10:30
gardners
23cace8455 removed writing temporary file for debugging. 2012-12-04 13:49:47 +10:30
gardners
1a12f81474 Merge branch 'master' into rhizomeovermdp 2012-12-04 11:23:31 +10:30
gardners
6179240874 enable overriding default instance path at configure time. 2012-12-04 11:23:03 +10:30
Andrew Bettison
d3c2205d44 Add os.c and "os.h", replacing mkdirs.c
The new header "os.h" defines a supplemental API around existing basic
operating system services (system calls and standard library functions).

Moved some function prototypes from serval.h and net.h into os.h.

This allows non-servald executables to take advantage of this API without
having to include serval.h and bringing in all the other servald link-time
baggage.
2012-12-04 10:12:35 +10:30
Andrew Bettison
5139d8d34d Add mem.c and "mem.h" with emalloc() etc. 2012-12-04 10:03:32 +10:30
Andrew Bettison
f995a2a42d More strbuf helper functions
strbuf_append_argv()

strbuf_path_join()
2012-12-04 09:47:39 +10:30
gardners
2e4e111764 fixed bug that prevented remaining rhizome tests from passing. 2012-12-04 08:50:00 +10:30
gardners
a7e09aac2c fixed scheduling bug that stopped rhizomeprotocol tests 1 and 3. 2012-12-04 08:30:58 +10:30
gardners
254b0a4fd6 fixed problem with rhizome over http (alarm without callback
specified).
2012-12-04 07:12:03 +10:30
gardners
fcd5142aaf fixed bug with streaming to database of rhizome fetches. 2012-12-04 06:56:10 +10:30
gardners
a433f06530 fixed typo in updated DELETE statement. 2012-12-04 06:27:39 +10:30
gardners
abcac03981 work on tracking down hash calculation bug for files > one
window long.
2012-12-04 06:26:44 +10:30
gardners
43316ade3a added buffer when streaming to database so that we don't waste
most of our time opening and closing blobs, and don't have to keep
the blob open all the time.
2012-12-03 21:47:02 +10:30
gardners
de7a4ce2e3 fixed bugs with rhizome streaming direct to database.
that now works, but rhizome direct pull now fails.
2012-12-03 20:51:14 +10:30
gardners
e108fe0822 fixed bug in handling of sqlite3_blob_write(). Still more to fix. 2012-12-03 17:10:39 +10:30
gardners
adda5b5571 fixed bug when dropping incomplete file fetch row. 2012-12-03 17:10:21 +10:30
gardners
5d24ba7db9 first cut at progressive hashing and checking of hash when streaming
file into database via rhizome.
2012-12-03 17:05:12 +10:30
gardners
e08593b466 stream manifest to buffer, and files to blob in database instead
of via files.
NOT COMPLETE - needs to calculate progressive hash and decide
if file is ok at end of import.
2012-12-03 16:52:08 +10:30
gardners
b39c71b206 factor out code for creating empty blob for inserting file into. 2012-12-03 16:19:01 +10:30
Jeremy Lakeman
2b21a691ca Merge remote-tracking branch 'origin/master' into packet_format
Conflicts:
	constants.h
	packetformats.c
2012-12-03 14:10:32 +10:30
Jeremy Lakeman
a67e4114a8 Allow for payloads with a pre-determined destination 2012-12-03 13:44:31 +10:30
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