Skip to content

Commit 0c210ee

Browse files
making UDP derived classes compile
1 parent 87ae27a commit 0c210ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libraries/Ethernet/src/EthernetUdp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class EthernetUDP : public lwipUDP {
1010
public:
1111
EthernetUDP() {}
1212
virtual uint8_t begin(uint16_t port) override {
13-
CNetIf *ni = CLwipIf::getInstance().get(NI_ETHERNET);
13+
CNetIf *ni = &Ethernet;
1414
if(ni != nullptr) {
1515
return lwipUDP::begin(IPAddress(ni->getIpAdd()), port);
1616
}

libraries/WiFi/src/WiFiUdp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class WiFiUDP : public lwipUDP {
88
public:
99
WiFiUDP() {}
1010
virtual uint8_t begin(uint16_t port) override {
11-
CNetIf *ni = CLwipIf::getInstance().get(NI_WIFI_STATION);
11+
CNetIf *ni = &WiFiStation;
1212
if(ni != nullptr) {
1313
return lwipUDP::begin(IPAddress(ni->getIpAdd()), port);
1414
}

0 commit comments

Comments
 (0)