[gajim/f14/master] - Fix high CPU usage when the server announces a strange streamhost (RHBZ#649986)
Michal Schmidt
michich at fedoraproject.org
Fri Nov 5 21:38:06 UTC 2010
commit d62fb74e55ce68048113e2851b0a6b0865e2ef0b
Author: Michal Schmidt <mschmidt at redhat.com>
Date: Fri Nov 5 22:30:55 2010 +0100
- Fix high CPU usage when the server announces a strange streamhost
(RHBZ#649986)
gajim-0.14-check-error.patch | 37 +++++++++++++++++++++++++++++++++++++
gajim.spec | 8 +++++++-
2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/gajim-0.14-check-error.patch b/gajim-0.14-check-error.patch
new file mode 100644
index 0000000..8bffbc3
--- /dev/null
+++ b/gajim-0.14-check-error.patch
@@ -0,0 +1,37 @@
+check error before incoming or outgoing events
+
+https://bugzilla.redhat.com/show_bug.cgi?id=649986
+http://trac.gajim.org/ticket/5991
+
+diff -r c47219e5a552 -r ba5c2eb1f1e7 src/common/xmpp/idlequeue.py
+--- a/src/common/xmpp/idlequeue.py Mon Oct 25 20:09:30 2010 +0200
++++ b/src/common/xmpp/idlequeue.py Mon Oct 25 21:06:45 2010 +0200
+@@ -388,20 +388,22 @@
+ self.unplug_idle(fd)
+ return False
+
++ if flags & IS_CLOSED:
++ # io error, don't expect more events
++ self.remove_timeout(obj.fd)
++ self.unplug_idle(obj.fd)
++ obj.pollend()
++ return False
++
+ if flags & PENDING_READ:
+ #print 'waiting read on %d, flags are %d' % (fd, flags)
+ obj.pollin()
+ return True
+
+- elif flags & PENDING_WRITE:
++ if flags & PENDING_WRITE:
+ obj.pollout()
+ return True
+
+- elif flags & IS_CLOSED:
+- # io error, don't expect more events
+- self.remove_timeout(obj.fd)
+- self.unplug_idle(obj.fd)
+- obj.pollend()
+ return False
+
+ def process(self):
diff --git a/gajim.spec b/gajim.spec
index 4dac1c9..13d44f5 100644
--- a/gajim.spec
+++ b/gajim.spec
@@ -2,7 +2,7 @@ Summary: Jabber client written in PyGTK
Name: gajim
%global majorver 0.14
Version: 0.14.1
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv3
Group: Applications/Internet
URL: http://gajim.org/
@@ -11,6 +11,7 @@ Patch0: gajim-0.13.90-pygtk-crash-python2.7-workaround.patch
# libasyncns triggers a kernel bug (RHBZ#529202), so let's not use it until
# it's fixed.
Patch3: gajim-0.14-disable-libasyncns.patch
+Patch4: gajim-0.14-check-error.patch
BuildArch: noarch
Requires: avahi-ui-tools
@@ -63,6 +64,7 @@ Gajim does not require GNOME to run, even though it exists with it nicely.
%setup -q
%patch0 -p1
%patch3 -p1
+%patch4 -p1
%build
%configure --docdir=%{_docdir}/%{name}-%{version}
@@ -116,6 +118,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/%{name}/src
%changelog
+* Fri Nov 05 2010 Michal Schmidt <mschmidt at redhat.com> 0.14.1-2
+- Fix high CPU usage when the server announces a strange streamhost
+ (RHBZ#649986)
+
* Tue Oct 26 2010 Michal Schmidt <mschmidt at redhat.com> 0.14.1-1
- Upstream bugfix release.
- Dropped merged patches.
More information about the scm-commits
mailing list