diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c index ec33e0364e8..83ce0866391 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c @@ -197,6 +197,7 @@ int nrf_cloud_obj_reset(struct nrf_cloud_obj *const obj) case NRF_CLOUD_OBJ_TYPE_JSON: { obj->json = NULL; + break; } default: return -ENOTSUP; @@ -207,7 +208,7 @@ int nrf_cloud_obj_reset(struct nrf_cloud_obj *const obj) obj->enc_src = NRF_CLOUD_ENC_SRC_NONE; - return -ENOTSUP; + return 0; } int nrf_cloud_obj_bulk_init(struct nrf_cloud_obj *const bulk) diff --git a/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c b/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c index 29d81470681..6c5862dd236 100644 --- a/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c +++ b/subsys/net/lib/nrf_cloud/src/nrf_cloud_codec_internal.c @@ -931,13 +931,13 @@ int json_send_to_cloud(cJSON *const request) return -ENOMEM; } - LOG_DBG("Created request: %s", msg_string); - struct nct_dc_data msg = { .data.ptr = msg_string, .data.len = strlen(msg_string) }; + LOG_DBG("Created request: %s (size: %u)", (char *)msg.data.ptr, msg.data.len); + err = nct_dc_send(&msg); if (err) { LOG_ERR("Failed to send request, error: %d", err); @@ -2321,6 +2321,9 @@ int nrf_cloud_cell_pos_req_json_encode(struct lte_lc_cells_info const *const inf return -EINVAL; } + LOG_DBG("Encoding lte_lc_cells_info with ncells_count: %u and gci_cells_count: %u", + inf->ncells_count, inf->gci_cells_count); + int err; cJSON *lte_array; cJSON *lte_obj; @@ -2385,6 +2388,8 @@ int nrf_cloud_wifi_req_json_encode(struct wifi_scan_info const *const wifi, return -EINVAL; } + LOG_DBG("Encoding wifi_scan_info with count: %u", wifi->cnt); + cJSON *wifi_obj = NULL; cJSON *ap_array = NULL;