Invalid assertion error in PJNATH (turn_session.c)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've found an invalid assertion in PJNATH, file turn_session.c, pjproject
2.0:

    - in the function sess_shutdown, you can find a switch (sess->state),
line 398, and there is a case for PJ_TURN_STATE_DEALLOCATING.
    - while handling this state, you'll find the function send_refresh
being called.
    - in the function send_refresh there is the following (invalid)
statement:

            PJ_ASSERT_ON_FAIL(sess->state==PJ_TURN_STATE_READY, return);

I couldn't understand what is the reason for the sess_shutdown being called
recursively, but I can see two solutions:

    - remove the case for the state  PJ_TURN_STATE_DEALLOCATING in the
function sess_shutdown, as calling send_refresh should be useless in this
state;
    - correct the function send_refresh to accept the
state PJ_TURN_STATE_DEALLOCATING.

What is the best choice to do here?

Regards,
Guilherme Balena Versiani.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120705/39954646/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux