diff --git a/src/apps/mdns/mdns.c b/src/apps/mdns/mdns.c index b671b87e..6976630d 100644 --- a/src/apps/mdns/mdns.c +++ b/src/apps/mdns/mdns.c @@ -2595,10 +2595,7 @@ mdns_resp_announce(struct netif *netif) /* Do not announce if the mdns responder is off, waiting to probe, probing or * waiting to announce. */ - if (!( (mdns->state == MDNS_STATE_OFF) - || (mdns->state == MDNS_STATE_PROBE_WAIT) - || (mdns->state == MDNS_STATE_PROBING) - || (mdns->state == MDNS_STATE_ANNOUNCE_WAIT))) { + if (mdns->state >= MDNS_STATE_ANNOUNCING) { /* Announce on IPv6 and IPv4 */ #if LWIP_IPV6 mdns_announce(netif, &v6group); diff --git a/src/include/lwip/apps/mdns_priv.h b/src/include/lwip/apps/mdns_priv.h index 2bc9ef0d..10f44e8b 100644 --- a/src/include/lwip/apps/mdns_priv.h +++ b/src/include/lwip/apps/mdns_priv.h @@ -195,7 +195,7 @@ typedef enum { MDNS_STATE_ANNOUNCING, /* Probing and announcing completed */ MDNS_STATE_COMPLETE -} acd_state_enum_t; +} mdns_resp_state_enum_t; /** Description of a host/netif */ struct mdns_host { @@ -206,7 +206,7 @@ struct mdns_host { /** Number of probes/announces sent for the current name */ u8_t sent_num; /** State of the mdns responder */ - acd_state_enum_t state; + mdns_resp_state_enum_t state; #if LWIP_IPV4 /** delayed msg struct for IPv4 */ struct mdns_delayed_msg ipv4;