test(member-files): retain route precondition after ABI diagnosis
This commit is contained in:
1 parent
5df6d0c8f3
commit
0b2dac3c5b
1 file changed
+4
-5
@@ -251,15 +251,14 @@ 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) {
|
||||
if (t->ticks == 1 || !(t->ticks % 1000)) {
|
||||
if (t->ticks == 1) {
|
||||
struct member_files* files = t->nodes[SERVER]->member_files;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_MEDIA, "member_files test: startup tick=%u storage_status=%d init_result=%d closing=%d server=%llx",
|
||||
t->ticks, files->storage_status, files->init_result, files->closing, (unsigned long long)t->ids[SERVER]);
|
||||
}
|
||||
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);
|
||||
}
|
||||
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); }
|
||||
} 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