Skip to content

Commit 58c72c8

Browse files
committed
lib: lwm2m_carrier: Clarify pdn return values
Aligned the lwm2m_os pdn return value doc with other NCS headers. Included lwm2m_os_storage_delete() for consistency. Signed-off-by: Håvard Vermeer <[email protected]>
1 parent dbda116 commit 58c72c8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

lib/bin/lwm2m_carrier/include/lwm2m_os.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ int lwm2m_os_pdn_ctx_destroy(uint8_t cid);
221221
* supported, or PDN_FAM_IPV6 if only IPv6 is supported. Otherwise, this value
222222
* will remain unchanged.
223223
*
224-
* @retval 0 If success.
224+
* @retval 0 If the operation was successful.
225+
* Otherwise, a negative error code is returned.
225226
*/
226227
int lwm2m_os_pdn_activate(uint8_t cid, int *esm, enum lwm2m_os_pdn_fam *family);
227228

@@ -230,7 +231,8 @@ int lwm2m_os_pdn_activate(uint8_t cid, int *esm, enum lwm2m_os_pdn_fam *family);
230231
*
231232
* @param cid The PDP context ID.
232233
*
233-
* @retval 0 If success.
234+
* @retval 0 If the operation was successful.
235+
* Otherwise, a negative error code is returned.
234236
*/
235237
int lwm2m_os_pdn_deactivate(uint8_t cid);
236238

@@ -241,14 +243,17 @@ int lwm2m_os_pdn_deactivate(uint8_t cid);
241243
*
242244
* @param cid The context ID of the PDN connection.
243245
*
244-
* @retval 0 If success.
246+
* @return A non-negative PDN ID on success, or a negative errno otherwise.
245247
*/
246248
int lwm2m_os_pdn_id_get(uint8_t cid);
247249

248250
/**
249251
* @brief Set a callback for events pertaining to the default PDP context (zero).
250252
*
251253
* @param cb The PDN event handler.
254+
*
255+
* @retval 0 If the operation was successful.
256+
* Otherwise, a negative error code is returned.
252257
*/
253258
int lwm2m_os_pdn_default_callback_set(lwm2m_os_pdn_event_handler_t cb);
254259

@@ -333,8 +338,8 @@ uint32_t lwm2m_os_rand_get(void);
333338
*
334339
* @param[in] id of the entry to be deleted.
335340
*
336-
* @retval 0 If success
337-
* @retval -ERRNO errno code if error.
341+
* @retval 0 If the operation was successful.
342+
* Otherwise, a negative error code is returned.
338343
*/
339344
int lwm2m_os_storage_delete(uint16_t id);
340345

0 commit comments

Comments
 (0)