Changeset 257:e09d382d4a70

Show
Ignore:
Timestamp:
10/25/07 12:02:45 (1 year ago)
Author:
vadim@mbdsys.com
Message:

implement overriding of max sip message size

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • SConstruct

    r244 r257  
    3232        ('target_os', "Target platform", sys.platform), 
    3333        ('VERONA_VERSION', "Software version", "0.0.2"), 
    34         ('vlines', "Max number of Virtual Lines we support", "") 
     34        ('vlines', "Max number of Virtual Lines we support", ""), 
     35        ('exosipbufsize', "override max bufer size for reading sip mesages", "") 
    3536        ) 
    3637 
  • eXosip/SConscript

    r176 r257  
    5151        defines['USE_HTTP_TUNNEL'] = 1 
    5252 
     53if env['exosipbufsize']: 
     54        defines['EXOSIP_BUF_SIZE'] = ['exosipbufsize'] 
     55 
    5356eXosip  =  BJ.Library(env, 'eXosip', source = sources,  
    5457       uses = ['osip'], 
  • eXosip/src/udp.c

    r250 r257  
    924924              { 
    925925                osip_call_id_to_str(sip->call_id, &tmp); 
    926                 ret = strcmp(jd->d_dialog->call_id, &tmp); 
     926                ret = strcmp(jd->d_dialog->call_id, tmp); 
    927927                osip_free(tmp); 
    928928                if (!ret)  
     
    23632363} 
    23642364 
     2365#ifndef EXOSIP_BUF_SIZE 
     2366#define EXOSIP_BUF_SIZE (16*1024) 
     2367#endif 
     2368 
    23652369/* if second==-1 && useconds==-1  -> wait for ever 
    23662370   if max_message_nb<=0  -> infinite loop....  */ 
     
    23772381  tv.tv_usec = usec_max; 
    23782382   
    2379   buf = (char *)osip_malloc(SIP_MESSAGE_MAX_LENGTH*sizeof(char)+1); 
     2383  buf = (char *)osip_malloc(EXOSIP_BUF_SIZE+1); 
    23802384  while (max_message_nb!=0 && eXosip.j_stop_ua==0) 
    23812385    { 
     
    24412445 
    24422446          if (eXosip.use_tunnel) { 
    2443                 i = eXosip.tunnel->tunnel_recv(eXosip.tunnel->h_tunnel, buf, SIP_MESSAGE_MAX_LENGTH); 
     2447                i = eXosip.tunnel->tunnel_recv(eXosip.tunnel->h_tunnel, buf, EXOSIP_BUF_SIZE); 
    24442448                if (i < 0) { 
    24452449                        osip_free(buf); 
     
    24492453          else 
    24502454 
    2451                 i = recvfrom (eXosip.j_socket, buf, SIP_MESSAGE_MAX_LENGTH, 0, (struct sockaddr *) &sa, &slen); 
     2455                i = recvfrom (eXosip.j_socket, buf, EXOSIP_BUF_SIZE, 0, (struct sockaddr *) &sa, &slen); 
    24522456                 
    24532457 
     
    24592463              osip_transaction_t *transaction = NULL; 
    24602464              osip_event_t *sipevent; 
    2461               osip_strncpy(buf+i,"\0",1); 
     2465 
     2466              buf[i] = 0; 
    24622467              OSIP_TRACE(osip_trace(__FILE__,__LINE__,OSIP_INFO1,NULL, 
    24632468                                    "Received message: \n%s\n", buf));