96 mosquitto_subscribe(mosq, NULL, topic, 0); |
96 mosquitto_subscribe(mosq, NULL, topic, 0); |
97 free(topic); |
97 free(topic); |
98 topic = xstrcpy((char *)"mbv1.0/fermenters/#"); // Subscribe to fermenter messages. |
98 topic = xstrcpy((char *)"mbv1.0/fermenters/#"); // Subscribe to fermenter messages. |
99 mosquitto_subscribe(mosq, NULL, topic, 0); |
99 mosquitto_subscribe(mosq, NULL, topic, 0); |
100 free(topic); |
100 free(topic); |
|
101 topic = xstrcpy((char *)"mbv1.0/brewcontrol/#"); // Subscribe to brewcontrol messages. |
|
102 mosquitto_subscribe(mosq, NULL, topic, 0); |
|
103 free(topic); |
101 topic = NULL; |
104 topic = NULL; |
102 mqtt_status = STATUS_CONNACK_RECVD; |
105 mqtt_status = STATUS_CONNACK_RECVD; |
103 } else { |
106 } else { |
104 syslog(LOG_NOTICE, "MQTT: my_connect_callback: %s\n", mosquitto_connack_string(result)); |
107 syslog(LOG_NOTICE, "MQTT: my_connect_callback: %s\n", mosquitto_connack_string(result)); |
105 } |
108 } |