]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
hostname number included. Sergey.
authorhadaq <hadaq>
Thu, 19 Aug 2010 17:23:53 +0000 (17:23 +0000)
committerhadaq <hadaq>
Thu, 19 Aug 2010 17:23:53 +0000 (17:23 +0000)
ebctrl/ioc/ebctrlApp/src/evtbuild.c

index 75d199e71c3382931bf655594484d843f8aa10c7..7f1ffddabfd624e610b2f4f3368af7afbff64ab6 100644 (file)
@@ -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("<E> 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);
   }