return secs < AUTH_PENALTY_MAX_SECS ? secs : AUTH_PENALTY_MAX_SECS;
}
-static void auth_penalty_anvil_callback(const char *reply, void *context)
+static void
+auth_penalty_anvil_callback(const char *reply,
+ struct auth_penalty_request *request)
{
- struct auth_penalty_request *request = context;
unsigned int penalty = 0;
unsigned long last_penalty = 0;
unsigned int secs, drop_penalty;
i_error("Failed to kill %u users' connections", new_events_count);
}
-static void director_kill_user_callback(const char *reply, void *context)
+static void
+director_kill_user_callback(const char *reply,
+ struct director_kill_context *ctx)
{
- struct director_kill_context *ctx = context;
struct user *user;
/* don't try to abort the IPC command anymore */
}
static void
-director_kick_user_callback(const char *reply ATTR_UNUSED, void *context)
+director_kick_user_callback(const char *reply ATTR_UNUSED, struct director *dir)
{
- struct director *dir = context;
-
i_assert(dir->users_kicking_count > 0);
dir->users_kicking_count--;
if (dir->kick_callback != NULL)
unsigned int kicked_count;
};
-static void kick_user_anvil_callback(const char *reply, void *context)
+static void
+kick_user_anvil_callback(const char *reply, struct kick_context *ctx)
{
- struct kick_context *ctx = context;
unsigned int count;
if (reply != NULL) {
return 0;
}
+#undef anvil_client_query
struct anvil_query *
anvil_client_query(struct anvil_client *client, const char *query,
unsigned int timeout_msecs,
anvil_client_query(struct anvil_client *client, const char *query,
unsigned int timeout_msecs,
anvil_callback_t *callback, void *context);
+#define anvil_client_query(client, query, timeout_msecs, callback, context) \
+ anvil_client_query(client, query, timeout_msecs, \
+ (anvil_callback_t *)(callback), 1 ? (context) : \
+ CALLBACK_TYPECHECK(callback, \
+ void (*)(const char *, typeof(context))))
void anvil_client_query_abort(struct anvil_client *client,
struct anvil_query **query);
/* Send a command to anvil, don't expect any replies. */
}
static void
-lmtp_local_rcpt_anvil_cb(const char *reply, void *context)
+lmtp_local_rcpt_anvil_cb(const char *reply, struct lmtp_local_recipient *llrcpt)
{
- struct lmtp_local_recipient *llrcpt =
- (struct lmtp_local_recipient *)context;
struct client *client = llrcpt->rcpt->client;
struct smtp_server_recipient *rcpt = llrcpt->rcpt->rcpt;
const struct mail_storage_service_input *input;
}
static void ATTR_NULL(1)
-anvil_lookup_callback(const char *reply, void *context)
+anvil_lookup_callback(const char *reply, struct anvil_request *req)
{
- struct anvil_request *req = context;
struct client *client = req->client;
const struct login_settings *set = client->set;
const char *errmsg;