monitor API output reserved and available space

This commit is contained in:
YuQing
2025-09-04 19:39:39 +08:00
parent 907239cb67
commit 1d75bb50d0
9 changed files with 145 additions and 182 deletions
@@ -673,15 +673,9 @@ public class TrackerClient {
return null;
}
if (pkgInfo.body.length % StructIPv6StorageStat.getFieldsTotalSize() == 0) {
ProtoStructDecoder<StructIPv6StorageStat> decoder = new ProtoStructDecoder<StructIPv6StorageStat>();
return decoder.decode(pkgInfo.body, StructIPv6StorageStat.class,
StructIPv6StorageStat.getFieldsTotalSize());
} else {
ProtoStructDecoder<StructIPv4StorageStat> decoder = new ProtoStructDecoder<StructIPv4StorageStat>();
return decoder.decode(pkgInfo.body, StructIPv4StorageStat.class,
StructIPv4StorageStat.getFieldsTotalSize());
}
ProtoStructDecoder<StructStorageStat> decoder = new ProtoStructDecoder<StructStorageStat>();
return decoder.decode(pkgInfo.body, StructStorageStat.class,
StructStorageStat.getFieldsTotalSize());
} catch (IOException ex) {
try {
connection.close();