Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update samples to include log of mqtt client username #1731

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_c2d_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_methods_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_pnp_component_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_pnp_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_sas_telemetry_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_hub_telemetry_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
4 changes: 3 additions & 1 deletion sdk/samples/iot/paho_iot_hub_twin_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ static void connect_mqtt_client_to_iot_hub(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down Expand Up @@ -444,7 +446,7 @@ static bool parse_desired_device_count_property(
if (jr.token.kind != AZ_JSON_TOKEN_BEGIN_OBJECT)
{
IOT_SAMPLE_LOG(
"`%.*s` property was not found in desired property response.",
"`%.*s` property was not found in desired property message.",
az_span_size(property),
az_span_ptr(property));
return false;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_provisioning_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ static void connect_mqtt_client_to_provisioning_service(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down
2 changes: 2 additions & 0 deletions sdk/samples/iot/paho_iot_provisioning_sas_sample.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ static void connect_mqtt_client_to_provisioning_service(void)
exit(rc);
}

IOT_SAMPLE_LOG("MQTT client username: %s\n", mqtt_client_username_buffer);

// Set MQTT connection options.
MQTTClient_connectOptions mqtt_connect_options = MQTTClient_connectOptions_initializer;
mqtt_connect_options.username = mqtt_client_username_buffer;
Expand Down