Update of /cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/mcl/net
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20592/src/nl/cwi/monetdb/mcl/net
Modified Files:
Tag: Clients_1-20
MapiSocket.java
Log Message:
When we feel we are dealing with a server that sends us too large blocks, die
as hard as before, but now with a descriptive message as to why.
Index: MapiSocket.java
===================================================================
RCS file:
/cvsroot/monetdb/clients/src/java/src/nl/cwi/monetdb/mcl/net/MapiSocket.java,v
retrieving revision 1.9
retrieving revision 1.9.2.1
diff -u -d -r1.9 -r1.9.2.1
--- MapiSocket.java 28 Aug 2007 21:03:46 -0000 1.9
+++ MapiSocket.java 12 Nov 2007 21:42:10 -0000 1.9.2.1
@@ -677,6 +677,12 @@
}
}
+ // sanity check to avoid bad servers make us do an ugly
+ // stack trace
+ if (blockLen > block.length)
+ throw new AssertionError("Server sent a block "
+
+ "larger than BLOCKsize: " +
+ blockLen + " > " +
block.length);
size = in.read(block, 0, blockLen);
if (size == -1)
throw new IOException("End of stream reached");
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins