Skip to content

Commit

Permalink
lib-smtp: client: Use the new connection_input_halt/resume() functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and villesavolainen committed Mar 12, 2018
1 parent 6d4e1c7 commit 758b649
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lib-smtp/smtp-client-connection.c
Expand Up @@ -1268,7 +1268,7 @@ smtp_client_connection_ssl_init(struct smtp_client_connection *conn,
conn->conn.output = conn->raw_output;
}

io_remove(&conn->conn.io);
connection_input_halt(&conn->conn);
if (io_stream_create_ssl_client(conn->ssl_ctx,
conn->host, conn->set.ssl,
&conn->conn.input, &conn->conn.output,
Expand All @@ -1278,9 +1278,7 @@ smtp_client_connection_ssl_init(struct smtp_client_connection *conn,
conn->conn.name, error);
return -1;
}
conn->conn.io = io_add_istream(conn->conn.input,
smtp_client_connection_input,
&conn->conn);
connection_input_resume(&conn->conn);
smtp_client_connection_streams_changed(conn);

ssl_iostream_set_handshake_callback(conn->ssl_iostream,
Expand Down

0 comments on commit 758b649

Please sign in to comment.