mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
we were sorting our pqueue the wrong way
i.e. we were putting higher effort intro2 cells at the *end*
This commit is contained in:
committed by
Micah Elizabeth Scott
parent
d0c2d4cb43
commit
5e768d5cb9
@@ -616,12 +616,12 @@ cleanup_on_free_client_circ(circuit_t *circ)
|
||||
}
|
||||
|
||||
/** Return less than 0 if a precedes b, 0 if a equals b and greater than 0 if
|
||||
* b precedes a. */
|
||||
* b precedes a. Note that *higher* effort is *earlier* in the pqueue. */
|
||||
static int
|
||||
compare_rend_request_by_effort_(const void *_a, const void *_b)
|
||||
{
|
||||
const pending_rend_t *a = _a, *b = _b;
|
||||
if (a->rdv_data.pow_effort < b->rdv_data.pow_effort) {
|
||||
if (a->rdv_data.pow_effort > b->rdv_data.pow_effort) {
|
||||
return -1;
|
||||
} else if (a->rdv_data.pow_effort == b->rdv_data.pow_effort) {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user