Commit 732bc497 authored by Adam Wujek's avatar Adam Wujek

reproduce bug, timeout overflow

Signed-off-by: 's avatarAdam Wujek <dev_public@wujek.eu>
parent 03cb82b6
......@@ -273,10 +273,17 @@ static unsigned long unix_calc_timeout(struct pp_instance *ppi, int millisec)
{
struct timespec now;
uint64_t now_ms;
static uint64_t extra_offset;
clock_gettime(CLOCK_MONOTONIC, &now);
now_ms = 1000LL * now.tv_sec + now.tv_nsec / 1000 / 1000;
if (!extra_offset) {
pp_printf("%s: old now %10ld %10lld\n", __func__, (unsigned long) now_ms, now_ms);
extra_offset = ((uint64_t)1<<32) - now_ms - 1000LL * 60 * 3; // one minute
}
now_ms += extra_offset;
pp_printf("%s %10ld %10lld\n", __func__, (unsigned long) now_ms, now_ms);
return now_ms + millisec;
}
......
......@@ -296,7 +296,26 @@ struct dump_info ppi_info [] = {
DUMP_FIELD(TimeInterval,timestampCorrectionPortDS.messageTimestampPointLatency),
DUMP_FIELD(TimeInterval,timestampCorrectionPortDS.semistaticLatency),
DUMP_FIELD(Enumeration8,externalPortConfigurationPortDS.desiredState),
// timeOutInstCnt_t tmo_cfg[PP_TO_COUNT];
DUMP_FIELD(unsigned_long,tmo_cfg[0].tmo),
DUMP_FIELD(int,tmo_cfg[0].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[1].tmo),
DUMP_FIELD(int,tmo_cfg[1].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[2].tmo),
DUMP_FIELD(int,tmo_cfg[2].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[3].tmo),
DUMP_FIELD(int,tmo_cfg[3].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[4].tmo),
DUMP_FIELD(int,tmo_cfg[4].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[5].tmo),
DUMP_FIELD(int,tmo_cfg[5].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[6].tmo),
DUMP_FIELD(int,tmo_cfg[6].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[7].tmo),
DUMP_FIELD(int,tmo_cfg[7].tmo),
DUMP_FIELD(unsigned_long,tmo_cfg[8].tmo),
DUMP_FIELD(int,tmo_cfg[8].tmo),
//DUMP_FIELD(unsigned long timeouts[__PP_TO_ARRAY_SIZE]),
DUMP_FIELD(UInteger16, recv_sync_sequence_id),
//DUMP_FIELD(UInteger16 sent_seq[__PP_NR_MESSAGES_TYPES]),
......
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