From: Rafał Miłecki Date: Fri, 10 Feb 2017 14:17:44 +0000 (+0100) Subject: Rename cache scanning to updating X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1283a0f4414dd66c7ef0665ee60413d30f3ee2cc;p=oweals%2Fmdnsd.git Rename cache scanning to updating What we were do is querying over all interfaces for all cached entries. This isn't real scanning but rather updating (the cache). Signed-off-by: Rafał Miłecki Acked-by: John Crispin --- diff --git a/cache.c b/cache.c index 6bf0d26..dd263d2 100644 --- a/cache.c +++ b/cache.c @@ -121,7 +121,7 @@ void cache_cleanup(struct interface *iface) } void -cache_scan(void) +cache_update(void) { struct interface *iface; struct cache_service *s; diff --git a/cache.h b/cache.h index d433fae..4b86a83 100644 --- a/cache.h +++ b/cache.h @@ -49,7 +49,7 @@ struct cache_record { extern struct avl_tree services; int cache_init(void); -void cache_scan(void); +void cache_update(void); void cache_cleanup(struct interface *iface); void cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struct dns_answer *a, uint8_t *rdata, int flush); diff --git a/ubus.c b/ubus.c index 9a16a86..69db2ac 100644 --- a/ubus.c +++ b/ubus.c @@ -39,11 +39,11 @@ umdns_reload(struct ubus_context *ctx, struct ubus_object *obj, } static int -umdns_scan(struct ubus_context *ctx, struct ubus_object *obj, +umdns_update(struct ubus_context *ctx, struct ubus_object *obj, struct ubus_request_data *req, const char *method, struct blob_attr *msg) { - cache_scan(); + cache_update(); return 0; } @@ -228,7 +228,7 @@ static const struct ubus_method umdns_methods[] = { UBUS_METHOD("set_config", umdns_set_config, config_policy), UBUS_METHOD("query", umdns_query, query_policy), UBUS_METHOD("fetch", umdns_query, query_policy), - UBUS_METHOD_NOARG("scan", umdns_scan), + UBUS_METHOD_NOARG("update", umdns_update), UBUS_METHOD_NOARG("browse", umdns_browse), UBUS_METHOD_NOARG("hosts", umdns_hosts), UBUS_METHOD_NOARG("reload", umdns_reload),