<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/tcl-snmptools/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/tcl-snmptools/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/tcl-snmptools/bugs/</id><updated>2009-06-19T05:55:17Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>stdout, stderr redirections lost</title><link href="https://sourceforge.net/p/tcl-snmptools/bugs/4/" rel="alternate"/><published>2009-06-19T05:55:17Z</published><updated>2009-06-19T05:55:17Z</updated><author><name>Bryson Lee</name><uri>https://sourceforge.net/u/userid-372568/</uri></author><id>https://sourceforge.net4a4ea544b4db5894d660b3775049821369cf5575</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The implementation used to capture output from the NetSNMP library calls for inclusion in the TCL result string has the side-effect of destroying any redirections of stdout and stderr applied to the process using the extension.  The code assumes that calling freopen() on /dev/tty for stdout and stderr is sufficient; but this isn't the case if either or both output streams have been redirected prior to calls into the extension code.&lt;/p&gt;
&lt;p&gt;The attached patch to tcl-snmptools-1.0/generic/util.c corrects this behavior for platforms that have dup(), dup2(), and fcntl().  I don't know what the equivalent fix on e.g. WIN32 looks like.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>lack of proper Tcl quoting of values in results</title><link href="https://sourceforge.net/p/tcl-snmptools/bugs/3/" rel="alternate"/><published>2008-03-13T16:53:48Z</published><updated>2008-03-13T16:53:48Z</updated><author><name>Matteo Ianeselli</name><uri>https://sourceforge.net/u/ianezz/</uri></author><id>https://sourceforge.net0e04ad6c1f68560aa345080c893e02a9fbf52df6</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The various get, getnext, walk, etc. commands return on success a Tcl list of values which is built by hand by explicitly surrounding values with curly braces. &lt;/p&gt;
&lt;p&gt;Said values are not quoted, possibly resulting in invalid Tcl lists when a value contains curly braces.&lt;/p&gt;
&lt;p&gt;A way to fix this could be using Tcl_DStringAppendElement() instead of Tcl_DStringAppend() when appending values to the result: it takes care of quoting values, inserting a separator from previous elements and surrounding the values with curly braces if needed (basically, it is equivalent to a "lappend Result $value").&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>snmptranslate.c (v1.0): in/out options are toggled </title><link href="https://sourceforge.net/p/tcl-snmptools/bugs/2/" rel="alternate"/><published>2008-03-11T15:23:56Z</published><updated>2008-03-11T15:23:56Z</updated><author><name>Matteo Ianeselli</name><uri>https://sourceforge.net/u/ianezz/</uri></author><id>https://sourceforge.nete4f6aaae1a79cb4395c30d05d984269900270801</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;input/output options passed to "snmp translate" are toggled instead of being set/reset, resulting in unexpected behaviour between calls.&lt;/p&gt;
&lt;p&gt;For example, try executing&lt;/p&gt;
&lt;p&gt;snmp translate -IR -On sysDescr.0&lt;br /&gt;
snmp translate -IR -On sysDescr.0&lt;/p&gt;
&lt;p&gt;the first call works, while the second call (identical) results in an error because the 'R' flag is toggled.&lt;/p&gt;
&lt;p&gt;I'm not familiar enough with the Net-SNMP C API to suggest an appropriate solution to this, but perhaps the library datastore storing the options probably needs to be reinitialized to a known state between calls to snmptranslate().&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>snmptranslate.c (v1.0): optind not reset to 1 between calls</title><link href="https://sourceforge.net/p/tcl-snmptools/bugs/1/" rel="alternate"/><published>2008-03-11T15:11:30Z</published><updated>2008-03-11T15:11:30Z</updated><author><name>Matteo Ianeselli</name><uri>https://sourceforge.net/u/ianezz/</uri></author><id>https://sourceforge.netfcd5fc4c17035e4870c6310c5fc94f16f443409c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;On version 1.0, global optind is not reset to 1 before calling getopt() in snmptranslate(). &lt;/p&gt;
&lt;p&gt;This results in "snmp translate" failing in subsequent  calls, because getopt() runs out of arguments to parse (possibly resulting in a core dumped).&lt;/p&gt;
&lt;p&gt;Simply adding a &lt;/p&gt;
&lt;p&gt;optind = 1;&lt;/p&gt;
&lt;p&gt;before the call to getopt() seems to work.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>