Ignore:
Timestamp:
Jul 28, 2008 8:17:04 PM (16 years ago)
Author:
bennylp
Message:

Ticket #538: Closed TCP connection should be removed from the hash table immediately

File:
1 edited

Legend:

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

    r2131 r2180  
    10681068    tdata_op_key->tdata = NULL; 
    10691069 
    1070     /* Check for error/closure */ 
    1071     if (bytes_sent <= 0) { 
    1072         pj_status_t status; 
    1073  
    1074         PJ_LOG(5,(tcp->base.obj_name, "TCP send() error, sent=%d",  
    1075                   bytes_sent)); 
    1076  
    1077         status = (bytes_sent == 0) ? PJ_RETURN_OS_ERROR(OSERR_ENOTCONN) : 
    1078                                      -bytes_sent; 
    1079         if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status; 
    1080         pjsip_transport_shutdown(&tcp->base); 
    1081     } 
    1082  
    10831070    if (tdata_op_key->callback) { 
    10841071        /* 
     
    10931080        pj_gettimeofday(&tcp->last_activity); 
    10941081    } 
     1082 
     1083    /* Check for error/closure */ 
     1084    if (bytes_sent <= 0) { 
     1085        pj_status_t status; 
     1086 
     1087        PJ_LOG(5,(tcp->base.obj_name, "TCP send() error, sent=%d",  
     1088                  bytes_sent)); 
     1089 
     1090        status = (bytes_sent == 0) ? PJ_RETURN_OS_ERROR(OSERR_ENOTCONN) : 
     1091                                     -bytes_sent; 
     1092        if (tcp->close_reason==PJ_SUCCESS) tcp->close_reason = status; 
     1093        pjsip_transport_shutdown(&tcp->base); 
     1094    } 
     1095 
    10951096} 
    10961097 
Note: See TracChangeset for help on using the changeset viewer.