2012-05-03 Sergio Martin <sergio.martin@artica.es>
* win32/windows/pandora_wmi.cc: Added to the windows agent inventory module for patches the service pack column Merged from 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6251 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
a64560c081
commit
5f1f45cf43
|
@ -1,3 +1,11 @@
|
|||
2012-05-03 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* win32/windows/pandora_wmi.cc: Added to the windows
|
||||
agent inventory module for patches the service pack
|
||||
column
|
||||
|
||||
Merged from 4.0.2
|
||||
|
||||
2012-04-27 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||
|
||||
* unix/plugins/inventory: Fixed a small error related to inventory plugin
|
||||
|
|
|
@ -1016,7 +1016,7 @@ int
|
|||
Pandora_Wmi::getPatchInfo (list<string> &rows) {
|
||||
CDhInitialize init;
|
||||
CDispPtr wmi_svc = NULL, patch_info = NULL;
|
||||
char *hot_fix_id = NULL, *description = NULL, *comments = NULL;
|
||||
char *hot_fix_id = NULL, *description = NULL, *comments = NULL, *service_pack = NULL;
|
||||
string ret = "";
|
||||
int num_objects = 0;
|
||||
try {
|
||||
|
@ -1027,7 +1027,7 @@ Pandora_Wmi::getPatchInfo (list<string> &rows) {
|
|||
|
||||
dhCheck (dhGetValue (L"%o", &patch_info, wmi_svc,
|
||||
L".ExecQuery(%S)",
|
||||
L"SELECT HotFixID, Description, FixComments FROM Win32_QuickFixEngineering "));
|
||||
L"SELECT HotFixID, Description, FixComments, ServicePackInEffect FROM Win32_QuickFixEngineering "));
|
||||
|
||||
FOR_EACH (patch_info_item, patch_info, NULL) {
|
||||
num_objects++;
|
||||
|
@ -1050,7 +1050,14 @@ Pandora_Wmi::getPatchInfo (list<string> &rows) {
|
|||
if (comments != NULL) {
|
||||
ret += comments;
|
||||
}
|
||||
dhFreeString(comments);
|
||||
ret += inventory_field_separator;
|
||||
dhFreeString (comments);
|
||||
dhGetValue (L"%s", &service_pack, patch_info_item,
|
||||
L".ServicePackInEffect");
|
||||
if (service_pack != NULL) {
|
||||
ret += service_pack;
|
||||
}
|
||||
dhFreeString(service_pack);
|
||||
rows.push_back(ret);
|
||||
ret.clear();
|
||||
} NEXT_THROW (patch_info_item);
|
||||
|
|
Loading…
Reference in New Issue