mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
2008-07-31 Ramon Novoa <rnovoa@artica.es>
* win32/pandora_windows_service.cc: Small fixes. * win32/modules/pandora_module.cc: time() and localtime() are used instead of GetSystemTime(). * win32/pandora.h: Changed all instances of "Pandora" to "Pandora FMS". git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@989 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a1484deff0
commit
f963e9813d
@ -1,3 +1,11 @@
|
|||||||
|
2008-07-31 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
|
* win32/pandora_windows_service.cc: Small fixes.
|
||||||
|
* win32/modules/pandora_module.cc: time() and localtime() are used
|
||||||
|
instead of GetSystemTime().
|
||||||
|
* win32/pandora.h: Changed all instances of "Pandora" to
|
||||||
|
"Pandora FMS".
|
||||||
|
|
||||||
2008-07-30 Ramon Novoa <rnovoa@artica.es>
|
2008-07-30 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* win32/windows/pandora_wmi.cc: Fixed typo bug.
|
* win32/windows/pandora_wmi.cc: Fixed typo bug.
|
||||||
|
@ -318,7 +318,7 @@ Pandora_Module::getXml () {
|
|||||||
|
|
||||||
pandoraDebug ("%s getXML begin", module_name.c_str ());
|
pandoraDebug ("%s getXML begin", module_name.c_str ());
|
||||||
|
|
||||||
if (!this->has_output || (this->data_list && this->data_list->size () < 1)) {
|
if (!this->has_output || this->data_list == NULL) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,9 +51,9 @@ namespace Pandora {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const HKEY hkey = HKEY_LOCAL_MACHINE;
|
static const HKEY hkey = HKEY_LOCAL_MACHINE;
|
||||||
const char * const name = "PandoraAgent";
|
const char * const name = "PandoraFMSAgent";
|
||||||
const char * const display_name = "Pandora agent";
|
const char * const display_name = "Pandora FMS agent";
|
||||||
const char * const description = "The Pandora Agent service";
|
const char * const description = "The Pandora FMS Agent service";
|
||||||
|
|
||||||
void setPandoraInstallDir (string dir);
|
void setPandoraInstallDir (string dir);
|
||||||
string getPandoraInstallDir ();
|
string getPandoraInstallDir ();
|
||||||
|
@ -144,9 +144,10 @@ Pandora_Windows_Service::pandora_init () {
|
|||||||
TiXmlElement *
|
TiXmlElement *
|
||||||
Pandora_Windows_Service::getXmlHeader () {
|
Pandora_Windows_Service::getXmlHeader () {
|
||||||
TiXmlElement *agent;
|
TiXmlElement *agent;
|
||||||
SYSTEMTIME st;
|
|
||||||
char timestamp[20];
|
char timestamp[20];
|
||||||
string value;
|
string value;
|
||||||
|
time_t ctime;
|
||||||
|
struct tm *ctime_tm = NULL;
|
||||||
|
|
||||||
agent = new TiXmlElement ("agent_data");
|
agent = new TiXmlElement ("agent_data");
|
||||||
|
|
||||||
@ -158,9 +159,13 @@ Pandora_Windows_Service::getXmlHeader () {
|
|||||||
|
|
||||||
agent->SetAttribute ("version", getPandoraAgentVersion ());
|
agent->SetAttribute ("version", getPandoraAgentVersion ());
|
||||||
|
|
||||||
GetSystemTime(&st);
|
// Get current time
|
||||||
sprintf (timestamp, "%d-%02d-%02d %02d:%02d:%02d", st.wYear, st.wMonth, st.wDay,
|
ctime = time(0);
|
||||||
st.wHour, st.wMinute, st.wSecond);
|
ctime_tm = localtime(&ctime);
|
||||||
|
|
||||||
|
sprintf (timestamp, "%d-%02d-%02d %02d:%02d:%02d", ctime_tm->tm_year + 1900,
|
||||||
|
ctime_tm->tm_mon + 1, ctime_tm->tm_mday, ctime_tm->tm_hour,
|
||||||
|
ctime_tm->tm_min, ctime_tm->tm_sec);
|
||||||
|
|
||||||
agent->SetAttribute ("timestamp", timestamp);
|
agent->SetAttribute ("timestamp", timestamp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user