Skip to content

Commit

Permalink
Fix zmc crashing on shutdown (for remote http cameras) caused by cont…
Browse files Browse the repository at this point in the history
…ent_length sign mess
  • Loading branch information
mastertheknife committed Nov 24, 2013
1 parent 55ea674 commit 88f2bc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/zm_remote_camera_http.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 88f2bc6

Please sign in to comment.