From ee75ceb2e6d9277c89f7a719b9990bda3df7c859 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Wed, 5 Oct 2005 11:28:29 +0000 Subject: [PATCH] - added -p(ort) option - say more about GSS errors --- org.glite.jp.primary/src/bones_server.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/org.glite.jp.primary/src/bones_server.c b/org.glite.jp.primary/src/bones_server.c index 0841348..debbd4c 100644 --- a/org.glite.jp.primary/src/bones_server.c +++ b/org.glite.jp.primary/src/bones_server.c @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) b_argc = p_argc = 1; - while ((opt = getopt(argc,argv,"B:P:a:")) != EOF) switch (opt) { + while ((opt = getopt(argc,argv,"B:P:a:p:")) != EOF) switch (opt) { case 'B': assert(b_argc < 20); if (com = strchr(optarg,',')) *com = 0; @@ -86,6 +86,9 @@ int main(int argc, char *argv[]) exit (1); } break; + case 'p': + port = optarg; + break; case '?': fprintf(stderr,"usage: %s: -Bb,val ... -Pplugin.so ...\n" "b is backend option\n",argv[0]); exit (1); @@ -217,8 +220,12 @@ static int newconn(int conn,struct timeval *to,void *data) /* TODO: DNS paranoia etc. */ if (edg_wll_gss_accept(mycred,conn,to,plugin_ctx->connection,&gss_code)) { - /* TODO: better error reporting */ - printf("[%d] GSS connection accept failed, closing.\n", getpid()); + char *et; + + edg_wll_gss_get_error(&gss_code,"",&et); + + fprintf(stderr,"[%d] GSS connection accept failed: %s\nClosing connection.\n",getpid(),et); + free(et); ret = 1; goto cleanup; } -- 1.8.2.3