SIPp/sipp — pull request #93 by rkday (2014-09-25 06:55:34+00:00)
Title: Fix jump crashes

Fixes #90 and #91. Testing:

```
$ cat segfault1.xml

OPTIONS sip:test@test.test SIP/2.0

$ ./sipp -sf segfault1.xml localhost
Resolving remote host 'localhost'... Done.
[snip whitespace]
------------------------------ Scenario Screen -------- [1-9]: Change Screen --
Call-rate(length) Port Total-time Total-calls Remote-host
10.0(0 ms)/1.000s 5060 0.00 s 0 127.0.0.1:5060(UDP)

0 new calls during 0.000 s period 0 ms scheduler resolution
0 calls (limit 30) Peak was 0 calls, after 0 s
0 Running, 0 Paused, 0 Woken up
0 dead call msg (discarded) 0 out-of-call msg (discarded)
3 open sockets

Messages Retrans Timeout Unexpected-Msg
OPTIONS ----------> 0 0
[ NOP ]
------ [+|-|*|/]: Adjust rate ---- [q]: Soft exit ---- [p]: Pause traffic -----

2014-09-25	00:14:38.910401	1411600478.910401: Jump statement at index 1 jumps to itself and causes an infinite loop.
------------------------------ Scenario Screen -------- [1-9]: Change Screen --
Call-rate(length) Port Total-time Total-calls Remote-host
10.0(0 ms)/1.000s 5060 0.10 s 1 127.0.0.1:5060(UDP)

1 new calls during 0.102 s period 1 ms scheduler resolution
1 calls (limit 30) Peak was 1 calls, after 0 s
0 Running, 2 Paused, 1 Woken up
0 dead call msg (discarded) 0 out-of-call msg (discarded)
3 open sockets

Messages Retrans Timeout Unexpected-Msg
OPTIONS ----------> 1 0
[ NOP ]
------------------------------ Test Terminated --------------------------------

----------------------------- Statistics Screen ------- [1-9]: Change Screen --
Start Time | 2014-09-25	00:14:38.807961	1411600478.807961
Last Reset Time | 2014-09-25	00:14:38.808714	1411600478.808714
Current Time | 2014-09-25	00:14:38.910521	1411600478.910521
-------------------------+---------------------------+--------------------------
Counter Name | Periodic value | Cumulative value
-------------------------+---------------------------+--------------------------
Elapsed Time | 00:00:00:101000 | 00:00:00:102000
Call Rate | 9.901 cps | 9.804 cps
-------------------------+---------------------------+--------------------------
Incoming call created | 0 | 0
OutGoing call created | 1 | 1
Total Call created | | 1
Current Call | 1 |
-------------------------+---------------------------+--------------------------
Successful call | 0 | 0
Failed call | 0 | 0
-------------------------+---------------------------+--------------------------
Call Length | 00:00:00:000000 | 00:00:00:000000
------------------------------ Test Terminated --------------------------------

2014-09-25	00:14:38.910401	1411600478.910401: Jump statement at index 1 jumps to itself and causes an infinite loop.
```

We could do a bit better on this by detecting it when we parse the scenario, like we do for diiding by 0, but parseAction doesn't have the current index as a parameter.

```
$ cat segfault2.xml

$ ./sipp -sf segfault2.xml localhost
2014-09-25	00:14:58.549979	1411600498.549979: Unable to determine creation mode of the tool (server, client)
.
```