summaryrefslogtreecommitdiff
path: root/src/tcpproxy.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2010-12-05 07:24:59 +0000
committerChristian Pointner <equinox@spreadspace.org>2010-12-05 07:24:59 +0000
commit4439817d4df10956b884e0d47ac6e3d18c141238 (patch)
tree924574441e19c77fc6e4aca1acebb6d7aad19296 /src/tcpproxy.c
parentadded config file format to manpage (diff)
check wether config file was empty
git-svn-id: https://svn.spreadspace.org/tcpproxy/trunk@29 e61f0598-a718-4e21-a8f0-0aadfa62ad6b
Diffstat (limited to 'src/tcpproxy.c')
-rw-r--r--src/tcpproxy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tcpproxy.c b/src/tcpproxy.c
index ef71cb4..57d86b3 100644
--- a/src/tcpproxy.c
+++ b/src/tcpproxy.c
@@ -171,6 +171,14 @@ int main(int argc, char* argv[])
yyinit(&opt, &listeners);
yyparse();
+
+ if(!slist_length(&listeners)) {
+ log_printf(ERROR, "no listeners defined in config file %s", opt.config_file_);
+ listener_clear(&listeners);
+ options_clear(&opt);
+ log_close();
+ exit(-1);
+ }
}
priv_info_t priv;