Add net_recv_timeout()
This commit is contained in:
parent
8fa6dfd560
commit
9d9b003a9a
4 changed files with 81 additions and 4 deletions
|
@ -658,8 +658,6 @@ void polarssl_strerror( int ret, char *buf, size_t buflen )
|
|||
#endif /* POLARSSL_MD5_C */
|
||||
|
||||
#if defined(POLARSSL_NET_C)
|
||||
if( use_ret == -(POLARSSL_ERR_NET_UNKNOWN_HOST) )
|
||||
snprintf( buf, buflen, "NET - Failed to get an IP address for the given hostname" );
|
||||
if( use_ret == -(POLARSSL_ERR_NET_SOCKET_FAILED) )
|
||||
snprintf( buf, buflen, "NET - Failed to open a socket" );
|
||||
if( use_ret == -(POLARSSL_ERR_NET_CONNECT_FAILED) )
|
||||
|
@ -680,6 +678,10 @@ void polarssl_strerror( int ret, char *buf, size_t buflen )
|
|||
snprintf( buf, buflen, "NET - Connection requires a read call" );
|
||||
if( use_ret == -(POLARSSL_ERR_NET_WANT_WRITE) )
|
||||
snprintf( buf, buflen, "NET - Connection requires a write call" );
|
||||
if( use_ret == -(POLARSSL_ERR_NET_UNKNOWN_HOST) )
|
||||
snprintf( buf, buflen, "NET - Failed to get an IP address for the given hostname" );
|
||||
if( use_ret == -(POLARSSL_ERR_NET_TIMEOUT) )
|
||||
snprintf( buf, buflen, "NET - The operation timed out" );
|
||||
#endif /* POLARSSL_NET_C */
|
||||
|
||||
#if defined(POLARSSL_OID_C)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue