Commit e5ce78dc authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Add a quick exit for the timeout=0 case

Careful analysis of packet captures by Colin Granville reveals that LanManFS waits for at least 1cs when no timeout was requested, so add a quick exit for that case. Timeouts of >= 1cs still delay for at least the requested time, and up to 0.999cs longer as before.
This reduces the turn around time which is most beneficial for interfaces faster than 10baseT.

Version 2.48. Tagged as 'LanManFS-2_48'
parent e03efcd9
/* (2.47)
/* (2.48)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 2.47
#define Module_MajorVersion_CMHG 2.48
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Aug 2014
#define Module_Date_CMHG 14 Mar 2015
#define Module_MajorVersion "2.47"
#define Module_Version 247
#define Module_MajorVersion "2.48"
#define Module_Version 248
#define Module_MinorVersion ""
#define Module_Date "06 Aug 2014"
#define Module_Date "14 Mar 2015"
#define Module_ApplicationDate "06-Aug-14"
#define Module_ApplicationDate "14-Mar-15"
#define Module_ComponentName "LanManFS"
#define Module_ComponentPath "castle/RiscOS/Sources/Networking/Omni/Protocols/LanManFS"
#define Module_FullVersion "2.47"
#define Module_HelpVersion "2.47 (06 Aug 2014)"
#define Module_LibraryVersionInfo "2:47"
#define Module_FullVersion "2.48"
#define Module_HelpVersion "2.48 (14 Mar 2015)"
#define Module_LibraryVersionInfo "2:48"
......@@ -1628,6 +1628,7 @@ static bool ReadData ( int sid, BYTE *where, int len, uint timeout, int flags )
}
}
if ( timeout == 0 ) return true; /* No timeout requested, so none occurs */
if ( NB_GetTime() - tstart > timeout )
{
if ( timeout > 0) debug1("Timeout after %dcs\n", timeout);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment