We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8e6ce68 + 3c00785 commit e0b314cCopy full SHA for e0b314c
net/LWIPInterface/LWIPInterface.cpp
@@ -94,6 +94,11 @@ static void set_mac_address(void)
94
/* Interface implementation */
95
int LWIPInterface::connect()
96
{
97
+ // Check if we've already connected
98
+ if (get_ip_address()) {
99
+ return 0;
100
+ }
101
+
102
// Set up network
103
set_mac_address();
104
init_netif(0, 0, 0);
@@ -118,6 +123,8 @@ int LWIPInterface::disconnect()
118
123
dhcp_stop(&netif);
119
124
120
125
eth_arch_disable_interrupts();
126
+ ip_addr[0] = '\0';
127
+ mac_addr[0] = '\0';
121
128
122
129
return 0;
130
}
0 commit comments