Fix zmc crashing on shutdown (for remote http cameras) caused by content_length sign mess

This commit is contained in:
Kfir Itzhak 2013-11-24 15:37:47 +02:00
parent 55ea6745f1
commit 88f2bc6b63
1 changed files with 3 additions and 3 deletions

View File

@ -441,7 +441,7 @@ int RemoteCameraHttp::GetResponse()
if ( content_length )
{
while ( buffer.size() < (unsigned int)content_length )
while ( (long)buffer.size() < content_length )
{
int buffer_len = ReadData( buffer );
if ( buffer_len == 0 )
@ -973,7 +973,7 @@ int RemoteCameraHttp::GetResponse()
if ( content_length )
{
while ( buffer.size() < (unsigned int)content_length )
while ( (long)buffer.size() < content_length )
{
//int buffer_len = ReadData( buffer, content_length-buffer.size() );
int buffer_len = ReadData( buffer );
@ -1125,7 +1125,7 @@ int RemoteCameraHttp::Capture( Image &image )
}
case X_RGB :
{
if ( (unsigned int)content_length != image.Size() )
if ( content_length != (long)image.Size() )
{
Error( "Image length mismatch, expected %d bytes, content length was %d", image.Size(), content_length );
Disconnect();