Skip to content

Commit

Permalink
lib-smtp: smtp-client - Rename event setting to event_parent.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch committed Mar 12, 2019
1 parent 3c38f63 commit 380e43c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib-smtp/smtp-client-connection.c
Expand Up @@ -1824,8 +1824,8 @@ smtp_client_connection_do_create(struct smtp_client *client, const char *name,
conn->cap_pool = pool_alloconly_create
("smtp client connection capabilities", 128);

if (set != NULL && set->event != NULL)
conn_event = event_create(set->event);
if (set != NULL && set->event_parent != NULL)
conn_event = event_create(set->event_parent);
else
conn_event = event_create(client->event);
event_set_append_log_prefix(
Expand Down
2 changes: 1 addition & 1 deletion src/lib-smtp/smtp-client.c
Expand Up @@ -90,7 +90,7 @@ struct smtp_client *smtp_client_init(const struct smtp_client_settings *set)

/* There is no event log prefix added here, since the client itself does
not log anything and the prefix is protocol-dependent. */
client->event = event_create(set->event);
client->event = event_create(set->event_parent);
event_add_category(client->event, &event_category_smtp_client);
event_set_forced_debug(client->event, set->debug);

Expand Down
7 changes: 4 additions & 3 deletions src/lib-smtp/smtp-client.h
Expand Up @@ -89,9 +89,10 @@ struct smtp_client_settings {
size_t socket_send_buffer_size;
size_t socket_recv_buffer_size;

/* Event to use for the smtp client. For specific transactions this can
be overridden with smtp_client_transaction_set_event(). */
struct event *event;
/* Event to use as the parent for the smtp client/connection event. For
specific transactions this can be overridden with
smtp_client_transaction_set_event(). */
struct event *event_parent;

/* enable logging debug messages */
bool debug;
Expand Down
2 changes: 1 addition & 1 deletion src/lib-smtp/smtp-submit.c
Expand Up @@ -331,7 +331,7 @@ smtp_submit_send_host(struct smtp_submit *subm)
smtp_set.command_timeout_msecs = set->submission_timeout*1000;
smtp_set.debug = set->mail_debug;
smtp_set.ssl = &subm->session->ssl_set;
smtp_set.event = subm->event;
smtp_set.event_parent = subm->event;

ssl_mode = SMTP_CLIENT_SSL_MODE_NONE;
if (set->submission_ssl != NULL) {
Expand Down

0 comments on commit 380e43c

Please sign in to comment.