=================================================================== RCS file: /cvs/gnome/evolution-exchange/camel/camel-stub-marshal.c,v retrieving revision 1.3 retrieving revision 1.5 diff -u -r1.3 -r1.5 --- camel-stub-marshal.c 2006/05/08 20:15:55 1.3 +++ camel-stub-marshal.c 2006/06/15 20:36:50 1.5 @@ -1,6 +1,6 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* Copyright (C) 2001-2004 Novell, Inc. +/* Copyright (C) 2001-2006 Novell, Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public @@ -86,7 +86,15 @@ static gboolean do_read (CamelStubMarshal *marshal, char *buf, size_t len) { - if (camel_read (marshal->fd, buf, len) == -1) { + size_t nread = 0; + ssize_t n; + + do { + if ((n = camel_read (marshal->fd, buf + nread, len - nread)) > 0) + nread += n; + } while (n && nread < len && errno != EINTR); + + if (nread < len) { close (marshal->fd); marshal->fd = -1; return FALSE;