1
0
mirror of https://github.com/coturn/coturn.git synced 2025-10-31 15:00:59 +01:00

bandwidth allocation fixed

This commit is contained in:
mom040267 2014-10-11 08:39:52 +00:00
parent 2b06ed4e2d
commit 40cd178b1f
2 changed files with 10 additions and 2 deletions

View File

@ -12,6 +12,7 @@ Version 4.2.1.2 'Monza':
- Move secondary download area to coturn.net.
- Auota allocation fixed.
- Core dump fixed.
- Bandwidth allocation fixed.
08/14/2014 Oleg Moskalenko <mom040267@gmail.com>
Version 4.1.2.1 'Vitari':

View File

@ -176,14 +176,20 @@ static void dec_quota(ts_ur_super_session* ss)
ss->quota_used = 0;
(((turn_turnserver*)ss->server)->raqcb)(ss->username, ss->oauth, (u08bits*)ss->realm_options.name);
}
}
static void dec_bps(ts_ur_super_session* ss)
{
if(ss && ss->server) {
if(ss->bps) {
if(((turn_turnserver*)ss->server)->allocate_bps_func) {
((turn_turnserver*)ss->server)->allocate_bps_func(ss->bps,0);
}
ss->bps = 0;
}
(((turn_turnserver*)ss->server)->raqcb)(ss->username, ss->oauth, (u08bits*)ss->realm_options.name);
}
}
@ -4064,6 +4070,7 @@ int shutdown_client_connection(turn_turnserver *server, ts_ur_super_session *ss,
report_turn_session_info(server,ss,1);
dec_quota(ss);
dec_bps(ss);
if(!force && ss->is_mobile) {