diff --git a/sys/include/net/gnrc/rpl.h b/sys/include/net/gnrc/rpl.h index 2ca8557cdb..ef0d62ccaf 100644 --- a/sys/include/net/gnrc/rpl.h +++ b/sys/include/net/gnrc/rpl.h @@ -156,14 +156,9 @@ extern "C" { #define GNRC_RPL_MSG_TYPE_LIFETIME_UPDATE (0x0900) /** - * @brief Message type for trickle intervals + * @brief Message type for trickle */ -#define GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL (0x0901) - -/** - * @brief Message type for trickle callbacks - */ -#define GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK (0x0902) +#define GNRC_RPL_MSG_TYPE_TRICKLE_MSG (0x0901) /** * @brief Message type for handling DAO sending diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl.c b/sys/net/gnrc/routing/rpl/gnrc_rpl.c index 10bd8526cc..5b5a5d64a8 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl.c @@ -120,9 +120,9 @@ gnrc_rpl_instance_t *gnrc_rpl_root_init(uint8_t instance_id, ipv6_addr_t *dodag_ dodag->dio_opts |= GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO; #endif - trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL, - GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK, (1 << dodag->dio_min), - dodag->dio_interval_doubl, dodag->dio_redun); + trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_MSG, + (1 << dodag->dio_min), dodag->dio_interval_doubl, + dodag->dio_redun); return inst; } @@ -216,15 +216,8 @@ static void *_event_loop(void *args) DEBUG("RPL: GNRC_RPL_MSG_TYPE_LIFETIME_UPDATE received\n"); _update_lifetime(); break; - case GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL: - DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL received\n"); - trickle = msg.content.ptr; - if (trickle && (trickle->callback.func != NULL)) { - trickle_interval(trickle); - } - break; - case GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK: - DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK received\n"); + case GNRC_RPL_MSG_TYPE_TRICKLE_MSG: + DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_MSG received\n"); trickle = msg.content.ptr; if (trickle && (trickle->callback.func != NULL)) { trickle_callback(trickle); diff --git a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c index 2d81675825..38f2e0f246 100644 --- a/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c +++ b/sys/net/gnrc/routing/rpl/gnrc_rpl_control_messages.c @@ -551,9 +551,9 @@ void gnrc_rpl_recv_DIO(gnrc_rpl_dio_t *dio, kernel_pid_t iface, ipv6_addr_t *src } gnrc_rpl_delay_dao(dodag); - trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL, - GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK, (1 << dodag->dio_min), - dodag->dio_interval_doubl, dodag->dio_redun); + trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_MSG, + (1 << dodag->dio_min), dodag->dio_interval_doubl, + dodag->dio_redun); gnrc_rpl_parent_update(dodag, parent); return;