]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
daemon: ensure interval update is taken into account fast
authorVincent Bernat <vincent@bernat.im>
Thu, 1 Mar 2018 07:01:28 +0000 (08:01 +0100)
committerVincent Bernat <vincent@bernat.im>
Thu, 1 Mar 2018 07:04:09 +0000 (08:04 +0100)
src/daemon/client.c

index c55288d577aec940590b92d0a73248cbe93271f8..e5547b0f5b787cb411cca130c76ab7d14c599b07 100644 (file)
@@ -71,7 +71,6 @@ client_handle_set_configuration(struct lldpd *cfg, enum hmsg_type *type,
        if (CHANGED(c_tx_interval) && config->c_tx_interval != 0) {
                if (config->c_tx_interval < 0) {
                        log_debug("rpc", "client asked for immediate retransmission");
-                       levent_send_now(cfg);
                } else {
                        log_debug("rpc", "client change transmit interval to %d",
                            config->c_tx_interval);
@@ -79,6 +78,7 @@ client_handle_set_configuration(struct lldpd *cfg, enum hmsg_type *type,
                        cfg->g_config.c_ttl = cfg->g_config.c_tx_interval *
                            cfg->g_config.c_tx_hold;
                }
+               levent_send_now(cfg);
        }
        if (CHANGED(c_tx_hold) && config->c_tx_hold > 0) {
                log_debug("rpc", "client change transmit hold to %d",