diff --git a/client/sub_client.c b/client/sub_client.c index 6e2a1fb4d9..48cb78b52f 100644 --- a/client/sub_client.c +++ b/client/sub_client.c @@ -122,7 +122,7 @@ static void my_connect_callback(struct mosquitto *mosq, void *obj, int result, i connack_result = result; if(!result){ - mosquitto_subscribe_multiple(mosq, NULL, cfg.topic_count, cfg.topics, cfg.qos, cfg.sub_opts, cfg.subscribe_props); + mosquitto_subscribe_multiple(mosq, NULL, cfg.topic_count, (const char* const*)cfg.topics, cfg.qos, cfg.sub_opts, cfg.subscribe_props); for(i=0; ibridge->topics[i].remote_topic, sub_opts, NULL)){ + if(send__subscribe(context, NULL, 1, (const char* const*)&context->bridge->topics[i].remote_topic, sub_opts, NULL)){ return 1; } }else{ if(context->bridge->attempt_unsubscribe){ - if(send__unsubscribe(context, NULL, 1, &context->bridge->topics[i].remote_topic, NULL)){ + if(send__unsubscribe(context, NULL, 1, (const char* const*)&context->bridge->topics[i].remote_topic, NULL)){ /* direction = inwards only. This means we should not be subscribed * to the topic. It is possible that we used to be subscribed to * this topic so unsubscribe. */