PJSUA_MAX_CALLS and pjsua_config.max_calls

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

 



The documentation for pjsua_config.max_calls says this:

> Maximum calls to support (default: 4). The value specified here must be smaller than the compile time maximum settings PJSUA_MAX_CALLS, which by default is 32. To increase this limit, the library must be recompiled with new PJSUA_MAX_CALLS value.

However, the library doesn't do any checking to ensure that max_calls <= PJSUA_MAX_CALLS.  It probably should, as this will result in a crash at a later time when using the library.

For example, say PJSUA_MAX_CALLS is set to 4, and max_calls is set to 8.  Then on the 5th call one makes, the library will crash.

I would suggest setting max_calls to the MIN of PJSUA_MAX_CALLS and the requested max_calls.  This could be done in maybe pjsua_config_dup or perhaps in pjsua_call_subsys_init.

-Robbie Hanson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091110/3cc5b5b9/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