diff --git a/lib/property_mosq.c b/lib/property_mosq.c index 7afe08cc..0b27c297 100644 --- a/lib/property_mosq.c +++ b/lib/property_mosq.c @@ -141,7 +141,9 @@ static int property__read(struct mosquitto__packet *packet, uint32_t *len, mosqu break; default: +#ifdef WITH_BROKER log__printf(NULL, MOSQ_LOG_DEBUG, "Unsupported property type: %d", property_identifier); +#endif return MOSQ_ERR_MALFORMED_PACKET; } @@ -415,7 +417,9 @@ static int property__write(struct mosquitto__packet *packet, const mosquitto_pro break; default: +#ifdef WITH_BROKER log__printf(NULL, MOSQ_LOG_DEBUG, "Unsupported property type: %d", property->identifier); +#endif return MOSQ_ERR_INVAL; } diff --git a/lib/send_publish.c b/lib/send_publish.c index 1b5ffdaa..be52474b 100644 --- a/lib/send_publish.c +++ b/lib/send_publish.c @@ -177,7 +177,7 @@ int send__real_publish(struct mosquitto *mosq, uint16_t mid, const char *topic, #ifdef WITH_BROKER log__printf(NULL, MOSQ_LOG_NOTICE, "Dropping too large outgoing PUBLISH for %s (%d bytes)", SAFE_PRINT(mosq->id), packetlen); #else - log__printf(NULL, MOSQ_LOG_NOTICE, "Dropping too large outgoing PUBLISH (%d bytes)", packetlen); + log__printf(mosq, MOSQ_LOG_NOTICE, "Dropping too large outgoing PUBLISH (%d bytes)", packetlen); #endif return MOSQ_ERR_OVERSIZE_PACKET; }