Commit c81fcd6c by Juliusz Chroboczek

Change random data to be time_t instead of int.

1 parent a4475cc2
...@@ -56,7 +56,7 @@ struct timeval now; ...@@ -56,7 +56,7 @@ struct timeval now;
unsigned char myid[16]; unsigned char myid[16];
int debug = 0; int debug = 0;
int reboot_time; time_t reboot_time;
int idle_time = 320; int idle_time = 320;
int link_detect = 0; int link_detect = 0;
...@@ -99,7 +99,7 @@ main(int argc, char **argv) ...@@ -99,7 +99,7 @@ main(int argc, char **argv)
struct sockaddr_in6 sin6; struct sockaddr_in6 sin6;
int i, rc, fd, rfd, have_id = 0; int i, rc, fd, rfd, have_id = 0;
struct timeval check_neighbours_time; struct timeval check_neighbours_time;
int expiry_time, kernel_dump_time; time_t expiry_time, kernel_dump_time;
char *config_file = NULL; char *config_file = NULL;
void *vrc; void *vrc;
unsigned int seed; unsigned int seed;
......
...@@ -64,7 +64,7 @@ THE SOFTWARE. ...@@ -64,7 +64,7 @@ THE SOFTWARE.
extern struct timeval now; extern struct timeval now;
extern int debug; extern int debug;
extern int reboot_time; extern time_t reboot_time;
extern int wireless_hello_interval, wired_hello_interval, idle_hello_interval; extern int wireless_hello_interval, wired_hello_interval, idle_hello_interval;
extern int idle_time; extern int idle_time;
extern int link_detect; extern int link_detect;
......
...@@ -39,9 +39,9 @@ struct network { ...@@ -39,9 +39,9 @@ struct network {
struct timeval flush_timeout; struct timeval flush_timeout;
int bufsize; int bufsize;
unsigned char *sendbuf; unsigned char *sendbuf;
int bucket_time; time_t bucket_time;
unsigned int bucket; unsigned int bucket;
int activity_time; time_t activity_time;
unsigned short hello_seqno; unsigned short hello_seqno;
unsigned int hello_interval; unsigned int hello_interval;
unsigned int self_update_interval; unsigned int self_update_interval;
......
...@@ -27,8 +27,8 @@ struct route { ...@@ -27,8 +27,8 @@ struct route {
unsigned short seqno; unsigned short seqno;
struct neighbour *neigh; struct neighbour *neigh;
unsigned char nexthop[16]; unsigned char nexthop[16];
int time; time_t time;
int origtime; time_t origtime;
int installed; int installed;
}; };
......
...@@ -28,7 +28,7 @@ struct source { ...@@ -28,7 +28,7 @@ struct source {
unsigned char plen; unsigned char plen;
unsigned short seqno; unsigned short seqno;
unsigned short metric; unsigned short metric;
int time; time_t time;
}; };
int source_match(struct source *src, int source_match(struct source *src,
......
...@@ -125,7 +125,7 @@ timeval_min(struct timeval *d, const struct timeval *s) ...@@ -125,7 +125,7 @@ timeval_min(struct timeval *d, const struct timeval *s)
} }
void void
timeval_min_sec(struct timeval *d, int secs) timeval_min_sec(struct timeval *d, time_t secs)
{ {
if(d->tv_sec == 0 || d->tv_sec > secs) { if(d->tv_sec == 0 || d->tv_sec > secs) {
d->tv_sec = secs; d->tv_sec = secs;
......
...@@ -35,7 +35,7 @@ void timeval_plus_msec(struct timeval *d, ...@@ -35,7 +35,7 @@ void timeval_plus_msec(struct timeval *d,
int timeval_compare(const struct timeval *s1, const struct timeval *s2) int timeval_compare(const struct timeval *s1, const struct timeval *s2)
ATTRIBUTE ((pure)); ATTRIBUTE ((pure));
void timeval_min(struct timeval *d, const struct timeval *s); void timeval_min(struct timeval *d, const struct timeval *s);
void timeval_min_sec(struct timeval *d, int secs); void timeval_min_sec(struct timeval *d, time_t secs);
int parse_msec(const char *string); int parse_msec(const char *string);
void do_debugf(int leve, const char *format, ...) void do_debugf(int leve, const char *format, ...)
ATTRIBUTE ((format (printf, 2, 3))); ATTRIBUTE ((format (printf, 2, 3)));
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!