Mercurial > dovecot > original-hg > dovecot-1.2
view src/lib/iostream.c @ 6429:65c69a53a7be HEAD
Replaced my Copyright notices. The year range always ends with 2007 now.
My name was replaced with "Dovecot authors". In many cases I didn't really
even own the copyright, so this is more correct.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 16 Sep 2007 14:34:22 +0300 |
parents | 3a960ffa5de8 |
children | 56a5a00e490c |
line wrap: on
line source
/* Copyright (c) 2002-2007 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "iostream-internal.h" static void io_stream_default_close_destroy(struct iostream_private *stream ATTR_UNUSED) { } void io_stream_init(struct iostream_private *stream) { if (stream->close == NULL) stream->close = io_stream_default_close_destroy; if (stream->destroy == NULL) stream->destroy = io_stream_default_close_destroy; stream->refcount = 1; } void io_stream_ref(struct iostream_private *stream) { stream->refcount++; } void io_stream_unref(struct iostream_private *stream) { i_assert(stream->refcount > 0); if (--stream->refcount != 0) return; stream->close(stream); stream->destroy(stream); i_free(stream); } void io_stream_close(struct iostream_private *stream) { stream->close(stream); } void io_stream_set_max_buffer_size(struct iostream_private *stream, size_t max_size) { stream->set_max_buffer_size(stream, max_size); }