Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

static int krdrBufDestroy ( PKRDR  pRdr  )  [static]

Destroy the file provider instance.

Returns:
0 on success, OS specific error code on failure. On failure, the file provider instance will be in an indeterminate state - don't touch it!
Parameters:
pRdr The file provider instance.

Definition at line 357 of file kRdrBuffered.cpp.

References KRDRBUF::fCloseIt, K_FALSE, NULL, KRDRBUF::pbBuf, KRDROPS::pfnDestroy, KRDR::pOps, and KRDRBUF::pRdr.

{
    PKRDRBUF pThis = (PKRDRBUF)pRdr;

    /* Close the kRdr instance that we're wrapping. */
    if (pThis->fCloseIt)
    {
        int rc = pThis->pRdr->pOps->pfnDestroy(pThis->pRdr);
        if (rc)
            return rc;
        pThis->fCloseIt = K_FALSE;
        pThis->pRdr = NULL;
    }

    kHlpFree(pThis->pbBuf);
    pThis->pbBuf = NULL;
    kHlpFree(pRdr);
    return 0;
}


Generated by  Doxygen 1.6.0   Back to index