Commit 678b3973 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Use an explicit constant for the source GC time.

parent e0f3b52d
......@@ -228,7 +228,7 @@ update_feasible(const unsigned char *a,
if(src == NULL)
return 1;
if(src->time < now.tv_sec - 200)
if(src->time < now.tv_sec - SOURCE_GC_TIME)
/* Never mind what is probably stale data */
return 1;
......
......@@ -98,7 +98,7 @@ update_source(struct source *src,
if(metric >= INFINITY)
return;
if(src->time < now.tv_sec - 200 ||
if(src->time < now.tv_sec - SOURCE_GC_TIME ||
seqno_compare(src->seqno, seqno) < 0 ||
(src->seqno == seqno && src->metric > metric)) {
src->seqno = seqno;
......
......@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
#define SOURCE_GC_TIME 200
struct source {
unsigned char address[16];
unsigned char prefix[16];
......
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