[LEDE-DEV] [PATCH mdns] Rename cache scanning to updating
Rafał Miłecki
zajec5 at gmail.com
Fri Feb 10 06:17:44 PST 2017
From: Rafał Miłecki <rafal at milecki.pl>
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 <rafal at milecki.pl>
---
cache.c | 2 +-
cache.h | 2 +-
ubus.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/cache.c b/cache.c
index fa32465..6195004 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 19bc33f..9108004 100644
--- a/ubus.c
+++ b/ubus.c
@@ -39,11 +39,11 @@ mdns_reload(struct ubus_context *ctx, struct ubus_object *obj,
}
static int
-mdns_scan(struct ubus_context *ctx, struct ubus_object *obj,
+mdns_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 mdns_methods[] = {
UBUS_METHOD("set_config", mdns_set_config, config_policy),
UBUS_METHOD("query", mdns_query, query_policy),
UBUS_METHOD("fetch", mdns_query, query_policy),
- UBUS_METHOD_NOARG("scan", mdns_scan),
+ UBUS_METHOD_NOARG("update", mdns_update),
UBUS_METHOD_NOARG("browse", mdns_browse),
UBUS_METHOD_NOARG("hosts", mdns_hosts),
UBUS_METHOD_NOARG("reload", mdns_reload),
--
2.11.0
More information about the Lede-dev
mailing list