test(member-files): let transfer own initial route request
This commit is contained in:
1 parent
27dd9e7b60
commit
e59ef240e8
1 file changed
+4
-3
@@ -251,9 +251,10 @@ static void tick(void* arg) {
|
||||
struct ETCP_ROUTER_CONN* route = etcp_router_conn_get(t->nodes[AUTHOR], GROUP, t->ids[SERVER], ETCP_RT_ID_MEMBER_FILES);
|
||||
if (route->inflight_q->count > t->peak_inflight) t->peak_inflight = route->inflight_q->count;
|
||||
if (t->phase == 0) {
|
||||
int a = etcp_router_get_path(t->nodes[AUTHOR], GROUP, t->ids[SERVER], ETCP_RT_ID_MEMBER_FILES).next_hop_node_id != 0;
|
||||
int b = etcp_router_get_path(t->nodes[READER], GROUP, t->ids[SERVER], ETCP_RT_ID_MEMBER_FILES).next_hop_node_id != 0;
|
||||
if (a && b && t->nodes[SERVER]->member_files->storage_status == MF_OK) { t->phase = 1; transfer(t, 1, 1); }
|
||||
if (t->nodes[SERVER]->member_files->storage_status == MF_OK) {
|
||||
DEBUG_INFO(DEBUG_CATEGORY_MEDIA, "member_files test: storage ready; upload creates its own CM route request");
|
||||
t->phase = 1; transfer(t, 1, 1);
|
||||
}
|
||||
} else if (t->phase == 1 && t->finished) {
|
||||
if (t->transfer_status) { fail(t, mf_status_text(t->transfer_status)); return; }
|
||||
t->phase = 2; request(t, MF_STAT, t->ids[AUTHOR]);
|
||||
|
||||
Reference in new issue
Block a user