FreeBSD Bugzilla – Attachment 97891 Details for
Bug 136698
[patch] fix ENOTCONN handling in devel/gwenhywfar (socket stalls)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.35 KB, created by
jflemer
on 2009-07-12 18:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
jflemer
Created:
2009-07-12 18:50:01 UTC
Size:
3.35 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/ncvs/ports/devel/gwenhywfar/Makefile,v >retrieving revision 1.14 >diff -u -r1.14 Makefile >--- Makefile 22 Jun 2009 20:19:05 -0000 1.14 >+++ Makefile 12 Jul 2009 17:44:06 -0000 >@@ -7,6 +7,7 @@ > > PORTNAME= gwenhywfar > PORTVERSION= 3.9.0 >+PORTREVISION= 1 > CATEGORIES= devel net security > MASTER_SITES= http://www2.aquamaniac.de/sites/download/ > DISTFILES= download.php\?package=01\&release=25\&file=01\&dummy=gwenhywfar-${PORTVERSION}.tar.gz >--- /dev/null 2009-07-12 10:44:00.000000000 -0700 >+++ files/patch-src::iolayer::io_tls.c 2009-07-12 09:59:44.000000000 -0700 >@@ -0,0 +1,20 @@ >+# $FreeBSD$ >+--- src/iolayer/io_tls.c.orig 2009-06-18 13:56:27.000000000 -0700 >++++ src/iolayer/io_tls.c 2009-07-12 09:56:45.000000000 -0700 >+@@ -310,6 +310,7 @@ >+ if (lflags & GWEN_IO_LAYER_TLS_FLAGS_FORCE_SSL_V3) { >+ const int proto_prio[2] = { GNUTLS_SSL3, 0 }; >+ >++ DBG_INFO(GWEN_LOGDOMAIN, "Forcing SSL v3"); >+ rv=gnutls_protocol_set_priority(xio->session, proto_prio); >+ if (rv) { >+ DBG_ERROR(GWEN_LOGDOMAIN, "gnutls_protocol_set_priority: %d (%s)", rv, gnutls_strerror(rv)); >+@@ -840,7 +841,7 @@ >+ >+ rv=GWEN_Io_LayerCodec_CheckWriteOut(io); >+ if (rv) { >+- if (rv==GWEN_ERROR_TRY_AGAIN) { >++ if (rv==GWEN_ERROR_TRY_AGAIN || rv==GWEN_ERROR_IN_PROGRESS) { >+ DBG_INFO(GWEN_LOGDOMAIN, "here (%d)", rv); >+ #ifdef HAVE_GNUTLS_TRANSPORT_SET_ERRNO >+ gnutls_transport_set_errno(xio->session, EAGAIN); >--- /dev/null 2009-07-12 10:44:00.000000000 -0700 >+++ files/patch-src::os::posix::inetsocket.c 2009-07-12 09:59:44.000000000 -0700 >@@ -0,0 +1,56 @@ >+# $FreeBSD$ >+--- src/os/posix/inetsocket.c.orig 2008-07-31 10:56:06.000000000 -0700 >++++ src/os/posix/inetsocket.c 2009-07-12 09:59:23.000000000 -0700 >+@@ -74,6 +74,7 @@ >+ int GWEN_Socket_NetError2GwenError(int rv) { >+ switch(rv) { >+ case EINTR: return GWEN_ERROR_INTERRUPTED; >++ case ENOTCONN: >+ case EWOULDBLOCK: return GWEN_ERROR_TIMEOUT; >+ case EACCES: >+ case EPERM: return GWEN_ERROR_PERMISSIONS; >+@@ -348,7 +349,7 @@ >+ if (localSocket->socket==-1) { >+ GWEN_InetAddr_free(localAddr); >+ GWEN_Socket_free(localSocket); >+- if (errno==EAGAIN) >++ if (errno==EAGAIN || errno==ENOTCONN) >+ return GWEN_ERROR_TIMEOUT; >+ else { >+ DBG_INFO(GWEN_LOGDOMAIN, "accept(): %s", strerror(errno)); >+@@ -498,7 +499,7 @@ >+ assert(bsize); >+ i=recv(sp->socket,buffer, *bsize,0); >+ if (i<0) { >+- if (errno==EAGAIN) >++ if (errno==EAGAIN || errno==ENOTCONN) >+ return GWEN_ERROR_TIMEOUT; >+ else if (errno==EINTR) >+ return GWEN_ERROR_INTERRUPTED; >+@@ -542,7 +543,7 @@ >+ ); >+ >+ if (i<0) { >+- if (errno==EAGAIN) >++ if (errno==EAGAIN || errno==ENOTCONN) >+ return GWEN_ERROR_TIMEOUT; >+ else if (errno==EINTR) >+ return GWEN_ERROR_INTERRUPTED; >+@@ -594,7 +595,7 @@ >+ &addrlen); >+ if (i<0) { >+ GWEN_InetAddr_free(localAddr); >+- if (errno==EAGAIN) >++ if (errno==EAGAIN || errno==ENOTCONN) >+ return GWEN_ERROR_TIMEOUT; >+ else if (errno==EINTR) >+ return GWEN_ERROR_INTERRUPTED; >+@@ -632,7 +633,7 @@ >+ addr->address, >+ addr->size); >+ if (i<0) { >+- if (errno==EAGAIN) >++ if (errno==EAGAIN || errno==ENOTCONN) >+ return GWEN_ERROR_TIMEOUT; >+ else if (errno==EINTR) >+ return GWEN_ERROR_INTERRUPTED;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 136698
: 97891