Changeset 377


Ignore:
Timestamp:
Apr 4, 2006 1:11:34 PM (18 years ago)
Author:
bennylp
Message:

Removed some UDP socket warnings

File:
1 edited

Legend:

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

    r367 r377  
    2727#include <pj/pool.h> 
    2828#include <pj/sock.h> 
     29#include <pj/compat/socket.h> 
    2930#include <pj/string.h> 
    3031 
     
    157158 
    158159        } else if (bytes_read == 0) { 
     160 
    159161            /* TODO: */ 
    160         } else { 
     162 
     163        } else if (-bytes_read != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) && 
     164                   -bytes_read != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) &&  
     165                   -bytes_read != PJ_STATUS_FROM_OS(OSERR_ECONNRESET))  
     166        { 
     167 
    161168            /* Report error to endpoint. */ 
    162169            PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt, 
     
    214221 
    215222            if (i < MAX_IMMEDIATE_PACKET) { 
    216                 /* Report error to endpoint. */ 
    217                 PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt, 
    218                                        rdata->tp_info.transport->obj_name, 
    219                                        status,  
    220                                        "Warning: pj_ioqueue_recvfrom error")); 
     223 
     224                /* Report error to endpoint if this is not EWOULDBLOCK error.*/ 
     225                if (status != PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK) && 
     226                    status != PJ_STATUS_FROM_OS(OSERR_EINPROGRESS) &&  
     227                    status != PJ_STATUS_FROM_OS(OSERR_ECONNRESET))  
     228                { 
     229 
     230                    PJSIP_ENDPT_LOG_ERROR((rdata->tp_info.transport->endpt, 
     231                                           rdata->tp_info.transport->obj_name, 
     232                                           status,  
     233                                           "Warning: pj_ioqueue_recvfrom")); 
     234                } 
     235 
    221236                /* Continue loop. */ 
    222237                bytes_read = 0; 
Note: See TracChangeset for help on using the changeset viewer.