Use correct time_t variables to store ARG_TIME options
authorMartin Willi <martin@revosec.ch>
Wed, 18 Jan 2012 09:31:45 +0000 (10:31 +0100)
committerMartin Willi <martin@revosec.ch>
Wed, 18 Jan 2012 09:31:45 +0000 (10:31 +0100)
src/starter/confread.h
src/starter/invokepluto.c

index 988b8ed..9cb919c 100644 (file)
@@ -198,12 +198,12 @@ struct starter_config {
                                char     *plutostderrlog;
                                bool     uniqueids;
                                u_int    overridemtu;
                                char     *plutostderrlog;
                                bool     uniqueids;
                                u_int    overridemtu;
-                               u_int    crlcheckinterval;
+                               time_t   crlcheckinterval;
                                bool     cachecrls;
                                strict_t strictcrlpolicy;
                                bool     nocrsend;
                                bool     nat_traversal;
                                bool     cachecrls;
                                strict_t strictcrlpolicy;
                                bool     nocrsend;
                                bool     nat_traversal;
-                               u_int    keep_alive;
+                               time_t   keep_alive;
                                u_int    force_keepalive;
                                char     *virtual_private;
                                char     *pkcs11module;
                                u_int    force_keepalive;
                                char     *virtual_private;
                                char     *pkcs11module;
index 11c13ab..70c0692 100644 (file)
@@ -184,7 +184,7 @@ starter_start_pluto (starter_config_t *cfg, bool no_fork, bool attach_gdb)
                static char buf1[15];
 
                arg[argc++] = "--crlcheckinterval";
                static char buf1[15];
 
                arg[argc++] = "--crlcheckinterval";
-               snprintf(buf1, sizeof(buf1), "%u", cfg->setup.crlcheckinterval);
+               snprintf(buf1, sizeof(buf1), "%d", (int)cfg->setup.crlcheckinterval);
                arg[argc++] = buf1;
        }
        if (cfg->setup.cachecrls)
                arg[argc++] = buf1;
        }
        if (cfg->setup.cachecrls)
@@ -212,7 +212,7 @@ starter_start_pluto (starter_config_t *cfg, bool no_fork, bool attach_gdb)
                static char buf2[15];
 
                arg[argc++] = "--keep_alive";
                static char buf2[15];
 
                arg[argc++] = "--keep_alive";
-               snprintf(buf2, sizeof(buf2), "%u", cfg->setup.keep_alive);
+               snprintf(buf2, sizeof(buf2), "%d", (int)cfg->setup.keep_alive);
                arg[argc++] = buf2;
        }
        if (cfg->setup.virtual_private)
                arg[argc++] = buf2;
        }
        if (cfg->setup.virtual_private)