Skip to content

Commit bdb3017

Browse files
committed
Return ok if xml scenario finished ok. Log rtp or echo errors
1 parent db0cb33 commit bdb3017

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/sipp.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,25 +1128,25 @@ void sipp_exit(int rc, int rtp_errors, int echo_errors)
11281128
// Exit is not a normal exit. Just use the passed exit code.
11291129
exit(rc);
11301130
} else {
1131+
// log rtp stream errors
1132+
if ((rtp_errors > 0) || (echo_errors > 0)) {
1133+
WARNING("GOT rtp errors = %d or echo errors = %d", rtp_errors, echo_errors);
1134+
}
1135+
11311136
// Normal exit: we need to determine if the calls were all
11321137
// successful or not. In order to compute the return code, get
11331138
// the counter of failed calls. If there is 0 failed calls,
11341139
// then everything is OK!
1135-
if ((rtp_errors > 0) || (echo_errors > 0))
1136-
{
1137-
exit(EXIT_RTPCHECK_FAILED);
1138-
}
1139-
else
1140-
{
1141-
if (counter_value_failed == 0) {
1142-
if ((timeout_exit) && (counter_value_success < 1)) {
1143-
exit (EXIT_TEST_RES_INTERNAL);
1144-
} else {
1145-
exit(EXIT_TEST_OK);
1146-
}
1140+
if (counter_value_failed == 0) {
1141+
if ((timeout_exit) && (counter_value_success < 1)) {
1142+
exit (EXIT_TEST_RES_INTERNAL);
11471143
} else {
1148-
exit(EXIT_TEST_FAILED);
1144+
exit(EXIT_TEST_OK);
11491145
}
1146+
} else if ((rtp_errors > 0) || (echo_errors > 0)) {
1147+
exit(EXIT_RTPCHECK_FAILED);
1148+
} else {
1149+
exit(EXIT_TEST_FAILED);
11501150
}
11511151
}
11521152
}

0 commit comments

Comments
 (0)