From e32a08697e4a3c1f85fb420bf5eb8a0ec41294eb Mon Sep 17 00:00:00 2001 From: hadaq Date: Thu, 19 Aug 2010 17:23:53 +0000 Subject: [PATCH] hostname number included. Sergey. --- ebctrl/ioc/ebctrlApp/src/evtbuild.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ebctrl/ioc/ebctrlApp/src/evtbuild.c b/ebctrl/ioc/ebctrlApp/src/evtbuild.c index 75d199e..7f1ffdd 100644 --- a/ebctrl/ioc/ebctrlApp/src/evtbuild.c +++ b/ebctrl/ioc/ebctrlApp/src/evtbuild.c @@ -182,11 +182,10 @@ long evtbuild_proc( struct genSubRecord *pgsub ) } /* Get host name and extract the number from its name */ - char hostname[30]; + char hostname[50]; char *c_ptr; - char host_nr[2]; - gethostname(hostname, 30); + gethostname(hostname, 50); c_ptr = strchr(hostname, '0'); if( c_ptr == (char*) NULL ){ @@ -194,8 +193,6 @@ long evtbuild_proc( struct genSubRecord *pgsub ) printf(" evtbuild.c: failed to extract a number from the hostname: %s!\n", hostname); } else{ - strcpy(host_nr,c_ptr); - printf("EB name number: %s\n", c_ptr); *out[13] = (uint32_t) strtoul(c_ptr, NULL, 0); } -- 2.43.0