~ubuntu-branches/ubuntu/trusty/postfix/trusty-updates

« back to all changes in this revision

Viewing changes to src/smtpstone/qmqp-sink.c

Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
#include <string.h>
57
57
#include <stdlib.h>
58
58
#include <fcntl.h>
59
 
 
60
 
#ifdef STRCASECMP_IN_STRINGS_H
61
 
#include <strings.h>
62
 
#endif
 
59
#include <signal.h>
63
60
 
64
61
/* Utility library. */
65
62
 
88
85
static int var_tmout;
89
86
static VSTRING *buffer;
90
87
static void disconnect(SINK_STATE *);
91
 
static int count;
 
88
static int count_deliveries;
92
89
static int counter;
93
90
 
94
91
/* send_reply - finish conversation */
98
95
    vstring_sprintf(buffer, "%cOk", QMQP_STAT_OK);
99
96
    NETSTRING_PUT_BUF(state->stream, buffer);
100
97
    netstring_fflush(state->stream);
101
 
    if (count) {
 
98
    if (count_deliveries) {
102
99
        counter++;
103
100
        vstream_printf("%d\r", counter);
104
101
        vstream_fflush(VSTREAM_OUT);
247
244
    INET_PROTO_INFO *proto_info;
248
245
 
249
246
    /*
 
247
     * Fix 20051207.
 
248
     */
 
249
    signal(SIGPIPE, SIG_IGN);
 
250
 
 
251
    /*
250
252
     * Initialize diagnostics.
251
253
     */
252
254
    msg_vstream_init(argv[0], VSTREAM_ERR);
263
265
            protocols = INET_PROTO_NAME_IPV6;
264
266
            break;
265
267
        case 'c':
266
 
            count++;
 
268
            count_deliveries++;
267
269
            break;
268
270
        case 'v':
269
271
            msg_verbose++;