File ip2clued.c changed (mode: 100644) (index cc7a2b2..17431c8) |
... |
... |
static unsigned int conf_port; |
25 |
25 |
static unsigned int conf_ipv4; |
static unsigned int conf_ipv4; |
26 |
26 |
static unsigned int conf_ipv6; |
static unsigned int conf_ipv6; |
27 |
27 |
static unsigned int conf_debug; |
static unsigned int conf_debug; |
|
28 |
|
static unsigned int conf_nodaemon; |
28 |
29 |
|
|
29 |
30 |
/* This will protect accesses to list 'list' */ |
/* This will protect accesses to list 'list' */ |
30 |
31 |
static pthread_rwlock_t list_rwlock; |
static pthread_rwlock_t list_rwlock; |
|
... |
... |
int main(int argc, char *argv[]) |
171 |
172 |
conf_ipv4 = ip2clue_conf_get_ul(conf, "ipv4", 10); |
conf_ipv4 = ip2clue_conf_get_ul(conf, "ipv4", 10); |
172 |
173 |
conf_ipv6 = ip2clue_conf_get_ul(conf, "ipv6", 10); |
conf_ipv6 = ip2clue_conf_get_ul(conf, "ipv6", 10); |
173 |
174 |
conf_debug = ip2clue_conf_get_ul(conf, "debug", 10); |
conf_debug = ip2clue_conf_get_ul(conf, "debug", 10); |
|
175 |
|
conf_nodaemon = ip2clue_conf_get_ul(conf, "nodaemon", 10); |
174 |
176 |
|
|
175 |
177 |
if (!conf_datadir || !conf_files) { |
if (!conf_datadir || !conf_files) { |
176 |
178 |
Log(0, "ERROR: 'datadir = ' or 'files = ' missing from conf file!\n"); |
Log(0, "ERROR: 'datadir = ' or 'files = ' missing from conf file!\n"); |
|
... |
... |
int main(int argc, char *argv[]) |
191 |
193 |
|
|
192 |
194 |
Log(1, "Parameters: datadir=[%s] files=[%s] format=[%s]" |
Log(1, "Parameters: datadir=[%s] files=[%s] format=[%s]" |
193 |
195 |
" refresh=%lu port=%u ipv4=%u ipv6=%u" |
" refresh=%lu port=%u ipv4=%u ipv6=%u" |
194 |
|
" debug=%u", |
|
|
196 |
|
" debug=%u nodaemon=%u", |
195 |
197 |
conf_datadir, conf_files, conf_format, |
conf_datadir, conf_files, conf_format, |
196 |
198 |
conf_refresh, conf_port, conf_ipv4, conf_ipv6, |
conf_refresh, conf_port, conf_ipv4, conf_ipv6, |
197 |
|
conf_debug); |
|
|
199 |
|
conf_debug, conf_nodaemon); |
|
200 |
|
|
|
201 |
|
|
|
202 |
|
if (conf_nodaemon == 0) |
|
203 |
|
daemon(0, 0); |
198 |
204 |
|
|
199 |
205 |
|
|
200 |
206 |
ip2clue_list_init(&list); |
ip2clue_list_init(&list); |