Fix polling insterval reported by multipath -t
authorChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 12 Nov 2011 12:04:19 +0000 (13:04 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 12 Nov 2011 12:04:19 +0000 (13:04 +0100)
polling interval default value was not set in the multipath
code path, but only in multipathd (where it is used).

Move the default value setting to load_config, where it belongs,
to have it set in both multipath and multipathd.

libmultipath/config.c
multipathd/main.c

index 1e9f7b7..6424908 100644 (file)
@@ -501,6 +501,8 @@ load_config (char * file)
        conf->flush_on_last_del = 0;
        conf->attribute_flags = 0;
        conf->reassign_maps = DEFAULT_REASSIGN_MAPS;
+       conf->checkint = DEFAULT_CHECKINT;
+       conf->max_checkint = MAX_CHECKINT(conf->checkint);
 
        /*
         * preload default hwtable
index 920b00a..2e5fe05 100644 (file)
@@ -1543,14 +1543,6 @@ child (void * param)
 
        setlogmask(LOG_UPTO(conf->verbosity + 3));
 
-       /*
-        * fill the voids left in the config file
-        */
-       if (!conf->checkint) {
-               conf->checkint = DEFAULT_CHECKINT;
-               conf->max_checkint = MAX_CHECKINT(conf->checkint);
-       }
-
        if (conf->max_fds) {
                struct rlimit fd_limit;