[Asterisk-Dev] Re: Asterisk core

Derek Smithies derek at indranet.co.nz
Wed Mar 31 16:54:28 MST 2004


Hi,
 
 My view is that it is not open file limit.

 My understanding is that Peter meant in his initial letter,
   After processing 200 calls, 
 and 
   when there were  20 concurrent calls, the h323 module failed.

Openh323, which generates far more open files than asterisk, can manage
70 concurrent calls through a proxy before the file handle limit is 
reached.

===================
A quick perusal of the code in the cvs, chan_h323.cxx revealed two
instances of the strtok_r function.

 From the man page of strtok_r:: (which is combined with strtok)
BUGS
       Never use these functions. If you do, note that:
 
              These functions modify their first argument.
 
              These functions cannot be used on constant strings.
 
              The identity of the delimiting character is lost.
 
              The strtok() function uses a static  buffer  while  parsing,  
              so it's not thread safe. Use strtok_r() if this matters to you.
 

Now, in 
static struct ast_channel *oh323_request(char *type, int format, void *data)
{

there is a call to ::
      strtok_r(host, "/", &(h323id));
                 

further down the procedure,
there are two calls which use the variable host.


More information about the asterisk-dev mailing list