Changeset 4972


Ignore:
Timestamp:
Jan 5, 2015 4:34:17 AM (6 years ago)
Author:
riza
Message:

Re #1782 (misc): Change assert check of ssl_state to non assert check on OpenSSL wrapper implementation.

(thanks to Joshua Colp for the suggestion)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/ssl_sock_ossl.c

    r4968 r4972  
    22182218 
    22192219    PJ_ASSERT_RETURN(ssock && pool && buff_size, PJ_EINVAL); 
    2220     PJ_ASSERT_RETURN(ssock->ssl_state==SSL_STATE_ESTABLISHED, PJ_EINVALIDOP); 
     2220 
     2221    if (ssock->ssl_state != SSL_STATE_ESTABLISHED)  
     2222        return PJ_EINVALIDOP; 
    22212223 
    22222224    readbuf = (void**) pj_pool_calloc(pool, ssock->param.async_cnt,  
     
    22462248 
    22472249    PJ_ASSERT_RETURN(ssock && pool && buff_size && readbuf, PJ_EINVAL); 
    2248     PJ_ASSERT_RETURN(ssock->ssl_state==SSL_STATE_ESTABLISHED, PJ_EINVALIDOP); 
     2250 
     2251    if (ssock->ssl_state != SSL_STATE_ESTABLISHED)  
     2252        return PJ_EINVALIDOP; 
    22492253 
    22502254    /* Create SSL socket read buffer */ 
     
    24512455 
    24522456    PJ_ASSERT_RETURN(ssock && data && size && (*size>0), PJ_EINVAL); 
    2453     PJ_ASSERT_RETURN(ssock->ssl_state==SSL_STATE_ESTABLISHED, PJ_EINVALIDOP); 
     2457 
     2458    if (ssock->ssl_state != SSL_STATE_ESTABLISHED)  
     2459        return PJ_EINVALIDOP; 
    24542460 
    24552461    // Ticket #1573: Don't hold mutex while calling PJLIB socket send(). 
     
    27262732    pj_status_t status; 
    27272733 
    2728     PJ_ASSERT_RETURN(ssock->ssl_state == SSL_STATE_ESTABLISHED, PJ_EINVALIDOP); 
     2734    PJ_ASSERT_RETURN(ssock, PJ_EINVAL); 
     2735 
     2736    if (ssock->ssl_state != SSL_STATE_ESTABLISHED)  
     2737        return PJ_EINVALIDOP; 
    27292738 
    27302739    if (SSL_renegotiate_pending(ssock->ossl_ssl)) 
Note: See TracChangeset for help on using the changeset viewer.