~ubuntu-branches/ubuntu/raring/postfix/raring

« back to all changes in this revision

Viewing changes to src/util/dummy_read.c

Tags: upstream-2.2.6
ImportĀ upstreamĀ versionĀ 2.2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*++
 
2
/* NAME
 
3
/*      dummy_read 3
 
4
/* SUMMARY
 
5
/*      dummy read operation
 
6
/* SYNOPSIS
 
7
/*      #include <iostuff.h>
 
8
/*
 
9
/*      int     dummy_read(fd, buf, buf_len, timeout, context)
 
10
/*      int     fd;
 
11
/*      void    *buf;
 
12
/*      unsigned len;
 
13
/*      int     timeout;
 
14
/*      void    *context;
 
15
/* DESCRIPTION
 
16
/*      dummy_read() reports an EOF condition without side effects.
 
17
/*
 
18
/*      Arguments:
 
19
/* .IP fd
 
20
/*      File descriptor in the range 0..FD_SETSIZE. Its value is logged
 
21
/*      when verbose logging is turned on.
 
22
/* .IP buf
 
23
/*      Read buffer pointer. Not used.
 
24
/* .IP buf_len
 
25
/*      Read buffer size. Its value is logged when verbose logging is
 
26
/*      turned on.
 
27
/* .IP timeout
 
28
/*      The deadline in seconds. Not used.
 
29
/* .IP context
 
30
/*      Application context. Not used.
 
31
/* DIAGNOSTICS
 
32
/*      None.
 
33
/* LICENSE
 
34
/* .ad
 
35
/* .fi
 
36
/*      The Secure Mailer license must be distributed with this software.
 
37
/* AUTHOR(S)
 
38
/*      Wietse Venema
 
39
/*      IBM T.J. Watson Research
 
40
/*      P.O. Box 704
 
41
/*      Yorktown Heights, NY 10598, USA
 
42
/*--*/
 
43
 
 
44
/* System library. */
 
45
 
 
46
#include <sys_defs.h>
 
47
 
 
48
/* Utility library. */
 
49
 
 
50
#include <msg.h>
 
51
#include <iostuff.h>
 
52
 
 
53
/* dummy_read - dummy read operation */
 
54
 
 
55
int     dummy_read(int fd, void *unused_buf, unsigned len,
 
56
                           int unused_timeout, void *unused_context)
 
57
{
 
58
    if (msg_verbose)
 
59
        msg_info("dummy_read: fd %d, len %d", fd, len);
 
60
    return (0);
 
61
}