pkarashchenko commented on code in PR #1718:
URL: https://github.com/apache/nuttx-apps/pull/1718#discussion_r1173621309
##########
netutils/iperf/iperf.c:
##########
@@ -196,6 +204,47 @@ static int iperf_show_socket_error_reason(FAR const char
*str, int sockfd)
return err;
}
+/****************************************************************************
+ * Name: iperf_print_addr
+ *
+ * Description:
+ * Print addr info
+ *
+ ****************************************************************************/
+
+static void iperf_print_addr(FAR const char *str, FAR struct sockaddr *addr)
+{
+ switch (addr->sa_family)
+ {
+ case AF_INET:
+ {
+ FAR struct sockaddr_in *inaddr = (FAR struct sockaddr_in *)addr;
+ printf("%s: %s:%d\n", str, inet_ntoa(inaddr->sin_addr),
+ htons(inaddr->sin_port));
Review Comment:
Align with `"%s: %s:%d\n"` as I made a mistake, by assuming that `htons` was
passed as a second parameter to `inet_ntoa `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]