fix crash: src and dest stream params were reversed.

This commit is contained in:
Andy2 2011-10-10 22:24:44 -07:00
parent 92a2fb1a1f
commit 4bb61401bd

View file

@ -313,7 +313,7 @@ readStreamIf( ServerCtxt* server, XWStreamCtxt* in )
XP_U16 len = stream_getU16( in );
if ( 0 < len ) {
result = mkServerStream( server );
stream_copyFromStream( in, result, len );
stream_copyFromStream( result, in, len );
}
return result;
}
@ -323,7 +323,9 @@ writeStreamIf( XWStreamCtxt* dest, XWStreamCtxt* src )
{
XP_U16 len = !!src ? stream_getSize( src ) : 0;
stream_putU16( dest, len );
stream_copyFromStream( dest, src, len );
if ( 0 < len ) {
stream_copyFromStream( dest, src, len );
}
}
ServerCtxt*