GNOME Bugzilla – Bug 529454
[udpsrc] generates false error on win32 due to ICMP dest-unreachable message
Last modified: 2008-05-01 10:52:20 UTC
Hi, udpsrc on Windows can generate a false error. When sending a packet with udpsink, if the remote ip/port is unreachable, we receive an ICMP response with "port unreachable"... the corresponding udpsrc will then return an error on the recvfrom and WSAGetLastError will return WSAECONNRESET. That error is not checked (actually errors from recvfrom do not check WSAGetLastError at all). The correct behavior would be to ignore the WSAECONNRESET and retry to recv a packet instead of throwing an error.
Created attachment 109729 [details] [review] Patch to fix the WSAECONNRESET error on udpsrc on Windows
Created attachment 110121 [details] [review] updated patch: don't leak pktdata when retrying; mention socket error code in error message / log on win32
Committed, thanks: 2008-05-01 Tim-Philipp Müller <tim.muller at collabora co uk> Patch by: Youness Alaoui <youness.alaoui at collabora co uk> * gst/udp/gstudpsrc.c: (gst_udpsrc_create): Don't error out if we get an ICMP destination-unreachable message when trying to read packets on win32 (#529454).