mirror of
https://github.com/coturn/coturn.git
synced 2025-10-31 23:11:28 +01:00
Fix user quota release #786
This commit is contained in:
parent
553ce02168
commit
5cf657cdff
@ -700,9 +700,13 @@ void release_allocation_quota(uint8_t *user, int oauth, uint8_t *realm)
|
|||||||
ur_string_map_get(rp->status.alloc_counters, (ur_string_map_key_type) username, &value);
|
ur_string_map_get(rp->status.alloc_counters, (ur_string_map_key_type) username, &value);
|
||||||
if (value) {
|
if (value) {
|
||||||
value = (ur_string_map_value_type)(((size_t)value) - 1);
|
value = (ur_string_map_value_type)(((size_t)value) - 1);
|
||||||
|
if (value == 0) {
|
||||||
|
ur_string_map_del(rp->status.alloc_counters, (ur_string_map_key_type) username);
|
||||||
|
} else {
|
||||||
ur_string_map_put(rp->status.alloc_counters, (ur_string_map_key_type) username, value);
|
ur_string_map_put(rp->status.alloc_counters, (ur_string_map_key_type) username, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (rp->status.total_current_allocs)
|
if (rp->status.total_current_allocs)
|
||||||
--(rp->status.total_current_allocs);
|
--(rp->status.total_current_allocs);
|
||||||
ur_string_map_unlock(rp->status.alloc_counters);
|
ur_string_map_unlock(rp->status.alloc_counters);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user