Merge lp:~linux-jacekk/ocsinventory-windows-agent/fix-log-error into lp:ocsinventory-windows-agent

Proposed by Jacek Kowalski
Status: Merged
Approved by: Didier Liroulet
Approved revision: 497
Merged at revision: 498
Proposed branch: lp:~linux-jacekk/ocsinventory-windows-agent/fix-log-error
Merge into: lp:ocsinventory-windows-agent
Diff against target: 12 lines (+1/-1)
1 file modified
SysInfo/Wmi.cpp (+1/-1)
To merge this branch: bzr merge lp:~linux-jacekk/ocsinventory-windows-agent/fix-log-error
Reviewer Review Type Date Requested Status
Didier Liroulet Approve
Review via email: mp+225123@code.launchpad.net

Description of the change

On current trunk, running OCS Inventory Agent with /DEBUG=2 results in error message: "OcsInventory.exe has stopped working".

This commit fixes incorrect format string in AddLog call in Wmi.cpp that caused this behavior - number of arguments in format specifier did not match number of args provided.

To post a comment you must log in.
Revision history for this message
Didier Liroulet (dliroulet) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'SysInfo/Wmi.cpp'
2--- SysInfo/Wmi.cpp 2014-03-10 12:55:35 +0000
3+++ SysInfo/Wmi.cpp 2014-07-01 08:58:48 +0000
4@@ -1126,7 +1126,7 @@
5 csBuffer = m_dllWMI.GetClassObjectStringValue( _T( "MonitorType"));
6 myObject.SetType( csBuffer);
7 pMyList->AddTail( myObject);
8- AddLog( _T( "\t\t<Manufacturer: %s><Caption: %s><Description: %s><Name: %s><Type: %s>\n"),
9+ AddLog( _T( "\t\t<Manufacturer: %s><Caption: %s><Description: %s><Type: %s>\n"),
10 myObject.GetManufacturer(), myObject.GetCaption(), myObject.GetDescription(),
11 myObject.GetType());
12 uIndex ++;

Subscribers

People subscribed via source and target branches