diff --git a/gajim-0.14-handle-read-before-close.patch b/gajim-0.14-handle-read-before-close.patch new file mode 100644 index 0000000..8f340da --- /dev/null +++ b/gajim-0.14-handle-read-before-close.patch @@ -0,0 +1,49 @@ +handle read event before close event in case pipe sends us something and close pipe in the same time. + +fixes a regression caused by gajim-0.14-check-error.patch +(Peter could not connect to gmail.com, reported in + https://admin.fedoraproject.org/updates/gajim-0.14.1-2.fc14) + +# HG changeset patch +# User Yann Leboulanger +# Date 1288345298 -7200 +# Node ID 50980325f73d04f447f679834f4e88cf6806954a +# Parent 56dcfc87d01e39cbcd30eba453e3e9d8efcaed17 + +diff -r 56dcfc87d01e -r 50980325f73d src/common/xmpp/idlequeue.py +--- a/src/common/xmpp/idlequeue.py Fri Oct 29 11:37:07 2010 +0200 ++++ b/src/common/xmpp/idlequeue.py Fri Oct 29 11:41:38 2010 +0200 +@@ -388,6 +388,16 @@ + self.unplug_idle(fd) + return False + ++ read_write = False ++ if flags & PENDING_READ: ++ #print 'waiting read on %d, flags are %d' % (fd, flags) ++ obj.pollin() ++ read_write = True ++ ++ elif flags & PENDING_WRITE and not flags & IS_CLOSED: ++ obj.pollout() ++ read_write = True ++ + if flags & IS_CLOSED: + # io error, don't expect more events + self.remove_timeout(obj.fd) +@@ -395,15 +405,8 @@ + obj.pollend() + return False + +- if flags & PENDING_READ: +- #print 'waiting read on %d, flags are %d' % (fd, flags) +- obj.pollin() ++ if read_write: + return True +- +- if flags & PENDING_WRITE: +- obj.pollout() +- return True +- + return False + + def process(self): diff --git a/gajim.spec b/gajim.spec index 44e7e37..d206120 100644 --- a/gajim.spec +++ b/gajim.spec @@ -2,13 +2,14 @@ Summary: Jabber client written in PyGTK Name: gajim %global majorver 0.14 Version: 0.14.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 Group: Applications/Internet URL: http://gajim.org/ Source0: http://gajim.org/downloads/%{majorver}/%{name}-%{version}.tar.bz2 Patch0: gajim-0.13.90-pygtk-crash-python2.7-workaround.patch Patch4: gajim-0.14-check-error.patch +Patch5: gajim-0.14-handle-read-before-close.patch BuildArch: noarch Requires: avahi-ui-tools @@ -60,6 +61,7 @@ Gajim does not require GNOME to run, even though it exists with it nicely. %setup -q %patch0 -p1 %patch4 -p1 +%patch5 -p1 %build %configure --docdir=%{_docdir}/%{name}-%{version} @@ -113,6 +115,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %{_datadir}/%{name}/src %changelog +* Mon Nov 15 2010 Michal Schmidt 0.14.1-3 +- Fix a regression noted by Peter Lemenkov in Bodhi. + (Could not connect to gmail.com) + * Fri Nov 05 2010 Michal Schmidt 0.14.1-2 - Fix high CPU usage when the server announces a strange streamhost (RHBZ#649986)