From: Michal Sojka Date: Tue, 30 Nov 2010 16:35:27 +0000 (+0100) Subject: Allow messages with zero id X-Git-Tag: fix-allnoconfig~300 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/can-benchmark.git/commitdiff_plain/4d282cd02b4632590d95a6d3213fa0e04383b2dc Allow messages with zero id --- diff --git a/latester/latester.c b/latester/latester.c index 85288f7..cb578a1 100644 --- a/latester/latester.c +++ b/latester/latester.c @@ -282,7 +282,7 @@ int send_frame(int socket) MEMSET_ZERO(frame); i = curr_msg+1; - while (msg_infos[i].id != 0 && i != curr_msg) { + while (msg_infos[i].id != -1 && i != curr_msg) { i++; if (i >= MAX_INFOS) i = 0; @@ -310,7 +310,7 @@ int send_frame(int socket) void msg_info_free(struct msg_info *mi) { - mi->id = 0; + mi->id = -1; } static inline void get_next_timeout(struct timespec *timeout) @@ -597,7 +597,7 @@ int main(int argc, const char *argv[]) { pthread_t thread; sigset_t set; - int ret; + int ret, i; parse_options(argc, argv); @@ -606,6 +606,9 @@ int main(int argc, const char *argv[]) signal(SIGINT, term_handler); signal(SIGTERM, term_handler); + for (i=0; i