}
}
-static void
+static int
imap_client_move_back_send_callback(void *context, struct ostream *output)
{
struct imap_client *client = context;
const char *error = t_strdup_printf(
"fd_send(%s) failed: %m", o_stream_get_name(output));
imap_client_unhibernate_failed(&client, error);
- return;
+ return -1;
}
/* If unhibernation fails after this, shutdown() the fd to make sure
the imap process won't later on finish unhibernation after all and
client->shutdown_fd_on_destroy = TRUE;
i_assert(ret > 0);
o_stream_nsend(output, str_data(str) + 1, str_len(str) - 1);
+ return 0;
}
static void
if (connection_input_line_default(_conn, line) < 0)
return -1;
- conn->send_callback(conn->context, _conn->output);
- return 1;
+ return conn->send_callback(conn->context, _conn->output) < 0 ? -1 : 1;
} else {
imap_master_read_callback(&conn, line);
/* we're finished now with this connection - disconnect it */
struct imap_master_connection;
-typedef void
+typedef int
imap_master_connection_send_callback_t(void *context, struct ostream *output);
typedef void
imap_master_connection_read_callback_t(void *context, const char *reply);