From: Jan Michel Date: Mon, 20 Feb 2023 15:48:17 +0000 (+0100) Subject: fix leading 0 in network map X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=be56cf679f95a7b234bfc9fb95ee6c08f0b62875;p=daqtools.git fix leading 0 in network map --- diff --git a/web/htdocs/network/map.pl b/web/htdocs/network/map.pl index 0bbe1af..f33055e 100755 --- a/web/htdocs/network/map.pl +++ b/web/htdocs/network/map.pl @@ -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);