Fixed bug in new rhizome direct sync command line parsing.

Now works from command line.
Updated rhizomeprotocol rhizome direct tests, but these still
fail -- under investigation. #9
This commit is contained in:
gardners 2012-10-02 20:01:46 +09:30
parent d11109bca5
commit 13679ecb23
2 changed files with 11 additions and 14 deletions

View File

@ -498,8 +498,8 @@ int app_rhizome_direct_sync(int argc, const char *const *argv,
transport and allowable traffic volumes. */
rhizome_direct_transport_state_http
*state=calloc(sizeof(rhizome_direct_transport_state_http),1);
const char *sync_url=confValueGet("rhizome.direct.peer", NULL);
int peer_count=0;
const char *sync_url=NULL;
int peer_count=confValueGetInt64("rhizome.direct.peer.count",0);
int peer_number=0;
char peer_var[128];

View File

@ -286,11 +286,10 @@ setup_Push() {
}
test_Push() {
executeOk_servald rhizome direct push
tfw_cat --stderr
wait_until bundle_received_by $BID2 $VERSION2 +A
assert ! bundle_received_by $BID1 $VERSION1 +B
set_instance +A
assert_received file2 file1
assert bundle_received_by $BID1 $VERSION1 +B
assert ! bundle_received_by $BID2 $VERSION2 +A
set_instance +B
assert_received file1
}
doc_Pull="One way pull bundle from unconnected node"
@ -300,11 +299,10 @@ setup_Pull() {
}
test_Pull() {
executeOk_servald rhizome direct pull
tfw_cat --stderr
assert bundle_received_by $BID1 $VERSION1 +B
assert ! bundle_received_by $BID2 $VERSION2 +A
set_instance +B
assert_received file1
assert bundle_received_by $BID2 $VERSION2 +A
assert ! bundle_received_by $BID1 $VERSION1 +B
set_instance +A
assert_received file2
}
doc_Sync="Two-way sync bundles between unconnected nodes"
@ -313,8 +311,7 @@ setup_Sync() {
setup_sync
}
test_Sync() {
executeOk_servald rhizome direct sync
tfw_cat --stderr
executeOk_servald rhizome direct sync
assert bundle_received_by $BID2 $VERSION2 +A
assert bundle_received_by $BID1 $VERSION1 +B
set_instance +A