SF.net SVN: fclient: [334] trunk/sandbox/fcp2/iohandler.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-03-07 09:55:09
|
Revision: 334
http://fclient.svn.sourceforge.net/fclient/?rev=334&view=rev
Author: jUrner
Date: 2008-03-07 01:55:12 -0800 (Fri, 07 Mar 2008)
Log Message:
-----------
fixed a critical that could hang io forever
Modified Paths:
--------------
trunk/sandbox/fcp2/iohandler.py
Modified: trunk/sandbox/fcp2/iohandler.py
===================================================================
--- trunk/sandbox/fcp2/iohandler.py 2008-03-07 09:54:27 UTC (rev 333)
+++ trunk/sandbox/fcp2/iohandler.py 2008-03-07 09:55:12 UTC (rev 334)
@@ -347,7 +347,11 @@
if isClientPutComplexDir:
n = clientPutComplexDirDataLength
else:
- n = msg['DataLength']
+ # make shure DataLength is int, otherwise we might loop here forever
+ try:
+ n = int(msg['DataLength'])
+ except ValueError:
+ raise MessageParseError('DataLength param must be type(int)')
if n > 0:
while self._receiveBuffer:
if len(self._receiveBuffer) >= n:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|