* @brief MainWindow::ThreadUpdateTables - Thread callback that updates all tables. * @param This - This pointer for the MainWindow instance. */
| 157 | * @param This - This pointer for the MainWindow instance. |
| 158 | */ |
| 159 | void MainWindow::ThreadUpdateTables(MainWindow *This) |
| 160 | { |
| 161 | BOOLEAN connected; |
| 162 | ULONG i; |
| 163 | ULONG c; |
| 164 | |
| 165 | PBASE_ALERT_INFO currentAlert; |
| 166 | GLOBAL_SIZES globalSizes; |
| 167 | ULONG newProcessCount; |
| 168 | PPROCESS_SUMMARY_REQUEST processSummaries; |
| 169 | ULONG totalFilterSize; |
| 170 | ULONG filesystemFilterIterations; |
| 171 | ULONG registryFilterIterations; |
| 172 | LIST_FILTERS_REQUEST filterRequest; |
| 173 | |
| 174 | connected = FALSE; |
| 175 | |
| 176 | while(connected == FALSE) |
| 177 | { |
| 178 | if(This->communicator.ConnectDevice() == FALSE) |
| 179 | { |
| 180 | pmlog("Failed to connect to device. Retrying in 2 seconds."); |
| 181 | Sleep(2000); |
| 182 | continue; |
| 183 | } |
| 184 | connected = TRUE; |
| 185 | } |
| 186 | |
| 187 | pmlog("Established connection."); |
| 188 | |
| 189 | // |
| 190 | // Loop update tables. |
| 191 | // |
| 192 | while(true) |
| 193 | { |
| 194 | // |
| 195 | // Check for alerts. |
| 196 | // |
| 197 | while(This->communicator.QueuedAlerts()) |
| 198 | { |
| 199 | currentAlert = This->communicator.PopAlert(); |
| 200 | if(currentAlert == NULL) |
| 201 | { |
| 202 | break; |
| 203 | } |
| 204 | |
| 205 | This->AddAlertSummary(currentAlert); |
| 206 | } |
| 207 | |
| 208 | // |
| 209 | // Get global sizes. |
| 210 | // |
| 211 | globalSizes = This->communicator.GetGlobalSizes(); |
| 212 | |
| 213 | // |
| 214 | // Check for processes. |
| 215 | // |
| 216 | if(globalSizes.ProcessHistorySize != This->ProcessesTableSize) |
nothing calls this directly
no test coverage detected