"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib-master/stats-client.c" between
dovecot-2.3.16.tar.gz and dovecot-2.3.17.tar.gz

About: Dovecot is an IMAP and POP3 server, written with security primarily in mind.

stats-client.c  (dovecot-2.3.16):stats-client.c  (dovecot-2.3.17)
skipping to change at line 66 skipping to change at line 66
if (client_handshake_filter(args, &filter, &error) < 0) { if (client_handshake_filter(args, &filter, &error) < 0) {
i_error("stats: Received invalid handshake: %s (input: %s)", i_error("stats: Received invalid handshake: %s (input: %s)",
error, t_strarray_join(args, "\t")); error, t_strarray_join(args, "\t"));
return -1; return -1;
} }
client->handshaked = TRUE; client->handshaked = TRUE;
client->handshake_received_at_least_once = TRUE; client->handshake_received_at_least_once = TRUE;
if (client->ioloop != NULL) if (client->ioloop != NULL)
io_loop_stop(client->ioloop); io_loop_stop(client->ioloop);
if (filter == NULL) {
/* stats process wants nothing to be sent to it */
return 1;
}
if (client->filter != NULL) { if (filter == NULL)
/* Filter is already set. It becomes a bit complicated to filter = event_filter_create();
change it. Since it's most likely exactly the same filter
anyway, just keep the old one. */
event_filter_unref(&filter);
return 1;
}
event_filter_unref(&client->filter);
client->filter = filter; client->filter = filter;
if (event_get_global_debug_send_filter() != NULL) { event_set_global_debug_send_filter(client->filter);
/* merge into the global debug send filter */
event_filter_merge(event_get_global_debug_send_filter(),
client->filter);
} else {
/* no global filter yet - use this */
event_set_global_debug_send_filter(client->filter);
}
return 1; return 1;
} }
static int static int
stats_client_input_args(struct connection *conn, const char *const *args) stats_client_input_args(struct connection *conn, const char *const *args)
{ {
struct stats_client *client = (struct stats_client *)conn; struct stats_client *client = (struct stats_client *)conn;
if (!client->handshaked) return stats_client_handshake(client, args);
return stats_client_handshake(client, args);
i_error("stats: Received unexpected input: %s",
t_strarray_join(args, "\t"));
return 0;
} }
static void stats_client_reconnect(struct stats_client *client) static void stats_client_reconnect(struct stats_client *client)
{ {
timeout_remove(&client->to_reconnect); timeout_remove(&client->to_reconnect);
stats_client_connect(client); stats_client_connect(client);
} }
static void stats_client_destroy(struct connection *conn) static void stats_client_destroy(struct connection *conn)
{ {
 End of changes. 6 change blocks. 
24 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)