From cb1ab5633b112e083fa252712f8fc667373a93af Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 19 Jan 2012 15:15:57 -0500 Subject: Refactor workers init so we can pass down gpctx --- proxy/src/gssproxy.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'proxy/src/gssproxy.c') diff --git a/proxy/src/gssproxy.c b/proxy/src/gssproxy.c index 9bfad08..2f25899 100644 --- a/proxy/src/gssproxy.c +++ b/proxy/src/gssproxy.c @@ -41,6 +41,7 @@ int main(int argc, const char *argv[]) int vflags; int fd; struct gssproxy_ctx *gpctx; + int ret; struct poptOption long_options[] = { POPT_AUTOHELP @@ -99,6 +100,7 @@ int main(int argc, const char *argv[]) if (!vctx) { return 1; } + gpctx->vctx = vctx; vflags = VERTO_EV_FLAG_PERSIST | VERTO_EV_FLAG_IO_READ; ev = verto_add_io(vctx, vflags, accept_sock_conn, fd); @@ -107,8 +109,8 @@ int main(int argc, const char *argv[]) } verto_set_private(ev, gpctx, NULL); - gpctx->workers = gp_workers_init(vctx, gpctx->config); - if (!gpctx->workers) { + ret = gp_workers_init(gpctx); + if (ret) { exit(EXIT_FAILURE); } -- cgit