Converted comms system entirely to being bitflag-based instead of integer state based

This commit is contained in:
Thulinma 2020-12-04 16:26:57 +01:00
parent 6e316663fc
commit 974380ab30
10 changed files with 28 additions and 24 deletions

View file

@ -138,7 +138,7 @@ int main(int argc, char **argv){
for (size_t i = 0; i < cleanUsers.recordCount(); ++i){
uint8_t status = cleanUsers.getStatus(i);
cleanUsers.setStatus(COMM_STATUS_INVALID, i);
if (status != COMM_STATUS_INVALID && status != COMM_STATUS_DISCONNECT){
if (status != COMM_STATUS_INVALID && !(status & COMM_STATUS_DISCONNECT)){
pid_t pid = cleanUsers.getPid(i);
if (pid > 1){
Util::Procs::Stop(pid);