]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
fix leading 0 in network map
authorJan Michel <michel@physik.uni-frankfurt.de>
Mon, 20 Feb 2023 15:48:17 +0000 (16:48 +0100)
committerJan Michel <michel@physik.uni-frankfurt.de>
Mon, 20 Feb 2023 15:48:17 +0000 (16:48 +0100)
web/htdocs/network/map.pl

index 0bbe1af84b1e6ff7c0adafe3dec8b102d25b91d7..f33055e7b9694cb58566e05e2047d1b35d507009 100755 (executable)
@@ -413,7 +413,7 @@ sub GetMac {
     $r = sprintf('%u.%u.%u.%u',$ip&0xFF,$ip>>8&0xFF,$ip>>16&0xFF,$ip>>24&0xFF);
     }
   else {
-    $id = sprintf('%16x',$id);
+    $id = sprintf('%016x',$id);
     $r = 'da:7a:3'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2);
     if ($btype =~ /TRB3sc/i) {
       $r = 'da:7a:0'.substr($id,7,1).':'.substr($id,8,2).':'.substr($id,10,2).':'.substr($id,12,2);