MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / ThreadUpdateTables

Method ThreadUpdateTables

PeaceMakerGUI/mainwindow.cpp:159–275  ·  view source on GitHub ↗

* @brief MainWindow::ThreadUpdateTables - Thread callback that updates all tables. * @param This - This pointer for the MainWindow instance. */

Source from the content-addressed store, hash-verified

157 * @param This - This pointer for the MainWindow instance.
158 */
159void 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)

Callers

nothing calls this directly

Calls 11

pmlogFunction · 0.85
ConnectDeviceMethod · 0.80
QueuedAlertsMethod · 0.80
AddAlertSummaryMethod · 0.80
GetGlobalSizesMethod · 0.80
RequestProcessSummaryMethod · 0.80
AddProcessSummaryMethod · 0.80
RequestFiltersMethod · 0.80
AddFilterSummaryMethod · 0.80
ImportConfigFiltersMethod · 0.80
PopAlertMethod · 0.45

Tested by

no test coverage detected