diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-05 14:13:11 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-01-05 14:13:11 +0000 |
commit | 7763eff37cd8ab4b1af0021c18f1ff86e1f19acd (patch) | |
tree | 2f9e7d0c22933a3eec15723c24c19da9cc3099e5 /src/run.c | |
parent | 70d1f229a46565c48cfaa6412e865ddd4bc5c585 (diff) | |
download | conntrack-tools-7763eff37cd8ab4b1af0021c18f1ff86e1f19acd.tar.gz conntrack-tools-7763eff37cd8ab4b1af0021c18f1ff86e1f19acd.zip |
obsolete `-S' option: Use information provided by the config file
Diffstat (limited to 'src/run.c')
-rw-r--r-- | src/run.c | 22 |
1 files changed, 9 insertions, 13 deletions
@@ -85,20 +85,16 @@ void local_handler(int fd, void *data) dlog(STATE(log), LOG_WARNING, "unknown local request %d", type); } -int init(int mode) +int init(void) { - switch(mode) { - case STATS_MODE: - STATE(mode) = &stats_mode; - break; - case SYNC_MODE: - STATE(mode) = &sync_mode; - break; - default: - fprintf(stderr, "Unknown running mode! default " - "to synchronization mode\n"); - STATE(mode) = &sync_mode; - break; + if (CONFIG(flags) & CTD_STATS_MODE) + STATE(mode) = &stats_mode; + else if (CONFIG(flags) & CTD_SYNC_MODE) + STATE(mode) = &sync_mode; + else { + fprintf(stderr, "WARNING: No running mode specified. " + "Defaulting to statistics mode.\n"); + STATE(mode) = &stats_mode; } /* Initialization */ |