Commit f695c5d0 authored by Alessandro Rubini's avatar Alessandro Rubini

net: update_rx_queues returns 1 or 0 too

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent b86b45c7
......@@ -53,7 +53,7 @@ extern int abs(int val);
/* The following from ptp-noposix */
extern void wr_servo_reset(void);
void update_rx_queues(void);
int update_rx_queues(void);
/* refresh period for _gui_ and _stat_ commands */
extern int wrc_ui_refperiod;
......
......@@ -308,7 +308,7 @@ int ptpd_netif_sendto(struct wrpc_socket * sock, struct wr_sockaddr *to, void *d
}
void update_rx_queues()
int update_rx_queues()
{
struct wrpc_socket *s = NULL;
struct sockq *q;
......@@ -323,7 +323,7 @@ void update_rx_queues()
&hwts);
if (recvd <= 0) /* No data received? */
return;
return 0;
for (i = 0; i < ARRAY_SIZE(socks); i++) {
s = socks[i];
......@@ -352,7 +352,7 @@ void update_rx_queues()
if (i == ARRAY_SIZE(socks)) {
net_verbose("%s: could not find socket for packet\n",
__FUNCTION__);
return;
return 1;
}
q = &s->queue;
......@@ -363,7 +363,7 @@ void update_rx_queues()
net_verbose
("%s: queue for socket full; [avail %d required %d]\n",
__FUNCTION__, q->avail, q_required);
return;
return 1;
}
size = recvd;
......@@ -383,4 +383,5 @@ void update_rx_queues()
ntohs(s->bind_addr.ethertype),
s->bind_addr.udpport,
q->avail, q->n, q_required);
return 1;
}
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