Commit 595950e2 authored by Aurelio Colosimo's avatar Aurelio Colosimo

trivial: in spec_recv_packet, check for (maybe) NULL t pointer

parent f3c9d898
......@@ -42,11 +42,14 @@ int spec_recv_packet(struct pp_instance *ppi, void *pkt, int len,
gpio_out(GPIO_PIN_LED_LINK, led);
got = minic_rx_frame(pkt, pkt+ETH_HEADER_SIZE, len, &hwts);
//add phase value and linearize function for WR support
t->seconds = hwts.utc;
t->nanoseconds = hwts.nsec;
if (t) {
//add phase value and linearize function for WR support
t->seconds = hwts.utc;
t->nanoseconds = hwts.nsec;
pp_printf("%s: got=%d, sec=%d, nsec=%d\n", __FUNCTION__, got, t->seconds, t->nanoseconds);
PP_VPRINTF("%s: got=%d, sec=%d, nsec=%d\n", __FUNCTION__, got,
t->seconds, t->nanoseconds);
}
return got;
}
......
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