From c81fc67b82285e5b819bfbb7fd1fae8bb01aa13b Mon Sep 17 00:00:00 2001 From: Zhanglong Xia Date: Thu, 19 Sep 2019 23:09:48 +0800 Subject: [PATCH] [api] change commissioner API from c++ style to c style (#4192) --- include/openthread/commissioner.h | 8 ++++---- src/core/api/commissioner_api.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/openthread/commissioner.h b/include/openthread/commissioner.h index 250cdf5b2..613e0a50c 100644 --- a/include/openthread/commissioner.h +++ b/include/openthread/commissioner.h @@ -201,14 +201,14 @@ otError otCommissionerAddJoiner(otInstance * aInstance, * This method get joiner info at aIterator position. * * @param[in] aInstance A pointer to instance. - * @param[inout] aIterator A iterator to the index of the joiner. + * @param[inout] aIterator A pointer to the Joiner Info iterator context. * @param[out] aJoiner A reference to Joiner info. * - * @retval OT_ERROR_NONE Successfully get the Joiner info. - * @retval OT_ERROR_NOT_FOUND Not found next Joiner. + * @retval OT_ERROR_NONE Successfully get the Joiner info. + * @retval OT_ERROR_NOT_FOUND Not found next Joiner. * */ -otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t &aIterator, otJoinerInfo &aJoiner); +otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner); /** * This function removes a Joiner entry. diff --git a/src/core/api/commissioner_api.cpp b/src/core/api/commissioner_api.cpp index 36dd622de..4d4b98400 100644 --- a/src/core/api/commissioner_api.cpp +++ b/src/core/api/commissioner_api.cpp @@ -81,11 +81,11 @@ otError otCommissionerAddJoiner(otInstance *aInstance, const otExtAddress *aEui6 aTimeout); } -otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t &aIterator, otJoinerInfo &aJoiner) +otError otCommissionerGetNextJoinerInfo(otInstance *aInstance, uint16_t *aIterator, otJoinerInfo *aJoiner) { Instance &instance = *static_cast(aInstance); - return instance.Get().GetNextJoinerInfo(aIterator, aJoiner); + return instance.Get().GetNextJoinerInfo(*aIterator, *aJoiner); } otError otCommissionerRemoveJoiner(otInstance *aInstance, const otExtAddress *aEui64)