Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 May 2006 18:29:44 GMT
From:      Stephan Maka <stephan@spaceboyz.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/97358: [MAINTAINER] net-im/gajim - Add patch to fix file-transfer connection problems
Message-ID:  <200605161829.k4GITiE7001973@www.freebsd.org>
Resent-Message-ID: <200605161830.k4GIUFks015181@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         97358
>Category:       ports
>Synopsis:       [MAINTAINER] net-im/gajim - Add patch to fix file-transfer connection problems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 16 18:30:15 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stephan Maka
>Release:        6.1-PRERELEASE
>Organization:
>Environment:
FreeBSD 6.1-PRERELEASE #3: Fri Feb  3 22:05:12 CET 2006     root@saturn.sin:/usr/obj/usr/src/sys/SATURN  i386
>Description:
The patch has been sent to me by Dimitur Kirov, who is a Gajim dev. The problem this patch solves is FreeBSD-specific.
>How-To-Repeat:

>Fix:
diff -urN /usr/ports/net-im/gajim/Makefile net-im/gajim/Makefile
--- /usr/ports/net-im/gajim/Makefile	Sun May  7 13:54:21 2006
+++ net-im/gajim/Makefile	Tue May 16 20:25:11 2006
@@ -7,6 +7,7 @@
 
 PORTNAME=	gajim
 PORTVERSION=	0.10
+PORTREVISION=	1
 CATEGORIES=	net-im
 MASTER_SITES=	http://www.gajim.org/downloads/
 
@@ -15,6 +16,8 @@
 
 LIB_DEPENDS=	gtkspell.0:${PORTSDIR}/textproc/gtkspell2
 RUN_DEPENDS=	${PYTHON_SITELIBDIR}/pysqlite2/__init__.py:${PORTSDIR}/databases/py-pysqlite21
+
+PATCH_DIST_STRIP=-p1
 
 USE_X_PREFIX=	yes
 USE_PYTHON=	2.3+
diff -urN /usr/ports/net-im/gajim/files/patch-Changeset6314 net-im/gajim/files/patch-Changeset6314
--- /usr/ports/net-im/gajim/files/patch-Changeset6314	Thu Jan  1 01:00:00 1970
+++ net-im/gajim/files/patch-Changeset6314	Tue May 16 19:59:26 2006
@@ -0,0 +1,39 @@
+diff -urN gajim-0.10/src/common/proxy65_manager.py gajim-0.10-patched/src/common/proxy65_manager.py
+--- src/common/proxy65_manager.py	Mon May  1 18:49:14 2006
++++ src/common/proxy65_manager.py	Tue May 16 19:55:10 2006
+@@ -15,6 +15,7 @@
+ ##
+ import socket 
+ import struct
++import errno
+ 
+ import common.xmpp
+ from common import gajim
+@@ -246,16 +247,18 @@
+ 			self._recv=self._sock.recv
+ 		except Exception, ee:
+ 			(errnum, errstr) = ee
+-			if errnum == 111:
+-				self.on_failure()
+-				return None
++			if errnum in (errno.EINPROGRESS, errno.EALREADY, errno.EWOULDBLOCK): 
++				# still trying to connect
++				return
+ 			# win32 needs this
+-			elif errnum != 10056 or self.state != 0:
+-				return None
+-			else: # socket is already connected
+-				self._sock.setblocking(False)
+-				self._send=self._sock.send
+-				self._recv=self._sock.recv
++			if errnum not in (0, 10056, errno.EISCONN):
++				# connection failed
++				self.on_failure()
++				return
++			# socket is already connected
++			self._sock.setblocking(False)
++			self._send=self._sock.send
++			self._recv=self._sock.recv
+ 		self.buff = ''
+ 		self.state = 1 # connected
+ 		self.idlequeue.plug_idle(self, True, False)

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605161829.k4GITiE7001973>