Hello,

We encountered some problems using ontimeout attribute with sipp 3.1
On timeout the label is not found - even if it is defined in .xml file - 
and the label displayed in error
logged on timeout is bad.

(I tried by adding a:
  <recv response="300" optional="false" ontimeout="9">
  </recv>
and a
  <label id="9"/>

in a script where it is not expected to receive a 300 answer
)

I investigated in source code, I found a problem in scenario.cpp
when reading scenario.
In scenario::getCommonAttributes() function we have
ontimeoutLabels[length] = ptr;
ptr really contains label value when xml scenario is read;
the problem is, when the scenario is executed ptr no longer points to 
label value
(I did not try to see the reason why)

I make a correction consisting in copying the label by a strdup rather 
than only keeping
the pointer value:
I replace
ontimeoutLabels[length] = ptr;
by
ontimeoutLabels[length] = strdup(ptr);

and it works. Current release already seems to deallocate the duplicated 
pointer
with the call to
clear_int_str(ontimeoutLabels);
in ~scenario()

Best regards

Christophe


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Sipp-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sipp-users

Reply via email to