Fix build in some configurations.

pull/2768/head
Roger A. Light 3 years ago
parent 5fbe8e5be2
commit 799e3c214d

@ -44,10 +44,10 @@ int send__publish(struct mosquitto *mosq, uint16_t mid, const char *topic, uint3
{
#ifdef WITH_BROKER
size_t len;
int rc;
#ifdef WITH_BRIDGE
struct mosquitto__bridge_topic *cur_topic;
bool match;
int rc;
char *mapped_topic = NULL;
char *topic_temp = NULL;
#endif

@ -267,17 +267,14 @@ static int bridge__connect_step1(struct mosquitto *context)
}else{
qos = cur_topic->qos;
}
if(sub__add(context,
cur_topic->local_topic,
qos,
0,
MQTT_SUB_OPT_NO_LOCAL | MQTT_SUB_OPT_RETAIN_AS_PUBLISHED
) > 0){
struct mosquitto_subscription sub;
sub.topic_filter = cur_topic->local_topic;
sub.identifier = 0;
sub.options = MQTT_SUB_OPT_NO_LOCAL | MQTT_SUB_OPT_RETAIN_AS_PUBLISHED | qos;
if(sub__add(context, &sub) > 0){
return 1;
}
retain__queue(context,
cur_topic->local_topic,
qos, 0);
retain__queue(context, &sub);
}
}

Loading…
Cancel
Save