VirtualBox

Ignore:
Timestamp:
Jan 14, 2009 6:25:22 PM (16 years ago)
Author:
vboxsync
Message:

VBoxNetFlt.c: Use AssertFailed not Assert(0), return VERR_INTNET_FLT_IF_BUSY from vboxNetFltFactoryCreateAndConnect if the instance exists (regression from VBOXNETFLT_STATIC_CONFIG changes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFlt.c

    r15917 r15950  
    10391039    {
    10401040#ifdef VBOXNETFLT_STATIC_CONFIG
    1041         switch(vboxNetFltGetState(pCur))
     1041        switch (vboxNetFltGetState(pCur))
    10421042        {
    1043         case kVBoxNetFltInsState_Unconnected:
    1044             /* instance can be destroyed when it is neither used by the IntNet nor by the ndis filter driver mechanism
    1045              * (i.e. the driver is not bound to the specified adapter)*/
    1046             vboxNetFltRetain(pCur, false /* fBusy */);
    1047             rc = vboxNetFltConnectIt(pCur, pSwitchPort, ppIfPort);
    1048             break;
    1049         case kVBoxNetFltInsState_Connected:
    1050             Assert(0);
    1051             rc = VERR_INTNET_FLT_IF_BUSY;
    1052             break;
    1053         case kVBoxNetFltInsState_Disconnecting:
    1054             Assert(0);
    1055             rc = VERR_INTNET_FLT_IF_BUSY;
    1056             break;
    1057         default:
    1058             /** @todo: */
    1059             rc = VERR_INTNET_FLT_IF_BUSY;
     1043            case kVBoxNetFltInsState_Unconnected:
     1044                /* instance can be destroyed when it is neither used by the IntNet nor by the ndis filter driver mechanism
     1045                 * (i.e. the driver is not bound to the specified adapter)*/
     1046                vboxNetFltRetain(pCur, false /* fBusy */); /** @todo who releases this on failure? */
     1047                rc = vboxNetFltConnectIt(pCur, pSwitchPort, ppIfPort);
     1048                break;
     1049            case kVBoxNetFltInsState_Connected:
     1050                AssertFailed();
     1051                rc = VERR_INTNET_FLT_IF_BUSY;
     1052                break;
     1053            case kVBoxNetFltInsState_Disconnecting:
     1054                AssertFailed();
     1055                rc = VERR_INTNET_FLT_IF_BUSY;
     1056                break;
     1057            default:
     1058                /** @todo what? */
     1059                rc = VERR_INTNET_FLT_IF_BUSY;
     1060                break;
    10601061        }
     1062#else
     1063        rc = VERR_INTNET_FLT_IF_BUSY;
    10611064#endif
    10621065        RTSemFastMutexRelease(pGlobals->hFastMtx);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette