Sisyphus repositório
Última atualização: 26 novembro 2021 | SRPMs: 17418 | Visitas: 22391968
en ru br
ALT Linux repositórios
S:1.3.0-alt1
5.0: 1.0.2-alt0svn3751
4.1: 1.0.2-alt0svn3751.M41.1
4.0: 1.0.1-alt1

Group :: Desktop gráfico/XFce
RPM: xfce4-mailwatch-plugin

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: 01_fix-cpu-usage.diff
Download


Description: fix high CPU usage
Author: Brian Tarricone <brian@tarricone.org>
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523312
Bug: http://bugzilla.xfce.org/show_bug.cgi?id=4494
Applied-Upstream: 1.1.1, http://git.xfce.org/panel-plugins/xfce4-mailwatch-plugin/commit/?id=491acb38de89ab845d6a80f23c36d3df8da70421
diff --git a/libmailwatch-core/mailwatch-net-conn.c b/libmailwatch-core/mailwatch-net-conn.c
index 9264376..0f88678 100644
--- a/libmailwatch-core/mailwatch-net-conn.c
+++ b/libmailwatch-core/mailwatch-net-conn.c
@@ -767,10 +767,16 @@ xfce_mailwatch_net_conn_recv_internal(XfceMailwatchNetConn *net_conn,
             return -1;
         } else if(!block)
             return 0;
-    } while(ret < 0 && EINTR == errno && !TIMER_EXPIRED(RECV_TIMEOUT)
-            && SHOULD_CONTINUE(net_conn));
+    } while((ret == 0 || (ret < 0 && EINTR == errno))
+            && !TIMER_EXPIRED(RECV_TIMEOUT) && SHOULD_CONTINUE(net_conn));
 
-    if(!SHOULD_CONTINUE(net_conn)) {
+    if(ret < 0 && EINTR != errno) {
+        if(error) {
+            g_set_error(error, XFCE_MAILWATCH_ERROR,
+                        XFCE_MAILWATCH_ERROR_FAILED, strerror(errno));
+        }
+        return -1;
+    } else if(!SHOULD_CONTINUE(net_conn)) {
         if(error) {
             g_set_error(error, XFCE_MAILWATCH_ERROR,
                         XFCE_MAILWATCH_ERROR_ABORTED, _("Operation aborted"));
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009