View Single Post
  #13  
Old 09-16-2019, 10:30 AM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

I had some time this morning to look at it again. I never would had figured the bug was in this location.

In the directory for ucs and queryserver look at the database.cpp and you will notice my correction here. One thing is that the routine was overwriting the file log settings every iteration, because it always ran through every entry without stopping. So really the routine was not really working properly without this being adding. I am not getting the segmentation fault anymore and my log is being written so I guess it is working? I need someone with a higher pay grade to look over this change though.

Code:
	for (auto row = results.begin(); row != results.end(); ++row) {
		log_category = atoi(row[0]);
		
		if (log_category <= Logs::None || log_category >= Logs::MaxCategoryID) {
			continue;
		}
		
		log_settings[log_category].log_to_console = atoi(row[2]);
		log_settings[log_category].log_to_file = atoi(row[3]);
Reply With Quote