Lines 1-6
Link Here
|
1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 |
|
2 |
|
3 |
/* Copyright (C) 2001-2004 Novell, Inc. |
3 |
/* Copyright (C) 2001-2006 Novell, Inc. |
4 |
* |
4 |
* |
5 |
* This program is free software; you can redistribute it and/or |
5 |
* This program is free software; you can redistribute it and/or |
6 |
* modify it under the terms of version 2 of the GNU General Public |
6 |
* modify it under the terms of version 2 of the GNU General Public |
Lines 86-92
Link Here
|
86 |
static gboolean |
86 |
static gboolean |
87 |
do_read (CamelStubMarshal *marshal, char *buf, size_t len) |
87 |
do_read (CamelStubMarshal *marshal, char *buf, size_t len) |
88 |
{ |
88 |
{ |
89 |
if (camel_read (marshal->fd, buf, len) == -1) { |
89 |
size_t nread = 0; |
|
|
90 |
ssize_t n; |
91 |
|
92 |
do { |
93 |
if ((n = camel_read (marshal->fd, buf + nread, len - nread)) > 0) |
94 |
nread += n; |
95 |
} while (n && nread < len && errno != EINTR); |
96 |
|
97 |
if (nread < len) { |
90 |
close (marshal->fd); |
98 |
close (marshal->fd); |
91 |
marshal->fd = -1; |
99 |
marshal->fd = -1; |
92 |
return FALSE; |
100 |
return FALSE; |