Another bridge notification fix.
This commit is contained in:
parent
1fdc4ceee6
commit
ef573448f4
@ -52,11 +52,11 @@ int mqtt3_handle_connack(struct mosquitto_db *db, struct mosquitto *context)
|
||||
}
|
||||
mqtt3_db_messages_easy_queue(db, context, context->bridge->notification_topic, 1, 1, ¬ification_payload, 1);
|
||||
}else{
|
||||
notification_topic_len = strlen(context->id)+strlen("$SYS/broker/connection//state");
|
||||
notification_topic_len = strlen(context->bridge->remote_clientid)+strlen("$SYS/broker/connection//state");
|
||||
notification_topic = _mosquitto_malloc(sizeof(char)*(notification_topic_len+1));
|
||||
if(!notification_topic) return MOSQ_ERR_NOMEM;
|
||||
|
||||
snprintf(notification_topic, notification_topic_len+1, "$SYS/broker/connection/%s/state", context->id);
|
||||
snprintf(notification_topic, notification_topic_len+1, "$SYS/broker/connection/%s/state", context->bridge->remote_clientid);
|
||||
notification_payload = '1';
|
||||
if(_mosquitto_send_real_publish(context, _mosquitto_mid_generate(context),
|
||||
notification_topic, 1, ¬ification_payload, 1, true, 0)){
|
||||
|
Loading…
Reference in New Issue
Block a user