On 7/20/23 8:30 AM, Lorenz Bauer wrote:
+static int echo_test_udp(int fd_sv) +{
- struct sockaddr_storage addr = {};
- socklen_t len = sizeof(addr);
- char buff[1] = {};
- int fd_cl = -1, ret;
- fd_cl = connect_to_fd(fd_sv, 100);
- ASSERT_GT(fd_cl, 0, "create_client");
- ASSERT_EQ(getsockname(fd_cl, (void *)&addr, &len), 0, "getsockname");
- ASSERT_EQ(send(fd_cl, buff, sizeof(buff), 0), 1, "send_client");
- ret = recv(fd_sv, buff, sizeof(buff), 0);
- if (ret < 0)
I think this needs a close(fd_cl).
return errno;