Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit a6df721

Browse files
Remove usage of deprecated string-based API
1 parent 0704278 commit a6df721

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,13 @@ int main()
101101

102102
printf("Success\n\n");
103103
printf("MAC: %s\n", wifi->get_mac_address());
104-
printf("IP: %s\n", wifi->get_ip_address());
105-
printf("Netmask: %s\n", wifi->get_netmask());
106-
printf("Gateway: %s\n", wifi->get_gateway());
104+
SocketAddress a;
105+
wifi->get_ip_address(&a);
106+
printf("IP: %s\n", a.get_ip_address());
107+
wifi->get_netmask(&a);
108+
printf("Netmask: %s\n", a.get_ip_address());
109+
wifi->get_gateway(&a);
110+
printf("Gateway: %s\n", a.get_ip_address());
107111
printf("RSSI: %d\n\n", wifi->get_rssi());
108112

109113
wifi->disconnect();

0 commit comments

Comments
 (0)