~ubuntu-branches/ubuntu/wily/dovecot/wily

« back to all changes in this revision

Viewing changes to src/lib-lda/lmtp-client.c

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2015-05-24 15:01:19 UTC
  • mto: (4.1.53 sid)
  • mto: This revision was merged to the branch mainline in revision 102.
  • Revision ID: package-import@ubuntu.com-20150524150119-hsh6cbr1fqseapga
Tags: upstream-2.2.18
ImportĀ upstreamĀ versionĀ 2.2.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
        unsigned int rcpt_next_send_idx;
72
72
        struct istream *data_input;
73
73
        unsigned char output_last;
 
74
        struct lmtp_client_times times;
74
75
 
75
76
        unsigned int running:1;
76
77
        unsigned int xclient_sent:1;
392
393
        }
393
394
        o_stream_nsend(client->output, ".\r\n", 3);
394
395
        client->output_finished = TRUE;
 
396
        io_loop_time_refresh();
 
397
        client->times.data_sent = ioloop_timeval;
395
398
        return 0;
396
399
}
397
400
 
507
510
                                "451 4.5.0 Received invalid greeting: %s", line));
508
511
                        return -1;
509
512
                }
 
513
                client->times.banner_received = ioloop_timeval;
510
514
                lmtp_client_send_handshake(client);
511
515
                client->input_state = LMTP_INPUT_STATE_LHLO;
512
516
                break;
561
565
                        return -1;
562
566
                }
563
567
                client->input_state++;
 
568
                client->times.data_started = ioloop_timeval;
564
569
                if (client->data_header != NULL)
565
570
                        o_stream_nsend_str(client->output, client->data_header);
566
571
                if (lmtp_client_send_data(client) < 0)
662
667
{
663
668
        i_assert(client->fd == -1);
664
669
 
 
670
        client->times.connect_started = ioloop_timeval;
 
671
 
665
672
        client->fd = net_connect_ip(&client->ip, client->port, NULL);
666
673
        if (client->fd == -1) {
667
674
                i_error("lmtp client: connect(%s, %u) failed: %m",
879
886
        client->data_output_callback = callback;
880
887
        client->data_output_context = context;
881
888
}
 
889
 
 
890
const struct lmtp_client_times *
 
891
lmtp_client_get_times(struct lmtp_client *client)
 
892
{
 
893
        return &client->times;
 
894
}