comparison libmpdemux/asf_streaming.c @ 7310:d8e2623a2ea1

Don't try to reread from the socket if the server says EOF
author bertrand
date Sat, 07 Sep 2002 20:38:44 +0000
parents 0a0527c82560
children c4434bdf6e51
comparison
equal deleted inserted replaced
7309:10f629e33ee6 7310:d8e2623a2ea1
658 http_free( http_hdr ); 658 http_free( http_hdr );
659 http_hdr = http_new_header(); 659 http_hdr = http_new_header();
660 do { 660 do {
661 i = read( fd, buffer, BUFFER_SIZE ); 661 i = read( fd, buffer, BUFFER_SIZE );
662 //printf("read: %d\n", i ); 662 //printf("read: %d\n", i );
663 if( i<0 ) { 663 if( i<=0 ) {
664 perror("read"); 664 perror("read");
665 http_free( http_hdr ); 665 http_free( http_hdr );
666 return -1; 666 return -1;
667 } 667 }
668 http_response_append( http_hdr, buffer, i ); 668 http_response_append( http_hdr, buffer, i );