Skip to content

Commit

Permalink
Incorporating PR feedback from #1787 (#1804)
Browse files Browse the repository at this point in the history
  • Loading branch information
jspaith authored Jun 30, 2021
1 parent 75afd98 commit 97cde2c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion sdk/inc/azure/iot/az_iot_hub_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ typedef enum
AZ_IOT_HUB_CLIENT_PROPERTIES_MESSAGE_TYPE_GET_RESPONSE
= 1, /**< A response from a properties "GET" request. */
AZ_IOT_HUB_CLIENT_PROPERTIES_MESSAGE_TYPE_WRITABLE_UPDATED
= 2, /**< A message with a payload containing updated writableproperties for the device to
= 2, /**< A message with a payload containing updated writable properties for the device to
process. */
AZ_IOT_HUB_CLIENT_PROPERTIES_MESSAGE_TYPE_ACKNOWLEDGEMENT
= 3, /**< A response acknowledging the service has received properties that the device sent. */
Expand Down
6 changes: 3 additions & 3 deletions sdk/samples/iot/paho_iot_pnp_sample_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static void write_property_payload_with_status(
az_span name,
double value,
int32_t status_code_value,
int32_t ack_version_value,
int32_t version_value,
az_span description_value,
az_span property_payload,
az_span* out_property_payload);
Expand Down Expand Up @@ -760,7 +760,7 @@ static void write_property_payload_with_status(
az_span name,
double value,
int32_t status_code_value,
int32_t ack_version_value,
int32_t version_value,
az_span description_value,
az_span property_payload,
az_span* out_property_payload)
Expand All @@ -778,7 +778,7 @@ static void write_property_payload_with_status(
// to the az_json_writer.
IOT_SAMPLE_EXIT_IF_AZ_FAILED(
az_iot_hub_client_properties_writer_begin_response_status(
&hub_client, &jw, name, status_code_value, ack_version_value, description_value),
&hub_client, &jw, name, status_code_value, version_value, description_value),
log_message);

// At this point the application writes the value of the desired property it is acknowledging.
Expand Down
10 changes: 5 additions & 5 deletions sdk/samples/iot/pnp/pnp_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ void pnp_build_reported_property_with_status(
az_span property_name,
pnp_append_property_callback append_callback,
void* context,
int32_t ack_code,
int32_t code,
int32_t version,
az_span ack_description,
az_span description,
az_span* out_span)
{
char const* const log = "Failed to build `%.*s` reported property with status";
Expand Down Expand Up @@ -252,19 +252,19 @@ void pnp_build_reported_property_with_status(
IOT_SAMPLE_EXIT_IF_AZ_FAILED(append_callback(&jw, context), log, property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(
az_json_writer_append_property_name(&jw, desired_temp_ack_code_name), log, property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_writer_append_int32(&jw, ack_code), log, property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_writer_append_int32(&jw, code), log, property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(
az_json_writer_append_property_name(&jw, desired_temp_ack_version_name), log, property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_writer_append_int32(&jw, version), log, property_name);

if (az_span_size(ack_description) != 0)
if (az_span_size(description) != 0)
{
IOT_SAMPLE_EXIT_IF_AZ_FAILED(
az_json_writer_append_property_name(&jw, desired_temp_ack_description_name),
log,
property_name);
IOT_SAMPLE_EXIT_IF_AZ_FAILED(
az_json_writer_append_string(&jw, ack_description), log, property_name);
az_json_writer_append_string(&jw, description), log, property_name);
}

IOT_SAMPLE_EXIT_IF_AZ_FAILED(az_json_writer_append_end_object(&jw), log, property_name);
Expand Down
12 changes: 6 additions & 6 deletions sdk/samples/iot/pnp/pnp_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ void pnp_build_reported_property(
* @param[in] property_name The name of the property for which to send an update.
* @param[in] append_callback The user callback to invoke to add the property value.
* @param[in] context The user context which is passed to the callback.
* @param[in] ack_code The return status for the reported property.
* @param[in] ack_version The ack version for the reported property.
* @param[in] ack_description The optional description for the reported property.
* @param[in] code The return status for the reported property.
* @param[in] version The ack version for the reported property.
* @param[in] description The optional description for the reported property.
* @param[out] out_span A pointer to the #az_span containing the output json payload.
*/
void pnp_build_reported_property_with_status(
Expand All @@ -100,9 +100,9 @@ void pnp_build_reported_property_with_status(
az_span property_name,
pnp_append_property_callback append_callback,
void* context,
int32_t ack_code,
int32_t ack_version,
az_span ack_description,
int32_t code,
int32_t version,
az_span description,
az_span* out_span);

/**
Expand Down

0 comments on commit 97cde2c

Please sign in to comment.