Drop one-liner service_announce function
authorRafał Miłecki <rafal@milecki.pl>
Fri, 10 Feb 2017 22:37:12 +0000 (23:37 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Sat, 11 Feb 2017 09:11:15 +0000 (10:11 +0100)
Now we have service_announce simplified so much there is no reason to
keep it as a helper.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
announce.c
interface.c
service.c
service.h

index 7bbce4a139a973865cfe3233bfe5a625a05846e8..f04a6006c18f9d36041fadfc1b9a35e0b294587e 100644 (file)
@@ -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;
        }
index 463335a89034692d2ca1048948dc11d0f528ab5b..587b1886c6c1946824acf921cebcb549a9b38695 100644 (file)
@@ -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);
index 993e7cfd10d7a089b73b331e696affe14878732d..36d20c74830ed783b7ca272c63977b2dd93a4064 100644 (file)
--- 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)
index 78ee8543a0d9e97b3d636280839ab4c18787c1c6..8bc9ba9a56f36d845358755ae05d86c28ad53b22 100644 (file)
--- 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);