Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e8f862

Browse filesBrowse files
committed
SocketHelpers: ping, fix build for generic M4
1 parent 9f0337f commit 9e8f862
Copy full SHA for 9e8f862

File tree

1 file changed

+4
-1
lines changed
Filter options

1 file changed

+4
-1
lines changed

‎libraries/SocketWrapper/src/SocketHelpers.cpp

Copy file name to clipboardExpand all lines: libraries/SocketWrapper/src/SocketHelpers.cpp
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,14 @@ int arduino::MbedSocketClass::ping(SocketAddress &socketAddress, uint8_t ttl, ui
142142
{
143143
/* ttl is not supported by mbed ICMPSocket. Default value used is 255 */
144144
(void)ttl;
145+
int response = -1;
146+
#if MBED_CONF_LWIP_RAW_SOCKET_ENABLED
145147
ICMPSocket s;
146148
s.set_timeout(timeout);
147149
s.open(getNetwork());
148-
int response = s.ping(socketAddress, timeout);
150+
response = s.ping(socketAddress, timeout);
149151
s.close();
152+
#endif
150153

151154
return response;
152155
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.