2009-09-10 Ramon Novoa <rnovoa@artica.es>

* windows/pandora_wmi.cc,
          modules/pandora_module_factory.cc: Removed unnecessary code.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1928 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2009-09-10 14:25:59 +00:00
parent ba431b7e0a
commit 0e9b86cc97
3 changed files with 6 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2009-09-10 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_wmi.cc,
modules/pandora_module_factory.cc: Removed unnecessary code.
2009-09-10 Ramon Novoa <rnovoa@artica.es>
* windows/pandora_windows_info.h,

View File

@ -54,7 +54,6 @@ using namespace Pandora_Strutils;
#define TOKEN_FREEMEMORY_PERCENT ("module_freepercentmemory")
#define TOKEN_CPUUSAGE ("module_cpuusage ")
#define TOKEN_INVENTORY ("module_inventory")
#define TOKEN_INVENTORY_INTERVAL ("module_inventory_interval")
#define TOKEN_ODBC ("module_odbc ")
#define TOKEN_MAX ("module_max ")
#define TOKEN_MIN ("module_min ")
@ -155,7 +154,6 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
module_port = "";
module_timeout = "";
module_regexp = "";
module_inventory_interval = "";
stringtok (tokens, definition, "\n");
@ -202,9 +200,6 @@ Pandora_Module_Factory::getModuleFromDefinition (string definition) {
if (module_inventory == "") {
module_inventory = parseLine (line, TOKEN_INVENTORY);
}
if (module_inventory_interval == "") {
module_inventory_interval = parseLine (line, TOKEN_INVENTORY_INTERVAL);
}
if (module_odbc == "") {
module_odbc = parseLine (line, TOKEN_ODBC);
}

View File

@ -184,7 +184,7 @@ Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
CDispPtr wmi_svc, quickfixes;
double free_space = 0, size = 0;
double total_free_space = 0, total_size = 0;
string query, free_str, size_str;
string query;
query = "SELECT Size, FreeSpace FROM Win32_LogicalDisk WHERE DeviceID = \"" + disk_id + "\"";
@ -200,8 +200,6 @@ Pandora_Wmi::getDiskFreeSpacePercent (string disk_id) {
dhGetValue (L"%e", &size, quickfix,
L".Size");
free_space = Pandora_Strutils::strtoulong (free_str);
size = Pandora_Strutils::strtoulong (size_str);
total_free_space += free_space;
total_size += size;
} NEXT_THROW (quickfix);