[Xfce4-commits] <postler:master> Merge mbsync watches and cancel when it's done
Christian Dywan
noreply at xfce.org
Mon Dec 13 20:00:02 CET 2010
Updating branch refs/heads/master
to 3c7e0c2e4e031c9976bcc7eb54bb80c6ec782c79 (commit)
from d9f2232913e720fb179da5d724dd07efccec7f33 (commit)
commit 3c7e0c2e4e031c9976bcc7eb54bb80c6ec782c79
Author: Christian Dywan <christian at twotoasts.de>
Date: Mon Dec 13 19:56:56 2010 +0100
Merge mbsync watches and cancel when it's done
It is important to return false when mbsync is done,
otherwise the service will try to watch the old
pipes forever.
postler/postler-service.vala | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/postler/postler-service.vala b/postler/postler-service.vala
index aa99381..058a1d4 100644
--- a/postler/postler-service.vala
+++ b/postler/postler-service.vala
@@ -26,8 +26,7 @@ namespace Postler {
| SpawnFlags.SEARCH_PATH,
null, out pid, null, out out_fd, null);
IOChannel ioc = new IOChannel.unix_new (out_fd);
- ioc.add_watch (IOCondition.IN, mbsync_input);
- ioc.add_watch (IOCondition.HUP, mbsync_done);
+ ioc.add_watch (IOCondition.IN | IOCondition.HUP, mbsync_input);
}
catch (GLib.Error error) {
var error_dialog = new Gtk.MessageDialog (null, 0,
@@ -48,7 +47,7 @@ namespace Postler {
size_t len;
if ((condition & IOCondition.HUP) == IOCondition.HUP)
- GLib.warning ("Read end of pipe died!");
+ return mbsync_done (gio, condition);
try {
ret = gio.read_line_string (msg, out len);
More information about the Xfce4-commits
mailing list