ssb: Fix the tests.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m27s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 32m27s
This commit is contained in:
parent
9af4312561
commit
223e20cbbc
@ -195,15 +195,11 @@ static void _ebt_add_to_clock(ebt_get_clock_t* work, const char* id, int64_t val
|
||||
ebt_entry_t* entry = _ebt_get_entry(work->ebt, id);
|
||||
if (entry)
|
||||
{
|
||||
entry->out = value;
|
||||
entry->out_replicate = entry->out_replicate || replicate;
|
||||
entry->out_receive = entry->out_receive || receive;
|
||||
|
||||
if ((replicate && !entry->out_replicate) || (receive && !entry->out_receive) ||
|
||||
((replicate || receive || entry->out_replicate || entry->out_receive) && entry->out != value))
|
||||
{
|
||||
int index = tf_util_insert_index(id, count ? work->clock->entries : NULL, count, sizeof(tf_ssb_ebt_clock_entry_t), _ebt_compare_entry);
|
||||
int64_t out_value = entry->out_replicate ? ((value << 1) | (entry->out_receive ? 0 : 1)) : -1;
|
||||
int64_t out_value = (entry->out_replicate || replicate) ? ((tf_max(entry->out, value) << 1) | ((entry->out_receive || receive) ? 0 : 1)) : -1;
|
||||
if (index < count && strcmp(id, work->clock->entries[index].id) == 0)
|
||||
{
|
||||
work->clock->entries[index].value = out_value;
|
||||
@ -220,6 +216,10 @@ static void _ebt_add_to_clock(ebt_get_clock_t* work, const char* id, int64_t val
|
||||
work->clock->count = count + 1;
|
||||
}
|
||||
}
|
||||
|
||||
entry->out = tf_max(entry->out, value);
|
||||
entry->out_replicate = entry->out_replicate || replicate;
|
||||
entry->out_receive = entry->out_receive || receive;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user