Skip to content

Commit

Permalink
net: lib: nrf_cloud: fix encoding of "doReply" flag
Browse files Browse the repository at this point in the history
The "doReply" flag should be placed inside the "data" object,
not at the root level.
IRIS-7363

Signed-off-by: Justin Morton <justin.morton@nordicsemi.no>
  • Loading branch information
jayteemo authored and cvinayak committed Oct 17, 2023
1 parent fcd05f0 commit 9eb827d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -889,6 +889,7 @@ Libraries for networking
* A bug preventing ``AIR_QUAL`` from being enabled in shadow UI service info.
* A bug that prevented an MQTT FOTA job from being started.
* An invalid value for a shadow delta change to the control section is now rejected by updating the desired section to the previous value.
* Encoding of the "doReply" flag in the :c:func:`nrf_cloud_obj_location_request_create` function.

* Removed:

Expand Down
12 changes: 6 additions & 6 deletions subsys/net/lib/nrf_cloud/src/nrf_cloud_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -923,15 +923,15 @@ int nrf_cloud_obj_location_request_create(struct nrf_cloud_obj *const obj,
goto cleanup;
}

/* By default, nRF Cloud will send the location to the device */
if (!request_loc &&
nrf_cloud_obj_num_add(obj, NRF_CLOUD_LOCATION_KEY_DOREPLY, 0, true)) {
err = -ENOMEM;
err = nrf_cloud_obj_init(&data_obj);
if (err) {
goto cleanup;
}

err = nrf_cloud_obj_init(&data_obj);
if (err) {
/* By default, nRF Cloud will send the location to the device */
if (!request_loc &&
nrf_cloud_obj_num_add(&data_obj, NRF_CLOUD_LOCATION_KEY_DOREPLY, 0, false)) {
err = -ENOMEM;
goto cleanup;
}

Expand Down

0 comments on commit 9eb827d

Please sign in to comment.