From 578616a31cd9ba01017f399f5d9a50481019889e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 10 Feb 2017 23:37:12 +0100 Subject: [PATCH] Drop one-liner service_announce function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Now we have service_announce simplified so much there is no reason to keep it as a helper. Signed-off-by: Rafał Miłecki Acked-by: John Crispin --- announce.c | 2 +- interface.c | 2 +- service.c | 6 ------ service.h | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/announce.c b/announce.c index 7bbce4a..f04a600 100644 --- a/announce.c +++ b/announce.c @@ -66,7 +66,7 @@ announce_timer(struct uloop_timeout *timeout) case STATE_ANNOUNCE: dns_reply_a(iface, announce_ttl); - service_announce(iface, announce_ttl); + service_announce_services(iface, announce_ttl); uloop_timeout_set(timeout, announce_ttl * 800); break; } diff --git a/interface.c b/interface.c index 463335a..587b188 100644 --- a/interface.c +++ b/interface.c @@ -620,8 +620,8 @@ void interface_shutdown(void) vlist_for_each_element(&interfaces, iface, node) if (iface->fd.fd > 0 && iface->multicast) { - service_announce(iface, 0); dns_reply_a(iface, 0); + service_announce_services(iface, 0); } vlist_for_each_element(&interfaces, iface, node) interface_close(iface); diff --git a/service.c b/service.c index 993e7cf..36d20c7 100644 --- a/service.c +++ b/service.c @@ -169,12 +169,6 @@ service_announce_services(struct interface *iface, int ttl) } } -void -service_announce(struct interface *iface, int ttl) -{ - service_announce_services(iface, ttl); -} - static void service_update(struct vlist_tree *tree, struct vlist_node *node_new, struct vlist_node *node_old) diff --git a/service.h b/service.h index 78ee854..8bc9ba9 100644 --- a/service.h +++ b/service.h @@ -17,7 +17,6 @@ extern char *sdudp; extern void service_init(int announce); extern void service_cleanup(void); -extern void service_announce(struct interface *iface, int ttl); extern void service_reply(struct interface *iface, const char *match, int ttl); extern void service_announce_services(struct interface *iface, int ttl); -- 2.30.2