@@ -5134,7 +5134,6 @@ void MainServer::BackendQueryDiskSpace(QStringList &strlist, bool consolidated,
5134
5134
{
5135
5135
FileSystemInfoList fsInfos = FileServerHandler::QueryFileSystems ();
5136
5136
QString allHostList;
5137
- QStringList tmplist;
5138
5137
if (allHosts)
5139
5138
{
5140
5139
allHostList = gCoreContext ->GetHostName ();
@@ -5160,29 +5159,21 @@ void MainServer::BackendQueryDiskSpace(QStringList &strlist, bool consolidated,
5160
5159
m_sockListLock.unlock ();
5161
5160
5162
5161
for (auto & pbs : localPlaybackList) {
5163
- pbs->GetDiskSpace (tmplist ); // QUERY_FREE_SPACE
5162
+ fsInfos << pbs->GetDiskSpace (); // QUERY_FREE_SPACE
5164
5163
pbs->DecrRef ();
5165
5164
}
5166
5165
}
5167
5166
5168
- if (! consolidated)
5167
+ if (consolidated)
5169
5168
{
5170
- strlist << FileSystemInfoManager::ToStringList (fsInfos) << tmplist;
5171
- return ;
5172
- }
5173
-
5174
- fsInfos.append (FileSystemInfoManager::FromStringList (tmplist));
5175
- tmplist.clear (); // not used after this point
5176
- strlist.clear ();
5169
+ // Consolidate hosts sharing storage
5170
+ int64_t maxWriteFiveSec = GetCurrentMaxBitrate ()/12 /* 5 seconds*/ ;
5171
+ maxWriteFiveSec = std::max ((int64_t )2048 , maxWriteFiveSec); // safety for NFS mounted dirs
5177
5172
5178
- // Consolidate hosts sharing storage
5179
- int64_t maxWriteFiveSec = GetCurrentMaxBitrate ()/12 /* 5 seconds*/ ;
5180
- maxWriteFiveSec = std::max ((int64_t )2048 , maxWriteFiveSec); // safety for NFS mounted dirs
5181
-
5182
- FileSystemInfoManager::Consolidate (fsInfos, true , maxWriteFiveSec, allHostList);
5173
+ FileSystemInfoManager::Consolidate (fsInfos, true , maxWriteFiveSec, allHostList);
5174
+ }
5183
5175
5184
- // Pass the cleaned list back
5185
- strlist << FileSystemInfoManager::ToStringList (fsInfos);
5176
+ strlist = FileSystemInfoManager::ToStringList (fsInfos);
5186
5177
}
5187
5178
5188
5179
void MainServer::GetFilesystemInfos (FileSystemInfoList &fsInfos,
0 commit comments