SHA256
1
0
forked from pool/gsoap
gsoap/gsoap-no-tcpfastopen-fail.diff

30 lines
1.2 KiB
Diff

From: Folkert van Heusden <f.vanheusden@zarafa.com> / Jan Engelhardt <j.engelhardt@zarafa.com>
References: http://sf.net/p/gsoap2/patches/159/
setsockopt TCP_FASTOPEN can fail with -ENOPROTOSUPPORT if the kernel
can't do it, and then all of gsoap aborts :(
Ignore return value, so that the zarafa-server still starts even
in the absence of TCP_FASTOPEN.
---
gsoap/stdsoap2.cpp | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
Index: gsoap-2.8.22/gsoap/stdsoap2.cpp
===================================================================
--- gsoap-2.8.22.orig/gsoap/stdsoap2.cpp
+++ gsoap-2.8.22/gsoap/stdsoap2.cpp
@@ -5140,11 +5140,7 @@ soap_bind(struct soap *soap, const char
}
#endif
#ifdef TCP_FASTOPEN
- if (!(soap->omode & SOAP_IO_UDP) && setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int)))
- { soap->errnum = soap_socket_errno(soap->master);
- soap_set_receiver_error(soap, tcp_error(soap), "setsockopt TCP_FASTOPEN failed in soap_bind()", SOAP_TCP_ERROR);
- return SOAP_INVALID_SOCKET;
- }
+ if (!(soap->omode & SOAP_IO_UDP)) setsockopt(soap->master, SOL_TCP, TCP_FASTOPEN, (char*)&set, sizeof(int));
#endif
#endif
#endif