• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ CL_LOG_DEBUG_ERROR函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中CL_LOG_DEBUG_ERROR函数的典型用法代码示例。如果您正苦于以下问题:C++ CL_LOG_DEBUG_ERROR函数的具体用法?C++ CL_LOG_DEBUG_ERROR怎么用?C++ CL_LOG_DEBUG_ERROR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了CL_LOG_DEBUG_ERROR函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: clLogCompEntryUnpackNAdd

ClRcT
clLogCompEntryUnpackNAdd(ClBufferHandleT        msg,
                         ClLogStreamOwnerDataT  *pStreamOwnerData)
{
    ClRcT             rc        = CL_OK;
    ClLogCompKeyT     compKey   = {0};
    ClLogCompKeyT     *pCompKey = NULL;
    ClLogSOCompDataT  compData  = {0};
    ClLogSOCompDataT  *pData    = NULL;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = VDECL_VER(clXdrUnmarshallClLogCompKeyT, 4, 0, 0)(msg, &compKey);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("VDECL_VER(clXdrUnmarshallClLogCompKeyT, 4, 0, 0)(): rc[0x %x]", rc));
        return rc;
    }
    rc = VDECL_VER(clXdrUnmarshallClLogSOCompDataT, 4, 0, 0)(msg, &compData);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("VDECL_VER(clXdrUnmarshallClLogSOCompDataT, 4, 0, 0)(): rc[0x %x]", rc));    
        return rc;
    }

    pCompKey = (ClLogCompKeyT*)clHeapCalloc(1, sizeof(ClLogCompKeyT));
    if( NULL == pCompKey )
    {
        CL_LOG_DEBUG_ERROR(( "clHeapCalloc()"));
        return CL_LOG_RC(CL_ERR_NO_MEMORY);
    }    
    *pCompKey = compKey;
    CL_LOG_DEBUG_VERBOSE(("compKey.nodeAddress: %u", compKey.nodeAddr));
    CL_LOG_DEBUG_VERBOSE(("compKey.compId     : %u", compKey.compId));

    pData = (ClLogSOCompDataT*)clHeapCalloc(1, sizeof(ClLogSOCompDataT));
    if( NULL == pData )
    {
        CL_LOG_DEBUG_ERROR(( "clHeapCalloc()"));
        clHeapFree(pCompKey);
        return CL_LOG_RC(CL_ERR_NO_MEMORY);
    }    
    *pData = compData;
    CL_LOG_DEBUG_VERBOSE(("compData.refCount    : %u", pData->refCount));
    CL_LOG_DEBUG_VERBOSE(("compData.ackerCnt    : %u", pData->ackerCnt));
    CL_LOG_DEBUG_VERBOSE(("compData.nonAckerCnt : %u", pData->nonAckerCnt));

    rc = clCntNodeAdd(pStreamOwnerData->hCompTable, 
                      (ClCntKeyHandleT) pCompKey,
                      (ClCntDataHandleT) pData, NULL);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(( "clCntNodeAdd(): rc[0x %x]", rc));
        clHeapFree(pData);
        clHeapFree(pCompKey);
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return CL_OK;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:60,代码来源:clLogStreamOwnerCkpt.c


示例2: clLogSOLocalStateRecover

ClRcT
clLogSOLocalStateRecover(ClHandleT       hLibCkpt, 
                         ClLogSOEoDataT  *pSoEoEntry)
{
    ClRcT                  rc              = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));
    /* internally calls the deserializer, clLogSODsIdMapRecreate() */
    CL_LOG_DEBUG_TRACE(("clLogSODsIdMapRecreate: %s  %d\n",
                gSOLocalCkptName.value, CL_LOG_DSID_START));
    rc = clCkptLibraryCkptDataSetRead(hLibCkpt, 
                                      (SaNameT *) &gSOLocalCkptName,
                                      CL_LOG_DSID_START, 
                                      CL_HANDLE_INVALID_VALUE);
    if( CL_ERR_NOT_EXIST == CL_GET_ERROR_CODE(rc) )
    {
        return CL_OK;
    }    
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptDataSetRead(): rc[0x %x]", rc));
        return rc;
    }    

    rc = clBitmapWalkUnlocked(pSoEoEntry->hDsIdMap, 
                              clLogSOLocalStreamEntryRecover, NULL);
    if( CL_OK != rc )
    {
        /* What do we do, revert back or proceed */
        CL_LOG_DEBUG_ERROR(("clBitmapWalkUnlocked(): rc[0x %x]", rc));
    }    
        
    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:35,代码来源:clLogStreamOwnerCkpt.c


示例3: clLogStreamOwnerEntrySerialiser

ClRcT
clLogStreamOwnerEntrySerialiser(ClUint32T  dsId,
                                ClAddrT    *pBuffer,
                                ClUint32T  *pSize,
                                ClPtrT     cookie)
{
    ClRcT      rc          = CL_OK;
    ClBufferHandleT  msg = (ClBufferHandleT) cookie;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clBufferLengthGet(msg, pSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferLengthGet(): rc[0x %x]", rc));
        return rc;
    }
    *pBuffer = (ClAddrT)clHeapCalloc(*pSize, sizeof(ClUint8T));
    if( NULL == *pBuffer )
    {
        CL_LOG_DEBUG_ERROR(("clHeapCalloc()"));
        return rc;
    }    
    rc = clBufferNBytesRead(msg, (ClUint8T *) *pBuffer, pSize); 
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferNBytesRead(): rc[0x %x]", rc));
        clHeapFree(*pBuffer);
        return rc;
    }
        
    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}    
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:34,代码来源:clLogStreamOwnerCkpt.c


示例4: clLogBitmapPack

ClRcT
clLogBitmapPack(ClBitmapHandleT  hBitmap,
                ClBufferHandleT  msg)
{
    ClRcT                   rc        = CL_OK;
    ClUint32T  nBytes   = 0;
    ClUint8T   *pBitMap = NULL;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clBitmap2BufferGet(hBitmap, &nBytes, &pBitMap);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBitmap2PositionListGet(): rc[0x %x]", rc));
        return rc;
    }    
    rc = clXdrMarshallClUint32T(&nBytes, msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));
        clHeapFree(pBitMap);
        return rc;
    }
    rc = clXdrMarshallArrayClUint8T(pBitMap, nBytes, msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallArrayClUint8T(): rc[0x %x]", rc));
    }
    clHeapFree(pBitMap);
    
    CL_LOG_DEBUG_TRACE(("Exit"));
        return rc;
    }    
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:33,代码来源:clLogStreamOwnerCkpt.c


示例5: clLogClntStreamDataCleanup

ClRcT
clLogClntStreamDataCleanup(ClLogClntStreamDataT *pData)
{
    ClRcT  rc = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));


    rc = clBitmapDestroy(pData->hStreamBitmap);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBitmapDestroy(): rc[0x %x]", rc));
    }

#ifdef VXWORKS_BUILD
    clLogClientStreamMutexDestroy(pData);
    clLogClientStreamFlusherMutexDestroy(pData);
#endif

    rc = clOsalMunmap_L(pData->pStreamHeader, pData->pStreamHeader->shmSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clOsalMunmap(): rc[0x %x]", rc));
    }

    clHeapFree(pData->shmName.pValue);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:joaohf,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:30,代码来源:clLogClientStream.c


示例6: clLogStreamOwnerLocalCkptCreate

ClRcT
clLogStreamOwnerLocalCkptCreate(ClCkptSvcHdlT   hLibInit) 
{    
    ClRcT    rc       = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clCkptLibraryCkptCreate(hLibInit, (SaNameT *) &gSOLocalCkptName);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCreate(): rc[0x %x]", rc));
        return rc;
    }    

    rc = clCkptLibraryCkptDataSetCreate(hLibInit, 
                                        (SaNameT *) &gSOLocalCkptName, 
                                        CL_LOG_DSID_START, 0, 0,
                                        clLogSODsIdMapPack,
                                        clLogSODsIdMapRecreate);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptDataSetCreate(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clCkptLibraryCkptDelete(hLibInit, 
                                               (SaNameT *) &gSOLocalCkptName),
                       CL_OK);
    }    
        
    CL_LOG_DEBUG_TRACE(("Checkpoint is created: %s  %d \n",
                gSOLocalCkptName.value, CL_LOG_DSID_START));
    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}    
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:32,代码来源:clLogStreamOwnerCkpt.c


示例7: clLogSvrCkptCreate

static ClRcT
clLogSvrCkptCreate(ClLogSvrEoDataT        *pSvrEoEntry,
                   ClLogSvrCommonEoDataT  *pSvrCommonEoEntry)
{
    ClRcT  rc = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clCkptLibraryCkptCreate(pSvrCommonEoEntry->hLibCkpt,
                                 (SaNameT *) &gSvrLocalCkptName);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptCreate(): rc[0x %x]", rc));
        return rc;
    }

    rc = clCkptLibraryCkptDataSetCreate(pSvrCommonEoEntry->hLibCkpt,
                                        (SaNameT *) &gSvrLocalCkptName,
                                        CL_LOG_DSID_START, 0, 0,
                                        clLogSvrDsIdMapPack,
                                        clLogSvrDsIdMapRecreate);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptDelete(): rc[0x %x]", rc));
        clCkptLibraryCkptDelete(pSvrCommonEoEntry->hLibCkpt,
                                (SaNameT *) &gSvrLocalCkptName);
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:31,代码来源:clLogSvrCkpt.c


示例8: clLogStreamOwnerDataDump

void
clLogStreamOwnerDataDump(ClCharT **retval)
{
    ClRcT                  rc              = CL_OK;
    ClDebugPrintHandleT    msg             = 0;
    ClLogSOEoDataT         *pSoEoEntry     = NULL;
    ClLogSvrCommonEoDataT  *pCommonEoEntry = NULL;

    CL_LOG_DEBUG_TRACE(("Enter"));
    
    clDebugPrintInitialize(&msg);

    rc = clLogStreamOwnerEoEntryGet(&pSoEoEntry, &pCommonEoEntry);
    if( CL_OK != rc )
    {
        return ;
    }    
    rc = clLogSOLock(pSoEoEntry, CL_LOG_STREAM_GLOBAL);
    if( CL_OK != rc )
    {
        return ;
    }
    clLogStreamOwnerEoDataPrint(pSoEoEntry, &msg);

    if( CL_HANDLE_INVALID_VALUE != pSoEoEntry->hGStreamOwnerTable )
    {
        rc = clCntWalk(pSoEoEntry->hGStreamOwnerTable, clLogSOTableWalkForPrint, 
                &msg, 0);
        if( CL_OK != rc )
        {
            CL_LOG_DEBUG_ERROR(("clCntWalk(): rc[0x %x]", rc));
            CL_LOG_CLEANUP(clLogSOUnlock(pSoEoEntry, CL_LOG_STREAM_GLOBAL), CL_OK);
            return ;
        }
    }
    CL_LOG_CLEANUP(clLogSOUnlock(pSoEoEntry, CL_LOG_STREAM_GLOBAL), CL_OK);

    rc = clLogSOLock(pSoEoEntry, CL_LOG_STREAM_LOCAL);
    if( CL_OK != rc )
    {
        return ;
    }
    if( CL_HANDLE_INVALID_VALUE != pSoEoEntry->hLStreamOwnerTable )
    {
        rc = clCntWalk(pSoEoEntry->hLStreamOwnerTable, clLogSOTableWalkForPrint, 
                &msg, 0);
        if( CL_OK != rc )
        {
            CL_LOG_DEBUG_ERROR(("clCntWalk(): rc[0x %x]", rc));
            CL_LOG_CLEANUP(clLogSOUnlock(pSoEoEntry, CL_LOG_STREAM_LOCAL), CL_OK);
            return ;
        }
    }
    CL_LOG_CLEANUP(clLogSOUnlock(pSoEoEntry, CL_LOG_STREAM_LOCAL), CL_OK);

    clDebugPrintFinalize(&msg, retval);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return ;
}
开发者ID:joaohf,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:60,代码来源:clLogServerDump.c


示例9: clLogCompTablePack

ClRcT
clLogCompTablePack(ClCntKeyHandleT   key,
                   ClCntDataHandleT  data,
                   ClCntArgHandleT   arg,
                   ClUint32T         size)
{
    ClRcT             rc        = CL_OK;
    ClLogCompKeyT     *pCompKey = (ClLogCompKeyT *) key;
    ClLogSOCompDataT  *pData    = (ClLogSOCompDataT *) data;
    ClBufferHandleT   msg       = (ClBufferHandleT) arg;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = VDECL_VER(clXdrMarshallClLogCompKeyT, 4, 0, 0)(pCompKey, msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));
        return rc;
    }    
    rc = VDECL_VER(clXdrMarshallClLogSOCompDataT, 4, 0, 0)(pData, msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));    
        return rc;
    }    

    CL_LOG_DEBUG_TRACE(("Exit"));
    return CL_OK;
}    
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:29,代码来源:clLogStreamOwnerCkpt.c


示例10: clLogMasterFileKeyPack

static ClRcT
clLogMasterFileKeyPack(ClLogFileKeyT    *pFileKey,
                       ClBufferHandleT  hFileEntryBuf)
{
    ClRcT rc = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clXdrMarshallClStringT(&pFileKey->fileLocation, hFileEntryBuf, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClStringT(): rc[0x %x]", rc));
        return rc;
    }

    rc = clXdrMarshallClStringT(&pFileKey->fileName, hFileEntryBuf, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClStringT(): rc[0x %x]", rc));
        return rc;
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:25,代码来源:clLogMasterCkpt.c


示例11: fileEntryRecoverBaseVersion

static ClRcT fileEntryRecoverBaseVersion(ClLogMasterEoDataT *pMasterEoEntry,
        ClBufferHandleT hFileEntryBuf)
{
    ClRcT rc = CL_OK;
    ClLogFileKeyT        fileKey       = {{0}};
    ClLogFileKeyT        *pFileKey     = NULL;
    ClLogFileDataT       *pFileData    = NULL;

    rc = clLogMasterFileKeyUnpack(&fileKey, hFileEntryBuf);
    if( CL_OK != rc )
    {
        return rc;
    }
    clLogInfo(CL_LOG_AREA_MASTER, CL_LOG_CTX_CKPT_READ,
              "Recreating files fileName: %.*s fileLocation: %.*s",
              fileKey.fileName.length, fileKey.fileName.pValue,
              fileKey.fileLocation.length, fileKey.fileLocation.pValue);

    rc = clLogFileKeyCreate(&fileKey.fileName, &fileKey.fileLocation,
                            pMasterEoEntry->maxFiles, &pFileKey);
    if( CL_OK != rc )
    {
        clHeapFree(fileKey.fileName.pValue);
        clHeapFree(fileKey.fileLocation.pValue);
        return rc;
    }
    clHeapFree(fileKey.fileName.pValue);
    clHeapFree(fileKey.fileLocation.pValue);

    /* find out the filelocation is available */
    pFileData = (ClLogFileDataT*) clHeapCalloc(1, sizeof(ClLogFileDataT));
    if( NULL == pFileData )
    {
        CL_LOG_DEBUG_ERROR(("clHeapCalloc()"));
        clLogFileKeyDestroy(pFileKey);
        return rc;
    }

    pFileData->nActiveStreams = 0;
    rc = clLogMasterFileDataRecreate(pFileData, hFileEntryBuf);
    if( CL_OK != rc )
    {
        clLogFileKeyDestroy(pFileKey);
        return rc;
    }

    rc = clCntNodeAdd(pMasterEoEntry->hMasterFileTable,
                      (ClCntKeyHandleT) pFileKey,
                      (ClCntDataHandleT) pFileData, NULL);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCntNodeAdd()"));
        CL_LOG_CLEANUP(clCntDelete(pFileData->hStreamTable), CL_OK); //FIXME
        clHeapFree(pFileData);
        clLogFileKeyDestroy(pFileKey);
        return rc;
    }

    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:60,代码来源:clLogMasterCkpt.c


示例12: clLogSvrCompTablePack

static ClRcT
clLogSvrCompTablePack(ClCntKeyHandleT   key,
                      ClCntDataHandleT  data,
                      ClCntArgHandleT   arg,
                      ClUint32T         size)
{
    ClRcT               rc          = CL_OK;
    ClLogSvrCompKeyT    *pCompKey   = (ClLogSvrCompKeyT *)key;
    ClLogSvrCompDataT   *pCompData  = (ClLogSvrCompDataT *)data;
    ClBufferHandleT     msg         = *(ClBufferHandleT *)arg;

    CL_LOG_DEBUG_TRACE(("Enter"));
    rc = clXdrMarshallClUint32T(&(pCompKey->componentId), msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));
        return rc;
    }
    rc = clXdrMarshallClUint32T(&(pCompData->refCount), msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));
        return rc;
    }
    rc = clXdrMarshallClUint32T(&(pCompData->portId), msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrMarshallClUint32T(): rc[0x %x]", rc));
        return rc;
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return CL_OK;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:34,代码来源:clLogSvrCkpt.c


示例13: clLogSvrSOFGResponseProcess

static ClRcT
clLogSvrSOFGResponseProcess(ClLogFilterT  *pStreamFilter,
                            ClPtrT        pCookie)
{
    ClRcT                  rc                 = CL_OK;
    ClLogSvrEoDataT        *pSvrEoEntry       = NULL;
    ClCntNodeHandleT       hStreamOwnerNode   = (ClCntNodeHandleT) pCookie;
    ClLogSvrStreamDataT    *pStreamData       = NULL;
    ClLogSvrCommonEoDataT  *pSvrCommonEoEntry = NULL;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clLogSvrEoEntryGet(&pSvrEoEntry, &pSvrCommonEoEntry);
    if( CL_OK != rc )
    {
        return rc;
    }

    rc = clOsalMutexLock_L(&pSvrEoEntry->svrStreamTableLock);
    if( CL_OK != rc )
    {
        return rc;
    }

    rc = clCntNodeUserDataGet(pSvrEoEntry->hSvrStreamTable, hStreamOwnerNode,
                              (ClCntDataHandleT *) &pStreamData);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCntNodeUserDataGet(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clOsalMutexUnlock_L(&pSvrEoEntry->svrStreamTableLock), CL_OK);
        return rc;
    }

    rc = clLogServerStreamMutexLock(pStreamData);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clOsalMutexLock(): rc[0x %x]\n", rc));
        CL_LOG_CLEANUP(clOsalMutexUnlock_L(&pSvrEoEntry->svrStreamTableLock), CL_OK);
        return rc;
    }
    CL_LOG_CLEANUP(clOsalMutexUnlock_L(&pSvrEoEntry->svrStreamTableLock), CL_OK);

    /*
     * Log Server will not intimate the client about this filter update,
     * as it is recreating the state for itself and filter may or may
     * not have been updated during that transient period.
     */
    rc = clLogFilterAssign(pStreamData->pStreamHeader, pStreamFilter);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clLogFilterAssign(): rc[0x %x]\n", rc));
    }

    CL_LOG_CLEANUP(clLogServerStreamMutexUnlock(pStreamData),CL_OK);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:58,代码来源:clLogSvrCkpt.c


示例14: clLogMasterFileDataRecreate

static ClRcT
clLogMasterFileDataRecreate(ClLogFileDataT   *pFileData,
                            ClBufferHandleT  hFileEntryBuf)
{
    ClRcT                  rc              = CL_OK;
    ClUint32T              cntSize         = 0;
    ClLogSvrCommonEoDataT  *pCommonEoEntry = NULL;
    ClUint32T              count           = 0;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clLogMasterEoEntryGet(NULL, &pCommonEoEntry);
    if( CL_OK != rc )
    {
        return rc;
    }

    rc = VDECL_VER(clXdrUnmarshallClLogStreamAttrIDLT, 4, 0, 0)(hFileEntryBuf,
            &(pFileData->streamAttr));
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR((
                               "clXdrUnmarshallClLogStreamAttributesT(): rc[0x %x]", rc));
        return rc;
    }

    rc = clXdrUnmarshallClUint32T(hFileEntryBuf, &cntSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrUnmarshallClUint32T(): rc[0x %x]", rc));
        return rc;
    }

    rc = clCntHashtblCreate(pCommonEoEntry->maxStreams,
                            clLogStreamKeyCompare, clLogStreamHashFn,
                            clLogMasterStreamEntryDeleteCb,
                            clLogMasterStreamEntryDeleteCb, CL_CNT_UNIQUE_KEY,
                            &(pFileData->hStreamTable));
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCntHashtbleCreate(): rc[0x %x]\n", rc));
        return rc;
    }

    for(count = 0; count < cntSize; count++)
    {
        rc = clLogMasterStreamTableRecreate(pCommonEoEntry, hFileEntryBuf,
                                            pFileData);
        if( CL_OK != rc )
        {
            /* Just keep on create as much as u can */
        }
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:57,代码来源:clLogMasterCkpt.c


示例15: clLogSvrDsIdMapRecreate

static ClRcT
clLogSvrDsIdMapRecreate(ClUint32T  dsId,
                        ClAddrT    pBuffer,
                        ClUint32T  buffSize,
                        ClPtrT     pCookie)
{
    ClRcT            rc           = CL_OK;
    ClLogSvrEoDataT  *pSvrEoEntry = NULL;
    ClBufferHandleT  inMsg        = CL_HANDLE_INVALID_VALUE;

    CL_LOG_DEBUG_TRACE(("Enter"));

    CL_LOG_PARAM_CHK((NULL == pBuffer), CL_LOG_RC(CL_ERR_NULL_POINTER));
    CL_LOG_PARAM_CHK((CL_LOG_DSID_START != dsId),
                     CL_LOG_RC(CL_ERR_INVALID_PARAMETER));

    rc = clLogSvrEoEntryGet(&pSvrEoEntry, NULL);
    if( CL_OK != rc )
    {
        return rc;
    }

    rc = clBufferCreate(&inMsg);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferCreate(): rc[0x %x]", rc));
        return rc;
    }
    rc = clBufferNBytesWrite(inMsg, (ClUint8T *) pBuffer, buffSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferNBytesWrite(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&inMsg), CL_OK);
        return rc;
    }

    rc = clXdrUnmarshallClUint32T(inMsg, &pSvrEoEntry->nextDsId);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrUnmarshallClUint32T(): rc[0x %x]\n", rc));
        CL_LOG_CLEANUP(clBufferDelete(&inMsg), CL_OK);
        return rc;
    }
    CL_LOG_DEBUG_VERBOSE(("DsIdCnt: %d", pSvrEoEntry->nextDsId));

    rc = clLogBitmapUnpack(inMsg, pSvrEoEntry->hDsIdMap);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clLogBitmapUnpack(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&inMsg), CL_OK);
        return rc;
    }
    CL_LOG_CLEANUP(clBufferDelete(&inMsg), CL_OK);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:57,代码来源:clLogSvrCkpt.c


示例16: clLogSvrEoDataInit

ClRcT
clLogSvrEoDataInit(ClLogSvrEoDataT        *pSvrEoEntry,
                   ClLogSvrCommonEoDataT  *pSvrCommonEoEntry)
{
    ClRcT               rc = CL_OK;

    CL_LOG_DEBUG_TRACE(("Enter"));

    pSvrEoEntry->hSvrStreamTable = CL_HANDLE_INVALID_VALUE;
    pSvrEoEntry->nextDsId        = CL_LOG_DSID_START;

    rc = clOsalMutexInit_L(&pSvrEoEntry->svrStreamTableLock);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clOsalMutexCreate(): rc[0x %x]", rc));
        return rc;
    }

    rc = clBitmapCreate(&pSvrEoEntry->hDsIdMap, pSvrCommonEoEntry->maxStreams);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBitmapCreate(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clOsalMutexDestroy_L(&pSvrEoEntry->svrStreamTableLock),
                       CL_OK);
        return rc;
    }
    rc = clHandleDatabaseCreate(NULL, &pSvrEoEntry->hFlusherDB); 
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clHandleDatabaseCreate(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBitmapDestroy(pSvrEoEntry->hDsIdMap), CL_OK);
        CL_LOG_CLEANUP(clOsalMutexDestroy_L(&pSvrEoEntry->svrStreamTableLock),
                       CL_OK);
        return rc;
    }

    rc = clLogConfigDataGet(NULL, NULL, NULL, &pSvrEoEntry->maxFlushLimit);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clLogConfigDataGet(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clHandleDatabaseDestroy(pSvrEoEntry->hFlusherDB), CL_OK);
        CL_LOG_CLEANUP(clBitmapDestroy(pSvrEoEntry->hDsIdMap), CL_OK);
        CL_LOG_CLEANUP(clOsalMutexDestroy_L(&pSvrEoEntry->svrStreamTableLock),
                       CL_OK);
        return rc;
    }
    pSvrEoEntry->hCpm           = CL_HANDLE_INVALID_VALUE;    
    pSvrEoEntry->logCompId      = 0;
    pSvrEoEntry->gmsInit        = CL_FALSE; 
    pSvrEoEntry->evtInit        = CL_FALSE; 
    pSvrEoEntry->ckptInit       = CL_FALSE; 
    pSvrEoEntry->logInit        = CL_FALSE;
    pSvrEoEntry->hTimer         = CL_FALSE;

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:NguyenHoangOC,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:57,代码来源:clLogSvrEo.c


示例17: clLogSvrStreamEntryRecover

static ClRcT
clLogSvrStreamEntryRecover(ClBitmapHandleT  hBitmap,
                           ClUint32T        dsId,
                           void             *pCookie)
{
    ClRcT                  rc                 = CL_OK;
    ClLogSvrEoDataT        *pSvrEoEntry       = NULL;
    ClLogSvrCommonEoDataT  *pSvrCommonEoEntry = NULL;
    ClBoolT dataSetExists = CL_TRUE;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clLogSvrEoEntryGet(&pSvrEoEntry, &pSvrCommonEoEntry);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clLogSvrEoEntryGet(): rc[0x %x]", rc));
        return rc;
    }

    rc = clCkptLibraryDoesDatasetExist(pSvrCommonEoEntry->hLibCkpt,
                                       (SaNameT *)&gSvrLocalCkptName,
                                       dsId, &dataSetExists);

    if(rc != CL_OK || !dataSetExists)
    {
        CL_LOG_DEBUG_ERROR(("Dataset [%u] doesnt exist. Continuing", dsId));
        return CL_OK;
    }

    rc = clCkptLibraryCkptDataSetCreate(pSvrCommonEoEntry->hLibCkpt,
                                        (SaNameT *) &gSvrLocalCkptName,
                                        dsId, 0, 0,
                                        clLogSvrStreamEntryPack,
                                        clLogSvrStreamEntryRecreate);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptDataSetCreate(): rc[0x %x]",
                            rc));
        return rc;
    }

    /* this will internaly call deserializer, clLogSvrStreamEntryRecreate() */
    rc = clCkptLibraryCkptDataSetRead(pSvrCommonEoEntry->hLibCkpt,
                                      (SaNameT *) &gSvrLocalCkptName, dsId,
                                      CL_HANDLE_INVALID_VALUE);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clCkptLibraryCkptDataSetRead(): rc[0x %x]", rc));
        CL_LOG_DEBUG_ERROR(("Unable to recover data from this dsId: %u. "
                            "Continuing", dsId));
        return CL_OK;
    }

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:56,代码来源:clLogSvrCkpt.c


示例18: clLogMasterCompData2BufferGet

ClRcT
clLogMasterCompData2BufferGet(ClLogCompDataT  *pCompData,
                              ClUint8T        **ppBuffer,
                              ClUint32T       *pDataSize)
{
    ClRcT            rc  = CL_OK;
    ClBufferHandleT  msg = CL_HANDLE_INVALID_VALUE;

    CL_LOG_DEBUG_TRACE(("Enter"));

    rc = clBufferCreate(&msg);
    if(CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferCreate(): rc[0x %x]", rc));
        return rc;
    }

    rc = VDECL_VER(clXdrMarshallClLogCompDataT, 4, 0, 0)(pCompData, msg, 0);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clLogMarshallClLogCompDataT(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return rc;
    }

    rc = clBufferLengthGet(msg, pDataSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferLengthGet(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return rc;
    }

    *ppBuffer = (ClUint8T*) clHeapCalloc(*pDataSize, sizeof(ClUint8T));
    if( NULL == *ppBuffer )
    {
        CL_LOG_DEBUG_ERROR(("clHeapCalloc()"));
        CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return CL_LOG_RC(CL_ERR_NO_MEMORY);
    }

    rc = clBufferNBytesRead(msg, *ppBuffer, pDataSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferNBytesRead(): rc[0x %x]", rc));
        clHeapFree(*ppBuffer);
        CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return rc;
    }
    CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return CL_OK;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:54,代码来源:clLogMasterCkpt.c


示例19: clLogMasterFileEntryRecover

static ClRcT
clLogMasterFileEntryRecover(ClLogMasterEoDataT      *pMasterEoEntry,
                            ClCkptIOVectorElementT  *pIoVector,
                            ClUint32T               *pErrIndex)
{
    ClRcT                rc            = CL_OK;
    ClBufferHandleT      hFileEntryBuf = CL_HANDLE_INVALID_VALUE;
    ClVersionT version = {0};

    CL_LOG_DEBUG_TRACE(("Enter: size %lld", pIoVector->readSize));

    rc = clBufferCreate(&hFileEntryBuf);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferCreate(): rc[0x %x]", rc));
        return rc;
    }

    rc = clBufferNBytesWrite(hFileEntryBuf, (ClUint8T*) pIoVector->dataBuffer, pIoVector->readSize);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferNBytesWrite(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&hFileEntryBuf), CL_OK);
        return rc;
    }

    rc = clXdrUnmarshallClVersionT(hFileEntryBuf, &version);

    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clXdrUnmarshallClVersionT(): rc[%#x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&hFileEntryBuf), CL_OK);
        return rc;
    }

    switch(CL_VERSION_CODE(version.releaseCode, version.majorVersion, version.minorVersion))
    {
    case CL_VERSION_CODE(CL_RELEASE_VERSION, CL_MAJOR_VERSION, CL_MINOR_VERSION):
    {
        rc = fileEntryRecoverBaseVersion(pMasterEoEntry, hFileEntryBuf);
    }
    break;
    default:
        rc = CL_LOG_RC(CL_ERR_VERSION_MISMATCH);
        clLogError("FILE", "RECOVER", "Version [%d.%d.%d] unsupported",
                   version.releaseCode, version.majorVersion, version.minorVersion);
        break;
    }

    CL_LOG_CLEANUP(clBufferDelete(&hFileEntryBuf), CL_OK);

    CL_LOG_DEBUG_TRACE(("Exit"));
    return rc;
}
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:54,代码来源:clLogMasterCkpt.c


示例20: clLogSODsIdMapRecreate

ClRcT
clLogSODsIdMapRecreate(ClUint32T  dsId,
                       ClAddrT    pBuffer,
                       ClUint32T  size,
                           ClPtrT      cookie)
{
    ClRcT                   rc        = CL_OK;
    ClBufferHandleT        msg            = CL_HANDLE_INVALID_VALUE;
    ClLogSOEoDataT         *pSoEoEntry    = NULL; 
    ClLogSvrCommonEoDataT  *pCommonEoData = NULL;

    CL_LOG_DEBUG_TRACE(("Enter"));

    CL_LOG_PARAM_CHK((CL_LOG_SO_DSID_START != dsId),
                     CL_LOG_RC(CL_ERR_INVALID_PARAMETER));
    CL_LOG_PARAM_CHK((NULL == pBuffer), CL_LOG_RC(CL_ERR_NULL_POINTER));

    rc = clLogStreamOwnerEoEntryGet(&pSoEoEntry, &pCommonEoData);
    if( CL_OK != rc )
    {
        return rc;
    }    

    rc = clBufferCreate(&msg);
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferCreate(): rc[0x %x]", rc));
        return rc;
    }
    rc = clBufferNBytesWrite(msg, (ClUint8T *) pBuffer, size); 
    if( CL_OK != rc )
    {
        CL_LOG_DEBUG_ERROR(("clBufferNBytesRead(): rc[0x %x]", rc));
        CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return rc;
    }

    rc = clXdrUnmarshallClUint32T(msg, &pSoEoEntry->dsIdCnt);
    if( CL_OK != rc )
    {
       CL_LOG_DEBUG_ERROR(("clXdrUnmarshallClUint32T(): rc[0x %x]", rc));
       CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);
        return rc;
    }    
    CL_LOG_DEBUG_VERBOSE(("dsIdCnt : %d", pSoEoEntry->dsIdCnt));

    rc = clLogBitmapUnpack(msg, pSoEoEntry->hDsIdMap);

    CL_LOG_CLEANUP(clBufferDelete(&msg), CL_OK);

    CL_LOG_DEBUG_TRACE(("Exit: rc[0x %x]", rc));
    return rc;
}    
开发者ID:mrv-communications-pilot,项目名称:SAFplus-Availability-Scalability-Platform,代码行数:53,代码来源:clLogStreamOwnerCkpt.c



注:本文中的CL_LOG_DEBUG_ERROR函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ CL_Rect函数代码示例发布时间:2022-05-30
下一篇:
C++ CL_KeyState函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap