summaryrefslogtreecommitdiffstats
path: root/proxy/src/gssproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'proxy/src/gssproxy.c')
-rw-r--r--proxy/src/gssproxy.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/proxy/src/gssproxy.c b/proxy/src/gssproxy.c
index c46edcd..5fc80cb 100644
--- a/proxy/src/gssproxy.c
+++ b/proxy/src/gssproxy.c
@@ -35,7 +35,7 @@ int main(int argc, const char *argv[])
int opt_interactive = 0;
int opt_version = 0;
char *opt_config_file = NULL;
- char *config_file = NULL;
+ struct gp_config *config;
verto_ctx *vctx;
verto_ev *ev;
int vflags;
@@ -76,22 +76,15 @@ int main(int argc, const char *argv[])
return 1;
}
- if (!opt_daemon && !opt_interactive) {
- opt_daemon = 1;
+ if (opt_interactive) {
+ opt_daemon = 2;
}
- poptFreeContext(pc);
-
- /* 1. Init server and sockets
- * 2. Create thread pools and queues
- * 3. Create mainloop and start serving clients
- * 4. ...
- * 5. Profit
- */
+ config = read_config(opt_config_file, opt_daemon);
init_server();
- fd = init_unix_socket(GSS_PROXY_SOCKET_NAME);
+ fd = init_unix_socket(config->socket_name);
if (fd == -1) {
return 1;
}
@@ -111,5 +104,7 @@ int main(int argc, const char *argv[])
fini_server();
+ poptFreeContext(pc);
+
return 0;
}