diff --git a/core/net/rime/mesh.c b/core/net/rime/mesh.c index 0ceecb49b..39231cc3e 100644 --- a/core/net/rime/mesh.c +++ b/core/net/rime/mesh.c @@ -126,11 +126,15 @@ found_route(struct route_discovery_conn *rdc, const rimeaddr_t *dest) c->queued_data = NULL; rt = route_lookup(dest); - if (rt != NULL) { + if(rt != NULL) { multihop_resend(&c->multihop, &rt->nexthop); - c->cb->sent(c); + if(c->cb->sent != NULL) { + c->cb->sent(c); + } } else { - c->cb->timedout(c); + if(c->cb->timedout != NULL) { + c->cb->timedout(c); + } } } } @@ -191,7 +195,9 @@ mesh_send(struct mesh_conn *c, const rimeaddr_t *to) PRINTF("mesh_send: could not send\n"); return 0; } - c->cb->sent(c); + if(c->cb->sent != NULL) { + c->cb->sent(c); + } return 1; } /*---------------------------------------------------------------------------*/