Skip to content

Commit

Permalink
fixup! gnrc_netreg: add mbox support
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
miri64 committed Aug 5, 2016
1 parent 4ff370c commit 5e4f6a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sys/include/net/gnrc/netreg.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ typedef void (*gnrc_netreg_entry_cb_t)(uint16_t cmd, gnrc_pktsnip_t *pkt,
typedef struct {
gnrc_netreg_entry_cb_t cb; /**< the callback */
void *ctx; /**< application context for the callback */
} gnrc_netreg_entry_cbd_t
} gnrc_netreg_entry_cbd_t;
#endif

/**
Expand Down
2 changes: 1 addition & 1 deletion sys/net/gnrc/netapi/gnrc_netapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static inline int _snd_rcv_mbox(mbox_t *mbox, uint16_t type, gnrc_pktsnip_t *pkt
msg.type = type;
msg.content.ptr = (void *)pkt;
/* send message */
int ret = mbox_try_put(mbox, msg);
int ret = mbox_try_put(mbox, &msg);
if (ret < 1) {
DEBUG("gnrc_netapi: dropped message to %p (was full)\n", mbox);
}
Expand Down
2 changes: 1 addition & 1 deletion sys/net/gnrc/netreg/gnrc_netreg.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void gnrc_netreg_init(void)
int gnrc_netreg_register(gnrc_nettype_t type, gnrc_netreg_entry_t *entry)
{
/* only threads with a message queue are allowed to register at gnrc */
assert(sched_threads[entry->pid]->msg_array);
assert(sched_threads[entry->target.pid]->msg_array);

if (_INVALID_TYPE(type)) {
return -EINVAL;
Expand Down

0 comments on commit 5e4f6a5

Please sign in to comment.