mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-24 06:27:07 -04:00
Applied patch from 'mitch' to improve error detection when streaming.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2864 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
@@ -1235,7 +1235,7 @@ bool EventStream::sendFrame( int delta_us )
|
||||
break;
|
||||
}
|
||||
fprintf( stdout, "Content-Length: %d\r\n\r\n", img_buffer_size );
|
||||
if ( fwrite( img_buffer, img_buffer_size, 1, stdout ) < 0 )
|
||||
if ( fwrite( img_buffer, img_buffer_size, 1, stdout ) != 1 )
|
||||
{
|
||||
Error( "Unable to send stream frame: %s", strerror(errno) );
|
||||
return( false );
|
||||
|
||||
@@ -295,7 +295,7 @@ bool Image::WriteRaw( const char *filename ) const
|
||||
return( false );
|
||||
}
|
||||
|
||||
if ( fwrite( buffer, size, 1, outfile ) < 1 )
|
||||
if ( fwrite( buffer, size, 1, outfile ) != 1 )
|
||||
{
|
||||
Error( "Unable to write to '%s': %s", filename, strerror(errno) );
|
||||
return( false );
|
||||
|
||||
4332
src/zm_monitor.cpp
4332
src/zm_monitor.cpp
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user