Menu

#8 invalid field values cause Gnats.pm to hang

default
closed-fixed
rpcme
None
5
2014-08-15
2004-11-22
ironhorse
No

I have a drop down box field called
"Planned-For-Release" with allowed/valid values of
'Q1', 'Q2', and 'Unknown'. If I run a command like this:

$res = $g->replaceField($pr, "Planned-For-Release",
"Unknown", "Testing reason changed\n\n");

when the replaceField is attempted, it hangs. It would
look similar to:

reason="Testing reason changed

" at C:/usr/local/Perl/site/lib/Net/Gnats.pm line 438,
<SOCK> line 96.

If I change Gnats.pm, the _doGnatsCmd function, from

print SOCK "$cmd\n";
my $response = $self->_getGnatsdResponse();
#print "received |$response|\n";

my $bugstring="411 There is a bad value";
<SOCK> if $response =~/^$bugstring/;

to

print SOCK "$cmd\n";
my $response = $self->_getGnatsdResponse();
#print "received |$response|\n";

my $bugstring="411 There is a bad value";
#<SOCK> if $response =~/^$bugstring/;

(just commenting out the <SOCK> line) then there is no
hang, and the error is propogated back to the calling
script (I test the return code from replaceField and
then print error info if any error occurred):

reason="Testing reason changed

" at C:/usr/local/Perl/site/lib/Net/Gnats.pm line 438,
<SOCK> line 96.
replaceField returned 0
ERROR: last error info: errorcode = 411, errormsg = 411
There is a bad value `Unknown' for the field
`Planned-For-Release'.

I'm using gnatsperl 0.05 because 0.06, as of today,
isn't in a normal distribution (the 0.06 download is
identical to the 0.05 download) and doesn't work when
pulled out of cvs.

Discussion

  • rpcme

    rpcme - 2014-08-15

    Added test t/regress_8.t and could not repro ... and it looks like replaceField has changed to setField in the interim.

    Closing.

     
  • rpcme

    rpcme - 2014-08-15
    • status: open --> closed-fixed
    • assigned_to: thacker
    • Group: --> default
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.