Skip to content

Commit

Permalink
Merge pull request #3 from guruchandru/mqttsubchange
Browse files Browse the repository at this point in the history
Review comment changes for PR53
  • Loading branch information
nlrcomcast authored Sep 25, 2023
2 parents 65b9faa + 082cb52 commit e83188f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
build
tags
.vscode
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
Expand Down
5 changes: 4 additions & 1 deletion src/mqttcm_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1718,7 +1718,10 @@ int mqtt_subscribe(char *comp, char *topic)
if(strcmp (comp, SUBSCRIBE_WEBCONFIG) == 0)
{
int subscribeId;
sprintf(temp_topic,"%s%s/#",MQTT_SUBSCRIBE_TOPIC,Get_Mqtt_ClientId());
if( Get_Mqtt_ClientId() != NULL)
{
snprintf(temp_topic, sizeof(temp_topic), "%s%s/#", MQTT_SUBSCRIBE_TOPIC, Get_Mqtt_ClientId());
}
MqttCMInfo("Subscribing to wildcard topic - %s\n", temp_topic);
rc = mosquitto_subscribe(mosq, &subscribeId, temp_topic, 1);

Expand Down

0 comments on commit e83188f

Please sign in to comment.