Message ID | 20170210223712.7657-2-zajec5@gmail.com |
---|---|
State | Accepted |
Delegated to: | Rafał Miłecki |
Headers | show |
On 10/02/2017 23:37, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@milecki.pl> > > 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 | 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); > >
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);