/* IDLE continues after sending changes */
str_append(str, "\tidle-continue");
}
+ /* For imap_logout_format statistics: */
+ str_printfa(str,
+ "\tfetch_hdr_count=%u\tfetch_hdr_bytes=%"PRIu64
+ "\tfetch_body_count=%u\tfetch_body_bytes=%"PRIu64
+ "\tdeleted_count=%u\texpunged_count=%u\ttrashed_count=%u"
+ "\tautoexpunged_count=%u\tappend_count=%u"
+ "\tinput_bytes_extra=%"PRIuUOFF_T
+ "\toutput_bytes_extra=%"PRIuUOFF_T,
+ client->state.logout_stats.fetch_hdr_count,
+ client->state.logout_stats.fetch_hdr_bytes,
+ client->state.logout_stats.fetch_body_count,
+ client->state.logout_stats.fetch_body_bytes,
+ client->state.logout_stats.deleted_count,
+ client->state.logout_stats.expunged_count,
+ client->state.logout_stats.trashed_count,
+ client->state.logout_stats.autoexpunged_count,
+ client->state.logout_stats.append_count,
+ i_stream_get_absolute_offset(client->input) + client->state.logout_stats.input_bytes_extra,
+ client->output->offset + client->state.logout_stats.output_bytes_extra);
str_append_c(str, '\n');
/* send the fd first */
}
state_r->state = state_buf->data;
state_r->state_size = state_buf->used;
+ } else if (strcmp(key, "fetch_hdr_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.fetch_hdr_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid fetch_hdr_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "fetch_hdr_bytes") == 0) {
+ if (str_to_uint64(value, &state_r->logout_stats.fetch_hdr_bytes) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid fetch_hdr_bytes value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "fetch_body_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.fetch_body_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid fetch_body_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "fetch_body_bytes") == 0) {
+ if (str_to_uint64(value, &state_r->logout_stats.fetch_body_bytes) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid fetch_body_bytes value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "deleted_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.deleted_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid deleted_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "expunged_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.expunged_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid expunged_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "trashed_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.trashed_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid trashed_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "autoexpunged_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.autoexpunged_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid autoexpunged_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "append_count") == 0) {
+ if (str_to_uint(value, &state_r->logout_stats.append_count) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid append_count value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "input_bytes_extra") == 0) {
+ if (str_to_uoff(value, &state_r->logout_stats.input_bytes_extra) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid input_bytes_extra value: %s", value);
+ return -1;
+ }
+ } else if (strcmp(key, "output_bytes_extra") == 0) {
+ if (str_to_uoff(value, &state_r->logout_stats.output_bytes_extra) < 0) {
+ *error_r = t_strdup_printf(
+ "Invalid output_bytes_extra value: %s", value);
+ return -1;
+ }
}
}
if (state_r->tag == NULL) {