From: Aleš Křenek Date: Wed, 5 Oct 2005 11:28:29 +0000 (+0000) Subject: - added -p(ort) option X-Git-Tag: gridsite-core_R_1_1_12~16 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=ee75ceb2e6d9277c89f7a719b9990bda3df7c859;p=jra1mw.git - added -p(ort) option - say more about GSS errors --- 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; }