Skip to content

Commit def2574

Browse files
author
Kimmo Vaisanen
committed
Fix trace print for TCPSocket.open()
Fixed the correct socket type in trace print.
1 parent 4850665 commit def2574

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,11 @@ nsapi_error_t test_send_recv()
158158

159159
retcode = sock.open(iface);
160160
if (retcode != NSAPI_ERROR_OK) {
161+
#if MBED_CONF_APP_SOCK_TYPE == TCP
162+
print_function("TCPSocket.open() fails, code: %d\n", retcode);
163+
#else
161164
print_function("UDPSocket.open() fails, code: %d\n", retcode);
165+
#endif
162166
return -1;
163167
}
164168

0 commit comments

Comments
 (0)