Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument type mismatch in log messages about loaded VATSIM server file #259

Closed
ltoenning opened this issue Feb 4, 2024 · 0 comments · Fixed by #284
Closed

Argument type mismatch in log messages about loaded VATSIM server file #259

ltoenning opened this issue Feb 4, 2024 · 0 comments · Fixed by #284
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@ltoenning
Copy link
Contributor

The log function for the server file expects the argument as number of lines:

void CWebDataServices::vatsimServerFileRead(int lines)
{
CLogMessage(this).info(u"Read VATSIM server file, %1 lines") << lines;
}

but the argument of the signal triggering this slot is kilobytes:

signals:
//! Data have been read
void dataFileRead(int kB);

As the input file is in JSON format, the number of lines also doesn't really make sense here.
Further, as the server file is pretty small and the conversion to kilobytes is handled as an integer division, the result is always 0.
Maybe the argument should be passed as double/float instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
1 participant