aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaimo Niskanen <[email protected]>2010-06-21 15:22:37 +0200
committerRaimo Niskanen <[email protected]>2010-07-02 13:42:53 +0200
commitc78bc8bfc4cc1246fa77f3ce32d534982a7eb2b4 (patch)
tree4ef07afa1175680dcef4ccce5b44a1491345adea
parent5ef0b06ddbaa48499394c30d56fc81e7162abf50 (diff)
downloadotp-c78bc8bfc4cc1246fa77f3ce32d534982a7eb2b4.tar.gz
otp-c78bc8bfc4cc1246fa77f3ce32d534982a7eb2b4.tar.bz2
otp-c78bc8bfc4cc1246fa77f3ce32d534982a7eb2b4.zip
Fix inet_drv to detect passive mode UDP errors for SCTP builds
Debug and patch by Per Hedeland for R13B04 on erlang-patches: Connected UDP (and handling of any other errors in UDP recv()) is broken in passive mode for all SCTP-enabled builds.
-rw-r--r--erts/emulator/drivers/common/inet_drv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 87691fc1bc..0ea54930ba 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -9333,11 +9333,13 @@ static int packet_inet_input(udp_descriptor* udesc, HANDLE event)
if (err != ERRNO_BLOCK) {
if (!desc->active) {
#ifdef HAVE_SCTP
- if (short_recv)
+ if (short_recv) {
async_error_am(desc, am_short_recv);
- else
-#else
+ } else {
async_error(desc, err);
+ }
+#else
+ async_error(desc, err);
#endif
driver_cancel_timer(desc->port);
sock_select(desc,FD_READ,0);