Changeset 7143 for trunk/src


Ignore:
Timestamp:
Oct 20, 2001, 11:49:01 AM (24 years ago)
Author:
achimha
Message:

fail gracefully if no ASPI there

Location:
trunk/src/wnaspi32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wnaspi32/initwnaspi32.cpp

    r7063 r7143  
    1 /* $Id: initwnaspi32.cpp,v 1.1 2001-10-15 17:06:18 sandervl Exp $
     1/* $Id: initwnaspi32.cpp,v 1.2 2001-10-20 09:49:01 achimha Exp $
    22 *
    33 * DLL entry point
     
    5353       aspi = new scsiObj();
    5454       if(aspi == NULL) {
    55            dprintf(("WNASPI32: LibMain; can't allocate aspi object!"));
    56            return FALSE;
     55           dprintf(("WNASPI32: LibMain; can't allocate aspi object! APIs will not work!"));
     56           // @@@AH 20011020 we shouldn't prevent DLL loading in this case
     57           // just make sure that all API calls fail
     58           return TRUE;
    5759       }
    5860       if(aspi->init(65535) == FALSE)
  • trunk/src/wnaspi32/winaspi32.cpp

    r4801 r7143  
    1 /* $Id: winaspi32.cpp,v 1.12 2000-12-16 15:42:42 sandervl Exp $ */
     1/* $Id: winaspi32.cpp,v 1.13 2001-10-20 09:49:01 achimha Exp $ */
    22/*
    33 * WNASPI routines
     
    328328  bNumDrv = 0;
    329329
     330  // first thing we do is check whether we have a successful ASPI setup
     331  if (aspi == NULL)
     332  {
     333      dprintf(("ASPI was not initialized successfully, return error"));
     334      return (SS_FAILED_INIT << 8);
     335  }
     336
    330337  if(aspi->access(FALSE)) //'non-blocking' call
    331338  {
     
    392399    LONG rc;
    393400
     401    // first thing we do is check whether we have a successful ASPI setup
     402    if (aspi == NULL)
     403    {
     404        dprintf(("SendASPI32Command: ASPI was not initialized successfully, return error"));
     405        return SS_NO_ASPI;
     406    }
     407
    394408    if(NULL==lpSRB)
    395409      return SS_INVALID_SRB;  // Not sure what to return here but that is an error
Note: See TracChangeset for help on using the changeset viewer.