forked from localhorst/reHDD
Merge branch 'develop' into master
This commit is contained in:
@ -63,8 +63,8 @@ void reHDD::app_logic(void)
|
||||
mxScannDrives.lock();
|
||||
char dummy;
|
||||
read (fdNewDrivesInformPipe[0],&dummy,1);
|
||||
filterNewDrives(&vecDrives, &vecNewDrives); //filter and copy to app logic vector
|
||||
printDrives(&vecDrives);
|
||||
filterNewDrives(&listDrives, &listNewDrives); //filter and copy to app logic vector
|
||||
printDrives(&listDrives);
|
||||
mxScannDrives.unlock();
|
||||
}
|
||||
if(FD_ISSET(fdShredInformPipe[0], &selectSet))
|
||||
@ -76,7 +76,7 @@ void reHDD::app_logic(void)
|
||||
#endif
|
||||
}
|
||||
//mxScannDrives.lock();
|
||||
ui->updateTUI(&vecDrives, u8SelectedEntry);
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
//mxScannDrives.unlock();
|
||||
} //endless loop
|
||||
thDevices.join();
|
||||
@ -215,11 +215,11 @@ void reHDD::ThreadDelete()
|
||||
getSelectedDrive()->state = Drive::TaskState::NONE; //delete finished
|
||||
getSelectedDrive()->bWasDeleteted = true;
|
||||
Logger::logThis()->info("Finished delete for: " + getSelectedDrive()->getModelName() + "-" + getSelectedDrive()->getSerial());
|
||||
ui->updateTUI(&vecDrives, u8SelectedEntry);
|
||||
ui->updateTUI(&listDrives, u8SelectedEntry);
|
||||
}
|
||||
}
|
||||
|
||||
void reHDD::filterNewDrives(vector <Drive>* pvecOldDrives, vector <Drive>* pvecNewDrives)
|
||||
void reHDD::filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNewDrives)
|
||||
{
|
||||
list <Drive>::iterator itOld; //Iterator for current (old) drive list
|
||||
list <Drive>::iterator itNew; //Iterator for new drive list that was created from to scann thread
|
||||
@ -429,8 +429,8 @@ void reHDD::printDrives(list <Drive>* plistDrives)
|
||||
cout << endl;*/
|
||||
|
||||
ostringstream address;
|
||||
address << (void const *)&pvecDrives->at(it - pvecDrives->begin());
|
||||
Logger::logThis()->info(to_string(it - pvecDrives->begin()) + ": " + it->getPath() + " - " + it->getModelFamily() + " - " + it->getSerial() + " @" + address.str());
|
||||
address << (void const *)&(*it);
|
||||
Logger::logThis()->info(to_string(u8Index++) + ": " + it->getPath() + " - " + it->getModelFamily() + " - " + it->getSerial() + " @" + address.str());
|
||||
}
|
||||
Logger::logThis()->info("------------DRIVES END--------------");
|
||||
//cout << "---------------------------------" << endl;
|
||||
|
Reference in New Issue
Block a user