Paste Search Dynamic
Recent pastes
userdb.cxx
  1. if( dwError != NO_ERROR &&
  2.         dwError != ERROR_SEM_TIMEOUT )
  3.     {
  4.  
  5.         //
  6.         // Geezsh, I hate my life.
  7.         //
  8.         // Once upon a time, there was a bug in ATQ that cause it to
  9.         // always pass NO_ERROR as the status to the async completion
  10.         // routine. This bug caused, among other things, FTP to never
  11.         // time out idle connections, because it never saw the
  12.         // ERROR_SEM_TIMEOUT status. So, I fixed the bug in ATQ.
  13.         //
  14.         // Now, this completion routine gets the actual status. Well,
  15.         // that breaks service shutdown when there are connected users.
  16.         // Basically, when a shutdown occurs, the connected sockets are
  17.         // closed, causing the IO to complete with ERROR_NETNAME_DELETED.
  18.         // USER_DATA::ProcessAsyncIoCompletion() is not handling this
  19.         // error properly, which causes 1) an assertion failure because
  20.         // USER_DATA::DisconnectUserWithError() is getting called *twice*
  21.         // and 2) the service never stops because of a dangling reference
  22.         // on the USER_DATA structure.
  23.         //
  24.         // Of course, the proper thing to do would be to fix the offending
  25.         // code in USER_DATA::ProcessAsyncIoCompletion() so that it DID
  26.         // handle the error properly. Unfortunately, that fix requires a
  27.         // nontrivial amount of surgery, and we're a scant three days
  28.         // from releasing K2 Beta 1. So...
  29.         //
  30.         // As a quick & dirty work around for K2 Beta 1, we'll map all
  31.         // errors other than ERROR_SEM_TIMEOUT to NO_ERROR. This should
  32.         // provide the lower software layers with the old ATQ behavior
  33.         // they're expecting.
  34.         //
  35.         // REMOVE THIS POST BETA 1 AND FIX USER_DATA PROPERLY!!!!
  36.         //
  37.         // 3/12/98
  38.         //
  39.         // N.B. The debug output below has been changed to be a little
  40.         // more customer friendly but I hate to prevent future developers
  41.         // for enjoying the original message which read:
  42.         // "Mapping error %d to NO_ERROR to mask FTP bug (FIX!)\n"
  43.         //
  44.         // I'm removing this message because it was the source of some
  45.         // embarrasment, when a checked version of this DLL was sent to
  46.         // Ernst & Young to track the now famous bug #138566.
  47.         //
Parsed in 0.005 seconds