Commit 18b1a039 authored by Adam Wujek's avatar Adam Wujek 💬

proto-standard: count RX packet only when received is greather than 0

wrpc uses non blocking receive function. Due to that recv returns many times
0 as the received bytes number. Count only when we get real data.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 2487728b
......@@ -64,7 +64,7 @@ static inline int __recv_and_count(struct pp_instance *ppi, void *pkt, int len,
{
int ret;
ret = ppi->n_ops->recv(ppi, pkt, len, t);
if (ret >= 0)
if (ret > 0)
ppi->ptp_rx_count++;
return ret;
}
......
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