Commit 0db9b19f authored by Aurelio Colosimo's avatar Aurelio Colosimo

removed duplicated max_foreign_records option

The correct one is in rt_opts struct. Removed the oldest one, which was still
used (but not set to its default) and lead to a division by zero
parent bce9486f
......@@ -179,7 +179,6 @@ struct pp_instance {
struct pp_timer *timers[PP_TIMER_ARRAY_SIZE];
UInteger16 number_foreign_records;
Integer16 max_foreign_records;
Integer16 foreign_record_i;
Integer16 foreign_record_best;
Boolean record_update;
......
......@@ -104,7 +104,7 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
/* New foreign master */
if (ppi->number_foreign_records <
ppi->max_foreign_records) {
OPTS(ppi)->max_foreign_records) {
ppi->number_foreign_records++;
}
......@@ -129,7 +129,7 @@ void st_com_add_foreign(struct pp_instance *ppi, unsigned char *buf)
PP_VPRINTF("New foreign Master added \n");
ppi->foreign_record_i = (ppi->foreign_record_i+1) %
ppi->max_foreign_records;
OPTS(ppi)->max_foreign_records;
}
......
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