blacklist: give different messages for cancellation and timeout

This commit is contained in:
Elizabeth Myers 2016-06-27 18:24:39 -05:00
parent 9a71801d08
commit f16493f468
No known key found for this signature in database
GPG key ID: 1A10EF78D83E317B

View file

@ -392,7 +392,7 @@ blacklists_initiate(struct auth_client *auth, uint32_t provider)
}
static void
blacklists_cancel(struct auth_client *auth)
blacklists_generic_cancel(struct auth_client *auth, const char *message)
{
rb_dlink_node *ptr, *nptr;
struct blacklist_user *bluser = get_provider_data(auth, SELF_PID);
@ -402,7 +402,7 @@ blacklists_cancel(struct auth_client *auth)
if(rb_dlink_list_length(&bluser->queries))
{
notice_client(auth->cid, "*** Aborting DNS blacklist queries");
notice_client(auth->cid, message);
RB_DLINK_FOREACH_SAFE(ptr, nptr, bluser->queries.head)
{
@ -424,6 +424,18 @@ blacklists_cancel(struct auth_client *auth)
auth_client_unref(auth);
}
static void
blacklists_cancel(struct auth_client *auth)
{
blacklists_generic_cancel(auth, "*** Aborting DNS blacklist checks");
}
static void
blacklists_timeout(struct auth_client *auth)
{
blacklists_generic_cancel(auth, "*** DNS blacklist checks timed out");
}
static void
blacklists_destroy(void)
{
@ -568,7 +580,7 @@ struct auth_provider blacklist_provider =
.destroy = blacklists_destroy,
.start = blacklists_start,
.cancel = blacklists_cancel,
.timeout = blacklists_cancel,
.timeout = blacklists_timeout,
.completed = blacklists_initiate,
.opt_handlers = blacklist_options,
/* .stats_handler = { 'B', blacklist_stats }, */