summaryrefslogtreecommitdiff
path: root/src/tcpproxy.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-11-26 16:11:46 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-11-26 16:11:46 +0000
commit668f72e224aac1e0dbecf4fa3baba567016f0f22 (patch)
tree5c732ea5c73cb74ef5568b529df24c0555b6ef4c /src/tcpproxy.c
parentmoved version.h to config.h with additional info (diff)
added generic single linked list
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@6 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/tcpproxy.c')
-rw-r--r--src/tcpproxy.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/tcpproxy.c b/src/tcpproxy.c
index 68add0f..b708f31 100644
--- a/src/tcpproxy.c
+++ b/src/tcpproxy.c
@@ -100,15 +100,15 @@ int main(int argc, char* argv[])
log_close();
exit(ret);
}
- string_list_element_t* tmp = opt.log_targets_.first_;
+ slist_element_t* tmp = opt.log_targets_.first_;
while(tmp) {
- ret = log_add_target(tmp->string_);
+ ret = log_add_target(tmp->data_);
if(ret) {
switch(ret) {
case -2: fprintf(stderr, "memory error on log_add_target, exitting\n"); break;
- case -3: fprintf(stderr, "unknown log target: '%s', exitting\n", tmp->string_); break;
- case -4: fprintf(stderr, "this log target is only allowed once: '%s', exitting\n", tmp->string_); break;
- default: fprintf(stderr, "syntax error near: '%s', exitting\n", tmp->string_); break;
+ case -3: fprintf(stderr, "unknown log target: '%s', exitting\n", (char*)(tmp->data_)); break;
+ case -4: fprintf(stderr, "this log target is only allowed once: '%s', exitting\n", (char*)(tmp->data_)); break;
+ default: fprintf(stderr, "syntax error near: '%s', exitting\n", (char*)(tmp->data_)); break;
}
options_clear(&opt);
@@ -121,6 +121,8 @@ int main(int argc, char* argv[])
log_printf(NOTICE, "just started...");
options_parse_post(&opt);
+ options_print(&opt);
+
priv_info_t priv;
if(opt.username_)
if(priv_init(&priv, opt.username_, opt.groupname_)) {