Skip to content

Commit f2c24f9

Browse files
author
Kimmo Vaisanen
authored
Merge pull request #101 from ARMmbed/fix_tcpsocket_open_trace
Fix trace print for TCPSocket.open()
2 parents 4850665 + def2574 commit f2c24f9

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)