mirror of
				https://github.com/Mbed-TLS/mbedtls.git
				synced 2025-11-03 20:33:16 +03:00 
			
		
		
		
	- Changed read from server loop to read more than a single read.
This commit is contained in:
		@@ -156,16 +156,22 @@ int main( void )
 | 
				
			|||||||
        if( ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY )
 | 
					        if( ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY )
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if( ret <= 0 )
 | 
					        if( ret < 0 )
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            printf( "failed\n  ! ssl_read returned %d\n\n", ret );
 | 
					            printf( "failed\n  ! ssl_read returned %d\n\n", ret );
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if( ret == 0 )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            printf( "\n\nEOF\n\n" );
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        len = ret;
 | 
					        len = ret;
 | 
				
			||||||
        printf( " %d bytes read\n\n%s", len, (char *) buf );
 | 
					        printf( " %d bytes read\n\n%s", len, (char *) buf );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    while( 0 );
 | 
					    while( 1 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ssl_close_notify( &ssl );
 | 
					    ssl_close_notify( &ssl );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user