View | Details | Raw Unified
Collapse All | Expand All

(-) camel-stub-marshal.c (-2 / +10 lines)
 Lines 1-6    Link Here 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* -*- 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
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * modify it under the terms of version 2 of the GNU General Public
 Lines 86-92    Link Here 
static gboolean
static gboolean
do_read (CamelStubMarshal *marshal, char *buf, size_t len)
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);
		close (marshal->fd);
		marshal->fd = -1;
		marshal->fd = -1;
		return FALSE;
		return FALSE;