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