Conference Asserts in Release Build

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

 



On Sun, Jul 27, 2008 at 6:52 PM, Archie Rosenblum <archie at bbsti.com> wrote:

>   I am getting an assertion that end the program from conference.c in
> release build.  The code below is for muting the call and is in the main
> thread.  This seems to happen when the call disconnects somewhere in-between
> the validation and the actual call to pjsua_conf_adjust_tx_level.
>
>
>
>
>
> if (pjsua_call_is_active(
> call_id))                                                       // Valid
> call
>
> if (pjsua_call_get_info(call_id, &info)   ==
> PJ_SUCCESS)                            // Got structure
>
> if (info.state ==
> PJSIP_INV_STATE_CONFIRMED)                                 // Connected
>
>                   if (pjsua_conf_adjust_tx_level(info.conf_slot,0)==
> PJ_SUCCESS)          // Mute Call
>
>                   {
>
>                         printf(">> Call TX Muted\n");
>
>                   }
>
>             }
>
>       }
>
> }
>
>
>
> I get the follow assertion:
>
>
>
> Assertion failed: conf->ports[slot] != ((void *)0), file
> ..\src\pjmedia\conferen
>
> ce.c, line 1276
>
>
>
> This application has requested the Runtime to terminate it in an unusual
> way.
>
> Please contact the application's support team for more information.
>
>
>
> Questions:
>
>
>
> 1) Am I muting this call in the right spot?
>
I would say that rather than checking if the call is CONFIRMED, you should
check if the media is active instead (pjsua_call_info.media_status field).
This won't fix the error, but it's more appropriate.


> 2) The pj_assert works in release mode.  Should it just return an error
> instead of calling the c library assert to stop the program?
>
>
It will do that if you disable assertion (-DNDEBUG). See PJ_ASSERT_RETURN
macro declaration for more info.


> 3) Is there a better way to mute the call or catch this error without a
> stop occurring?
>
>
>
Ideally we should use some mutex protection in the application layer, but
make sure care are taken to avoid deadlock (
http://trac.pjsip.org/repos/wiki/FAQ#sip-deadlock). But I think disabling
assertion should probably do it for this case.

Cheers
 Benny

Thank you in advance,
>
> Archie
>
>
>
>
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080728/2ca9c4dd/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