Commit a04e8454 authored by Sébastien Escudier's avatar Sébastien Escudier

sap : smooth the announce period average

closes #5462
parent be3ffe18
......@@ -811,7 +811,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
/* Compute the average period */
mtime_t now = mdate();
p_announce->i_period = (p_announce->i_period + (now - p_announce->i_last)) / 2;
p_announce->i_period = ( p_announce->i_period * (p_announce->i_period_trust-1) + (now - p_announce->i_last) ) / p_announce->i_period_trust;
p_announce->i_last = now;
}
FreeSDP( p_sdp ); p_sdp = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment