0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-15 22:41:12 +01:00

blacklist: add blacklist_cancel_none

This commit is contained in:
Elizabeth Myers 2016-06-27 19:06:49 -05:00
parent 2374f221fe
commit 96b1c6b8bf
No known key found for this signature in database
GPG key ID: 1A10EF78D83E317B

View file

@ -100,9 +100,10 @@ struct blacklist_user
static void blacklists_destroy(void); static void blacklists_destroy(void);
static bool blacklists_start(struct auth_client *); static bool blacklists_start(struct auth_client *);
static void blacklists_generic_cancel(struct auth_client *); static inline void blacklists_generic_cancel(struct auth_client *);
static void blacklists_timeout(struct auth_client *); static void blacklists_timeout(struct auth_client *);
static void blacklists_cancel(struct auth_client *); static void blacklists_cancel(struct auth_client *);
static void blacklists_cancel_none(struct auth_client *);
/* private interfaces */ /* private interfaces */
static void unref_blacklist(struct blacklist *); static void unref_blacklist(struct blacklist *);
@ -382,7 +383,7 @@ blacklists_start(struct auth_client *auth)
/* Start the lookup if ident and rdns are finished, or not loaded. */ /* Start the lookup if ident and rdns are finished, or not loaded. */
if(!lookup_all_blacklists(auth)) if(!lookup_all_blacklists(auth))
{ {
blacklists_generic_cancel(auth, "*** Could not do DNS blacklist checks"); blacklists_cancel_none(auth);
return true; return true;
} }
} }
@ -414,11 +415,11 @@ blacklists_initiate(struct auth_client *auth, uint32_t provider)
else else
{ {
if(!lookup_all_blacklists(auth)) if(!lookup_all_blacklists(auth))
blacklists_generic_cancel(auth, "*** Could not do DNS blacklist checks"); blacklists_cancel_none(auth);
} }
} }
static void static inline void
blacklists_generic_cancel(struct auth_client *auth, const char *message) blacklists_generic_cancel(struct auth_client *auth, const char *message)
{ {
rb_dlink_node *ptr, *nptr; rb_dlink_node *ptr, *nptr;
@ -451,6 +452,12 @@ blacklists_generic_cancel(struct auth_client *auth, const char *message)
auth_client_unref(auth); auth_client_unref(auth);
} }
static void
blacklists_timeout(struct auth_client *auth)
{
blacklists_generic_cancel(auth, "*** No response from DNS blacklists");
}
static void static void
blacklists_cancel(struct auth_client *auth) blacklists_cancel(struct auth_client *auth)
{ {
@ -458,9 +465,9 @@ blacklists_cancel(struct auth_client *auth)
} }
static void static void
blacklists_timeout(struct auth_client *auth) blacklists_cancel_none(struct auth_client *auth)
{ {
blacklists_generic_cancel(auth, "*** No response from DNS blacklists"); blacklists_generic_cancel(auth, "*** Could not check DNS blacklists");
} }
static void static void