fix build for !wifi devices

1.2-legacy
Kevin Hester 2021-04-05 13:00:56 +08:00
rodzic 65914fad07
commit 7abc3534c4
1 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -6,9 +6,12 @@
#include "configuration.h"
#include "main.h"
#include "mesh-pb-constants.h"
#include "mqtt/MQTT.h"
#include "plugins/RoutingPlugin.h"
#if defined(HAS_WIFI) || defined(PORTDUINO)
#include "mqtt/MQTT.h"
#endif
/**
* Router todo
*
@ -209,8 +212,10 @@ ErrorCode Router::send(MeshPacket *p)
return encodeResult; // FIXME - this isn't a valid ErrorCode
}
#if defined(HAS_WIFI) || defined(PORTDUINO)
if (mqtt)
mqtt->onSend(*p, chIndex);
#endif
}
assert(iface); // This should have been detected already in sendLocal (or we just received a packet from outside)