Skip to content

Commit

Permalink
Return ok if xml scenario finished ok. Log rtp or echo errors
Browse files Browse the repository at this point in the history
  • Loading branch information
smititelu committed Dec 6, 2022
1 parent db0cb33 commit bdb3017
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/sipp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,25 +1128,25 @@ void sipp_exit(int rc, int rtp_errors, int echo_errors)
// Exit is not a normal exit. Just use the passed exit code.
exit(rc);
} else {
// log rtp stream errors
if ((rtp_errors > 0) || (echo_errors > 0)) {
WARNING("GOT rtp errors = %d or echo errors = %d", rtp_errors, echo_errors);
}

// Normal exit: we need to determine if the calls were all
// successful or not. In order to compute the return code, get
// the counter of failed calls. If there is 0 failed calls,
// then everything is OK!
if ((rtp_errors > 0) || (echo_errors > 0))
{
exit(EXIT_RTPCHECK_FAILED);
}
else
{
if (counter_value_failed == 0) {
if ((timeout_exit) && (counter_value_success < 1)) {
exit (EXIT_TEST_RES_INTERNAL);
} else {
exit(EXIT_TEST_OK);
}
if (counter_value_failed == 0) {
if ((timeout_exit) && (counter_value_success < 1)) {
exit (EXIT_TEST_RES_INTERNAL);
} else {
exit(EXIT_TEST_FAILED);
exit(EXIT_TEST_OK);
}
} else if ((rtp_errors > 0) || (echo_errors > 0)) {
exit(EXIT_RTPCHECK_FAILED);
} else {
exit(EXIT_TEST_FAILED);
}
}
}
Expand Down

0 comments on commit bdb3017

Please sign in to comment.