VirtualBox

Ignore:
Timestamp:
Feb 24, 2009 8:08:20 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43326
Message:

#2957: VBoxNetAdp: Fixes in generic and darwin parts. No traffic yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp

    r16976 r17095  
    4040#include <iprt/semaphore.h>
    4141#include <iprt/spinlock.h>
     42#include <iprt/string.h>
    4243#include <iprt/uuid.h>
    4344
     
    120121DECLINLINE(ifnet_t) vboxNetAdpDarwinRetainIfNet(PVBOXNETADP pThis)
    121122{
    122     RTSPINLOCKTMP Tmp = RTSPINLOCKTMP_INITIALIZER;
    123123    ifnet_t pIfNet = NULL;
    124124
    125     RTSpinlockAcquire(pThis->hSpinlock, &Tmp);
    126     if (pThis->enmState >= kVBoxNetAdpState_Connected)
    127         ifnet_reference(pThis->u.s.pIface);
    128     RTSpinlockRelease(pThis->hSpinlock, &Tmp);
     125    ifnet_reference(pThis->u.s.pIface);
    129126
    130127    return pIfNet;
     
    599596    memcpy(LLADDR(&mac), pMACAddress->au8, mac.sdl_alen);
    600597
     598    RTStrPrintf(pThis->szName, VBOXNETADP_MAX_NAME_LEN, "%s%d", VBOXNETADP_NAME, pThis->uUnit);
    601599    vboxNetAdpDarwinComposeUUID(pThis, &uuid);
    602600    Params.uniqueid = uuid.au8;
     
    682680}
    683681
     682int  vboxNetAdpOsInit(PVBOXNETADP pThis)
     683{
     684    /*
     685     * Init the darwin specific members.
     686     */
     687    pThis->u.s.pIface = NULL;
     688    pThis->u.s.hEvtDetached = NIL_RTSEMEVENT;
     689    memset(pThis->u.s.aAttachedFamilies, 0, sizeof(pThis->u.s.aAttachedFamilies));
     690
     691    return VINF_SUCCESS;
     692}
     693
    684694/**
    685695 * Start the kernel module.
Note: See TracChangeset for help on using the changeset viewer.

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