Removed unused return value from ruc recv callback

This commit is contained in:
adamdunkels 2007-11-27 23:32:34 +00:00
parent 8cf6ac9212
commit b07b46dd79
4 changed files with 15 additions and 18 deletions

View file

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rmh.c,v 1.2 2007/11/17 09:47:55 adamdunkels Exp $
* $Id: rmh.c,v 1.3 2007/11/27 23:32:34 adamdunkels Exp $
*/
/**
@ -63,7 +63,7 @@ struct data_hdr {
#endif
/*---------------------------------------------------------------------------*/
static int
static void
received(struct ruc_conn *uc, rimeaddr_t *from, u8_t seqno)
{
struct rmh_conn *c = (struct rmh_conn *)uc;
@ -90,10 +90,8 @@ received(struct ruc_conn *uc, rimeaddr_t *from, u8_t seqno)
PRINTF("forwarding to %d\n", rt->nexthop.u16[0]);
msg->hops++;
ruc_send(&c->c, nexthop, c->num_rexmit);
}
}
return 1;
}
/*---------------------------------------------------------------------------*/
static void

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: ruc.h,v 1.9 2007/11/13 20:58:46 adamdunkels Exp $
* $Id: ruc.h,v 1.10 2007/11/27 23:32:34 adamdunkels Exp $
*/
/**
@ -46,7 +46,7 @@
struct ruc_conn;
struct ruc_callbacks {
int (* recv)(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno);
void (* recv)(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno);
void (* sent)(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions);
void (* timedout)(struct ruc_conn *c, rimeaddr_t *to, u8_t retransmissions);
};

View file

@ -28,7 +28,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rucb.c,v 1.2 2007/11/17 09:59:48 adamdunkels Exp $
* $Id: rucb.c,v 1.3 2007/11/27 23:32:34 adamdunkels Exp $
*/
/**
@ -88,7 +88,7 @@ timedout(struct ruc_conn *ruc, rimeaddr_t *to, u8_t retransmissions)
}
}
/*---------------------------------------------------------------------------*/
static int
static void
recv(struct ruc_conn *ruc, rimeaddr_t *from, u8_t seqno)
{
struct rucb_conn *c = (struct rucb_conn *)ruc;
@ -98,7 +98,7 @@ recv(struct ruc_conn *ruc, rimeaddr_t *from, u8_t seqno)
from->u8[0], from->u8[1], rimebuf_totlen());
if(seqno == c->last_seqno) {
return 1;
return;
}
c->last_seqno = seqno;
@ -128,7 +128,6 @@ recv(struct ruc_conn *ruc, rimeaddr_t *from, u8_t seqno)
if(rimebuf_datalen() < RUCB_DATASIZE) {
rimeaddr_copy(&c->sender, &rimeaddr_null);
}
return 1;
}
/*---------------------------------------------------------------------------*/
static const struct ruc_callbacks ruc = {recv, acked, timedout};

View file

@ -33,7 +33,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: tree.c,v 1.16 2007/11/26 23:31:44 adamdunkels Exp $
* $Id: tree.c,v 1.17 2007/11/27 23:32:34 adamdunkels Exp $
*/
/**
@ -146,7 +146,7 @@ update_rtmetric(struct tree_conn *tc)
#endif
}
/*---------------------------------------------------------------------------*/
static int
static void
node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
{
struct tree_conn *tc = (struct tree_conn *)
@ -163,7 +163,7 @@ node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
if(recent_packets[i].seqno == hdr->originator_seqno &&
rimeaddr_cmp(&recent_packets[i].originator, &hdr->originator)) {
/* Drop the packet. */
return 1;
return;
}
}
recent_packets[recent_packet_ptr].seqno = hdr->originator_seqno;
@ -185,7 +185,7 @@ node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
tc->cb->recv(&hdr->originator, hdr->originator_seqno,
hdr->hops);
}
return 1;
return;
} else if(hdr->hoplim > 1 && tc->local_rtmetric != RTMETRIC_MAX) {
/* If we are not the sink, we forward the packet to the best
@ -206,15 +206,15 @@ node_packet_received(struct ruc_conn *c, rimeaddr_t *from, u8_t seqno)
if(n != NULL) {
ruc_send(c, &n->addr, hdr->rexmits);
}
return 1;
return;
} else {
PRINTF("%d.%d: still forwarding another packet, not sending ACK\n",
PRINTF("%d.%d: still forwarding another packet\n",
rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1]);
return 0;
return;
}
}
return 1;
return;
}
/*---------------------------------------------------------------------------*/
static void