<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Pr\00E9format\00E9 HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.PrformatHTMLCar
        {mso-style-name:"Pr\00E9format\00E9 HTML Car";
        mso-style-priority:99;
        mso-style-link:"Pr\00E9format\00E9 HTML";
        font-family:"Courier New";
        mso-fareast-language:FR;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:FR'>ACE VERSION: 6.2 (and probably 6.3 and <6.2 also, because the ASNMP source have no functional change)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:FR'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:10.0pt;font-family:"Courier New";mso-fareast-language:FR'>HOST MACHINE and OPERATING SYSTEM: PC with Windows XP<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Config.h : #include "ace/config-win32.h"<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><pre><span lang=EN-CA>Microsoft Visual C++<o:p></o:p></span></pre><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><pre><span lang=EN-CA>No $ACE_ROOT/bin/MakeProjectCreator/config/default.features file<o:p></o:p></span></pre><pre><span lang=EN-CA><o:p> </o:p></span></pre><pre><span lang=EN-CA>ASNMP\examples\get example affected<o:p></o:p></span></pre><pre><span lang=EN-CA>(and all code which would do the same synchronous call)<o:p></o:p></span></pre><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><pre>THE PROBLEM AFFECT: EXECUTION<o:p></o:p></pre><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><pre><span lang=EN-CA>SYNOPSIS:<o:p></o:p></span></pre><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>synchronous get example does not give oid and value result<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><pre><span lang=EN-CA>DESCRIPTION:<o:p></o:p></span></pre><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>After get example compilation I launch it like that :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>“..ASNMP\examples\get>get.exe 10.198.7.80<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>ASNMP:INFO:SNMP Version 1 GET SAMPLE PROGRAM<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>OID: 1.3.6.1.2.1.1.1.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Device: 10.198.7.80:161<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>[ Retries=1         Timeout=1 ms Community= ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>        Oid =<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>        Value =<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>ASNMP:INFO: command completed normally.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>“<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>The problem is Oid = nothing and Value = nothing<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Note that for get_async example the result is correct :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>“<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>ASNMP\examples\get>get_async.exe 10.198.7.80<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>ASNMP:INFO:SNMP Version 1 GET SAMPLE PROGRAM<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>OID: 1.3.6.1.2.1.1.1.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Device: 10.198.7.80:161<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>[ Retries=1         Timeout=1000 ms Community= ]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>        Oid = 1.3.6.1.2.1.1.1.0<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>        Value = Hardware: x86 Family 6 Model 37 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>2600 Multiprocessor Free)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>ASNMP:INFO: command completed normally.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>“<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Googling “ACE ASNMP synchronous get bug” shows something very close to this synchronous get example problem at <a href="https://groups.google.com/forum/#!topic/comp.soft-sys.ace/bFP6c6n2aFA">https://groups.google.com/forum/#!topic/comp.soft-sys.ace/bFP6c6n2aFA</a> (with ACE 5.6.7)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>So maybe you already know the problem but I don’t know if you know.. anyway this problem seems to subsist in ACE 6.2 (and probably ACE 6.3).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>I have launched debugger : the sending of the SNMP get seems OK in transaction::run() then this function returns 0 because an handler has been registered.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>At this point this description sentence echoes with the “</span><span lang=EN-CA>The function transaction::run can’t  work with reactor since this is a function may be called from a synchronic flow.” written at the web link given above.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>Then back in Snmp::run_transaction, transaction::result is called but return -1 because of iov_len == 0, then (and I think it’s another, but minor bug) as the pdu content has not changed the test “pdu.get_request_id() == hold_req_id” is true and the loop exit as if the response was checked OK..<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'>I have also launched wireshark showing me that, at the network level, everything is fine : I have a response from 10.198.7.80:161 which contains “Hardware: x86 Family 6 Model 37 Stepping 5 AT/AT COMPATIBLE - Software: Windows 2000 Version 5.1 (Build 2600 Multiprocessor Free)”<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-family:"Arial","sans-serif";mso-fareast-language:FR'>[@@ THALES GROUP INTERNAL @@]<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA><o:p> </o:p></span></p></div></body></html>