Closed MixusMinimax closed 1 month ago
This recvfrom call returns -1, and errno is 22 (EINVAL). This is because addr_len is not initialized.
errno
EINVAL
addr_len
https://github.com/named-data-iot/ndn-iot-package-over-posix/blob/f5103fd2e855b151efe22d183cb5a62252ec6a8c/adaptation/udp/udp-face.c#L203-L211
initialize addr_len, as it is an in/out argument, not just an out argument. SO: https://stackoverflow.com/a/3002464
Problem
This recvfrom call returns -1, and
errno
is 22 (EINVAL
). This is becauseaddr_len
is not initialized.https://github.com/named-data-iot/ndn-iot-package-over-posix/blob/f5103fd2e855b151efe22d183cb5a62252ec6a8c/adaptation/udp/udp-face.c#L203-L211
Solution
initialize addr_len, as it is an in/out argument, not just an out argument. SO: https://stackoverflow.com/a/3002464