Accepting request 244184 from devel:libraries:c_c++

Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/244184
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gsoap?expand=0&rev=10
This commit is contained in:
Ludwig Nussel 2014-08-13 06:48:57 +00:00 committed by Git OBS Bridge
commit aa194e1821
3 changed files with 95 additions and 2 deletions

85
gsoap-06-ipv6retry.diff Normal file
View File

@ -0,0 +1,85 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2014-02-04 17:33:39.018679884 +0100
When using getaddrinfo, *all* sockets must be tried.
Remove pointless casts to void *; this implicit even in C++.
(The code is horribly indented and sprinkled with ifdefs much like
Linux 2.4. That should be factored out into separate functions.)
---
gsoap/stdsoap2.cpp | 14 +++++++++++---
gsoap/stdsoap2.h | 2 ++
2 files changed, 13 insertions(+), 3 deletions(-)
Index: gsoap-2.8.17/gsoap/stdsoap2.cpp
===================================================================
--- gsoap-2.8.17.orig/gsoap/stdsoap2.cpp
+++ gsoap-2.8.17/gsoap/stdsoap2.cpp
@@ -3847,7 +3847,7 @@ tcp_connect(struct soap *soap, const cha
}
soap->errmode = 0;
#ifdef WITH_IPV6
- memset((void*)&hints, 0, sizeof(hints));
+ memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_UNSPEC;
#ifndef WITH_LEAN
if ((soap->omode & SOAP_IO_UDP))
@@ -3868,7 +3868,7 @@ tcp_connect(struct soap *soap, const cha
again:
sk = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
soap->errmode = 0;
-#else
+#else /* WITH_IPV6 */
#ifndef WITH_LEAN
again:
#endif
@@ -3878,7 +3878,7 @@ again:
else
#endif
sk = socket(AF_INET, SOCK_STREAM, 0);
-#endif
+#endif /* WITH_IPV6 */
if (!soap_valid_socket(sk))
{
#ifdef WITH_IPV6
@@ -4081,6 +4081,7 @@ again:
SOAP_SOCKBLOCK(sk)
retries = 10;
#endif
+
for (;;)
{
#ifdef WITH_IPV6
@@ -4089,6 +4090,13 @@ again:
if (connect(sk, (struct sockaddr*)&soap->peer, sizeof(soap->peer)))
#endif
{ err = soap_socket_errno(sk);
+#ifdef WITH_IPV6
+ if (err == SOAP_ECONNREFUSED && res->ai_next != NULL) {
+ soap->fclosesocket(soap, sk);
+ res = res->ai_next;
+ goto again;
+ }
+#endif
#ifndef WITH_LEAN
if (err == SOAP_EADDRINUSE)
{ soap->fclosesocket(soap, sk);
Index: gsoap-2.8.17/gsoap/stdsoap2.h
===================================================================
--- gsoap-2.8.17.orig/gsoap/stdsoap2.h
+++ gsoap-2.8.17/gsoap/stdsoap2.h
@@ -972,11 +972,13 @@ extern "C" {
# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
# define SOAP_EINPROGRESS WSAEINPROGRESS
# define SOAP_EADDRINUSE WSAEADDRINUSE
+# define SOAP_ECONNREFUSED WSAECONNREFUSED
#else
# define SOAP_ERANGE ERANGE
# define SOAP_EINTR EINTR
# define SOAP_EAGAIN EAGAIN
# define SOAP_EADDRINUSE EADDRINUSE
+# define SOAP_ECONNREFUSED ECONNREFUSED
# ifdef SYMBIAN
# define SOAP_EWOULDBLOCK 9898
# define SOAP_EINPROGRESS 9899

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Aug 3 23:16:48 UTC 2014 - jengelh@inai.de
- Add gsoap-06-ipv6retry.diff to try all getaddrinfo results
-------------------------------------------------------------------
Wed Jan 15 19:35:58 UTC 2014 - jengelh@inai.de

View File

@ -28,10 +28,11 @@ Url: http://gsoap2.sf.net/
#DL-URL: http://downloads.sf.net/gsoap2/gsoap_2.8.17.zip
Source: gsoap-%version.tar.xz
Source2: sanitize_source.sh
Patch0: gsoap-automake1_13.diff
Patch13: gsoap-automake1_13.diff
Patch1: gsoap-01-sharedlibs.diff
Patch2: gsoap-02-typepuns.diff
Patch5: gsoap-05-ipv6.diff
Patch6: gsoap-06-ipv6retry.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf
BuildRequires: automake
@ -110,7 +111,9 @@ symlinks for libgsoap.
tar -xf "%{S:0}" --use=xz;
%setup -DTq
%endif
%patch -P 0 -P 1 -P 2 -P 5 -p1
cmp gsoap/stdsoap2.cpp gsoap/stdsoap2.c
%patch -P 13 -P 1 -P 2 -P 5 -P 6 -p1
cp gsoap/stdsoap2.cpp gsoap/stdsoap2.c
%build
# Rebuild configure - fix that utterly long mktime test.