Changeset 3060


Ignore:
Timestamp:
Jan 14, 2010 9:05:08 AM (14 years ago)
Author:
bennylp
Message:

Misc (#1026): remove the code that silently set SO_SNDBUF/SO_RCVBUF as it's not that useful and it would print error message on many platforms that don't support it, causing many questions from users

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c

    r2519 r3060  
    5151 * More experiments are needed probably. 
    5252 */ 
     53/* 2010/01/14 
     54 *  Too many people complained about seeing "Error setting SNDBUF" log, 
     55 *  so lets just remove this. People who want to have SNDBUF set can 
     56 *  still do so by declaring these two macros in config_site.h 
     57 */ 
    5358#ifndef PJSIP_UDP_SO_SNDBUF_SIZE 
    54 #   define PJSIP_UDP_SO_SNDBUF_SIZE     (24*1024*1024) 
     59/*#   define PJSIP_UDP_SO_SNDBUF_SIZE   (24*1024*1024)*/ 
     60#   define PJSIP_UDP_SO_SNDBUF_SIZE     0 
    5561#endif 
    5662 
    5763#ifndef PJSIP_UDP_SO_RCVBUF_SIZE 
    58 #   define PJSIP_UDP_SO_RCVBUF_SIZE     (24*1024*1024) 
     64/*#   define PJSIP_UDP_SO_RCVBUF_SIZE   (24*1024*1024)*/ 
     65#   define PJSIP_UDP_SO_RCVBUF_SIZE     0 
    5966#endif 
    6067 
     
    551558                           const pjsip_host_port *a_name) 
    552559{ 
     560#if PJSIP_UDP_SO_RCVBUF_SIZE || PJSIP_UDP_SO_SNDBUF_SIZE 
    553561    long sobuf_size; 
    554562    pj_status_t status; 
     563#endif 
    555564 
    556565    /* Adjust socket rcvbuf size */ 
     566#if PJSIP_UDP_SO_RCVBUF_SIZE 
    557567    sobuf_size = PJSIP_UDP_SO_RCVBUF_SIZE; 
    558568    status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_RCVBUF(), 
     
    564574                  status)); 
    565575    } 
     576#endif 
    566577 
    567578    /* Adjust socket sndbuf size */ 
     579#if PJSIP_UDP_SO_SNDBUF_SIZE 
    568580    sobuf_size = PJSIP_UDP_SO_SNDBUF_SIZE; 
    569581    status = pj_sock_setsockopt(sock, pj_SOL_SOCKET(), pj_SO_SNDBUF(), 
     
    575587                  status)); 
    576588    } 
     589#endif 
    577590 
    578591    /* Set the socket. */ 
Note: See TracChangeset for help on using the changeset viewer.