Skip to content

Commit

Permalink
lib-smtp: client: Add smtp_client_connection_update_proxy_data().
Browse files Browse the repository at this point in the history
Allows updating the proxy data after creation of the connection.
  • Loading branch information
stephanbosch authored and sirainen committed Dec 4, 2018
1 parent e7a60ca commit c110513
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib-smtp/smtp-client-connection.c
Expand Up @@ -2030,6 +2030,13 @@ void smtp_client_connection_close(struct smtp_client_connection **_conn)
smtp_client_connection_unref(&conn);
}

void smtp_client_connection_update_proxy_data(
struct smtp_client_connection *conn,
const struct smtp_proxy_data *proxy_data)
{
smtp_proxy_data_merge(conn->pool, &conn->set.proxy_data, proxy_data);
}

void smtp_client_connection_switch_ioloop(struct smtp_client_connection *conn)
{
struct smtp_client_transaction *trans;
Expand Down
4 changes: 4 additions & 0 deletions src/lib-smtp/smtp-client-connection.h
Expand Up @@ -58,6 +58,10 @@ void smtp_client_connection_ref(struct smtp_client_connection *conn);
void smtp_client_connection_unref(struct smtp_client_connection **_conn);
void smtp_client_connection_close(struct smtp_client_connection **_conn);

void smtp_client_connection_update_proxy_data(
struct smtp_client_connection *conn,
const struct smtp_proxy_data *proxy_data);

void smtp_client_connection_cork(struct smtp_client_connection *conn);
void smtp_client_connection_uncork(struct smtp_client_connection *conn);

Expand Down

0 comments on commit c110513

Please sign in to comment.