Merge pull request #387 from mysensors/fix-udp-compile-problems

Fix compile problems when enabling UDP
This commit is contained in:
Patrick Fallberg
2016-02-06 19:52:37 +01:00
@@ -264,10 +264,16 @@ bool gatewayTransportAvailable()
if (packet_size) {
//debug(PSTR("UDP packet available. Size:%d\n"), packet_size);
_ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
_w5100_spi_en(false);
debug(PSTR("UDP packet received: %s\n"), inputString[0].string);
return protocolParse(_ethernetMsg, inputString[0].string);
#if defined(MY_GATEWAY_ESP8266)
_ethernetServer.read(inputString[0].string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
debug(PSTR("UDP packet received: %s\n"), inputString[0].string);
return protocolParse(_ethernetMsg, inputString[0].string);
#else
_ethernetServer.read(inputString.string, MY_GATEWAY_MAX_RECEIVE_LENGTH);
_w5100_spi_en(false);
debug(PSTR("UDP packet received: %s\n"), inputString.string);
return protocolParse(_ethernetMsg, inputString.string);
#endif
}
#else
#if defined(MY_GATEWAY_ESP8266)