port: change 'announce_span' into a macro.

This probably should not have been a variable in the first place.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2015-08-15 12:51:15 +02:00
parent 8efb623f12
commit 54f45063df
3 changed files with 2 additions and 3 deletions

1
ds.h
View File

@ -125,7 +125,6 @@ struct portDS {
#define FRI_ASAP (-128) #define FRI_ASAP (-128)
struct port_defaults { struct port_defaults {
int announce_span;
int path_trace_enabled; int path_trace_enabled;
int follow_up_info; int follow_up_info;
int freq_est_interval; /*log seconds*/ int freq_est_interval; /*log seconds*/

3
port.c
View File

@ -39,6 +39,7 @@
#include "util.h" #include "util.h"
#define ALLOWED_LOST_RESPONSES 3 #define ALLOWED_LOST_RESPONSES 3
#define ANNOUNCE_SPAN 1
enum syfu_state { enum syfu_state {
SF_EMPTY, SF_EMPTY,
@ -950,7 +951,7 @@ static int port_set_announce_tmo(struct port *p)
{ {
return set_tmo_random(p->fda.fd[FD_ANNOUNCE_TIMER], return set_tmo_random(p->fda.fd[FD_ANNOUNCE_TIMER],
p->announceReceiptTimeout, p->announceReceiptTimeout,
p->pod.announce_span, p->logAnnounceInterval); ANNOUNCE_SPAN, p->logAnnounceInterval);
} }
static int port_set_delay_tmo(struct port *p) static int port_set_delay_tmo(struct port *p)

View File

@ -80,7 +80,6 @@ static struct config cfg_settings = {
}, },
.pod = { .pod = {
.announce_span = 1,
.path_trace_enabled = 0, .path_trace_enabled = 0,
.follow_up_info = 0, .follow_up_info = 0,
.freq_est_interval = 1, .freq_est_interval = 1,