Meer,
I want to make some minor changes to FADProgressd. It would be useful to allow it to tell me the status of a computer - up or down. Currently, if the FAD files aren't found, it won't send any packets to the GUI.
I want to break out the UDP packet send into a small helper function that is called, rather than being directly embedded in the FAD file parsing stuff. Once that is done, it will be possible to call that function from this spot in doProgress():
Code:
if (fp == NULL) // check for probs
{
//reportError(false, null, sFile + " not found");
strcat(sProgress, sPACKET_TYPE_PROBLEM);
strcat(sProgress, sPACKET_DELIM);
sprintf(sReport, "WARNING: error opening file %s. Continuing...\n", sFile);
report(sReport);
return FALSE;
}
What I want to end up doing is formatting and sending a (basically empty) "ping" packet just before the "return FALSE" here. That way, the GUI will update to show the time that the computer last communicated and let me know the computer is alive, even if it isn't running FAD.
It's a minor change that wouldn't affect the basic functionality any, but might allow for various expansions in the future. You could then call the packet send function from other routines - perhaps one that knew, for example, how to deal with an SOB file (if someone wanted to take the time to write something that parsed it. Doing that would involve adding a new 'S' packet type to the program, then modifying the GUI to deal with "S" packets.)
Anyway, it just seems like a simple mod I could make to allow for additional functionality to be added in the future, if you didn't mind.
Edit:
My next step after that little change would be to allow the linux version to read from a .ini file, too, instead of depending exclusively on command line args.....