forked from Mirrors/sngrep
repair msg_get_time for OpenBSD
msg_get_time() returns timevals obtained from libpcap directly, but in OpenBSD these are really bpf_timeval. Copy the struct members so the standard timeval manipulation functions can operate on them. Fixes hard loop when viewing INVITEs.
This commit is contained in:
parent
333ce04ce4
commit
03065e129e
|
@ -108,8 +108,10 @@ msg_get_time(sip_msg_t *msg) {
|
|||
struct timeval t = { };
|
||||
frame_t *frame;
|
||||
|
||||
if (msg && (frame = vector_first(msg->packet->frames)))
|
||||
return frame->header->ts;
|
||||
if (msg && (frame = vector_first(msg->packet->frames))) {
|
||||
t.tv_sec = frame->header->ts.tv_sec;
|
||||
t.tv_usec = frame->header->ts.tv_usec;
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue