From: František Dvořák Date: Tue, 14 Dec 2010 15:07:55 +0000 (+0000) Subject: Query hostname after initializing L&B API. X-Git-Tag: glite-lb-client-java_R_1_0_5_3~29 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=57f18eef362777feda6ddae6927219ac61961dfa;p=jra1mw.git Query hostname after initializing L&B API. --- diff --git a/org.glite.lb.server/src/bkserverd.c b/org.glite.lb.server/src/bkserverd.c index f0a2e87..2f50e09 100644 --- a/org.glite.lb.server/src/bkserverd.c +++ b/org.glite.lb.server/src/bkserverd.c @@ -414,10 +414,6 @@ int main(int argc, char *argv[]) name = strrchr(argv[0],'/'); if (name) name++; else name = argv[0]; - memset(host, 0, sizeof host); - edg_wll_gss_gethostname(host,sizeof host); - host[sizeof host - 1] = 0; - asprintf(&port, "%d", GLITE_JOBID_DEFAULT_PORT); #ifdef GLITE_LB_SERVER_WITH_WS asprintf(&ws_port, "%d", GLITE_JOBID_DEFAULT_PORT+3); @@ -431,6 +427,10 @@ int main(int argc, char *argv[]) purge_timeout[EDG_WLL_JOB_CANCELLED] = 60*60*24*7; edg_wll_InitContext(&ctx); + memset(host, 0, sizeof host); + edg_wll_gss_gethostname(host,sizeof host); + host[sizeof host - 1] = 0; + while ((opt = getopt_long(argc,argv,get_opt_string,opts,NULL)) != EOF) switch (opt) { case 'A': enable_lcas = 1; break; case 'a': fake_host = strdup(optarg); break;