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

C++ BAIL_ON_VMDNS_ERROR函数代码示例

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

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



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

示例1: VmDnsCacheGetZoneName

DWORD
VmDnsCacheGetZoneName(
    PVMDNS_ZONE_OBJECT  pZoneObject,
    PSTR                *ppszZoneName
    )
{
    DWORD dwError = 0;
    PSTR pszZoneName = NULL;

    if (!pZoneObject)
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwError = VmDnsZoneGetName(pZoneObject, &pszZoneName);
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppszZoneName = pszZoneName;

cleanup:
    return dwError;

error:
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:26,代码来源:cache.c


示例2: VmDnsAllocateCondition

DWORD
VmDnsAllocateCondition(
    PVMDNS_COND* ppCondition
)
{
    DWORD dwError = ERROR_SUCCESS;
    PVMDNS_COND pVmDnsCond = NULL;

    if ( ppCondition == NULL )
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwError = VmDnsAllocateMemory( sizeof(VMDNS_COND), ((PVOID*)&pVmDnsCond));
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsInitializeConditionContent( pVmDnsCond );
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppCondition = pVmDnsCond;
    pVmDnsCond = NULL;

error:

    VMDNS_SAFE_FREE_CONDITION( pVmDnsCond );

    return dwError;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:29,代码来源:threading.c


示例3: VmDnsGetLockKey

static
int*
VmDnsGetLockKey(
    pthread_key_t*  pLockKey
)
{
    DWORD dwError = ERROR_SUCCESS;
    int* pCounter = NULL;

    int* pCount = (int*)pthread_getspecific(*pLockKey);
    if (!pCount)
    {
        dwError = VmDnsAllocateMemory(sizeof(int), (void**)&(pCounter));
        BAIL_ON_VMDNS_ERROR(dwError);

        dwError = pthread_setspecific(*pLockKey, pCounter);
        dwError = POSIX_TO_WIN32_ERROR(dwError);
        BAIL_ON_VMDNS_ERROR(dwError);
        pCounter = NULL;

        pCount = (int*)pthread_getspecific(*pLockKey);
    }

cleanup:
    return pCount;

error:
    VMDNS_SAFE_FREE_MEMORY(pCounter);
    goto cleanup;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:30,代码来源:threading.c


示例4: VmDnsRpcCopySrvRecord

DWORD VmDnsRpcCopySrvRecord(
    PVMDNS_RECORD   pSrc,
    PVMDNS_RECORD   pDest
    )
{
    DWORD dwError = 0;
    PVMDNS_SRV_DATAA pData = NULL;

    pData = &pDest->Data.SRV;

    VmDnsRpcAllocateStringA(pSrc->pszName, &pDest->pszName);
    BAIL_ON_VMDNS_ERROR(dwError);

    pDest->iClass = pSrc->iClass;
    pDest->dwTtl = pSrc->dwTtl;
    pDest->dwType = pSrc->dwType;
    pData->wPort = pSrc->Data.SRV.wPort;
    pData->wPriority = pSrc->Data.SRV.wPriority;
    pData->wWeight = pSrc->Data.SRV.wWeight;

    VmDnsRpcAllocateStringA(pSrc->Data.SRV.pNameTarget, &pData->pNameTarget);
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:
    return dwError;

error:
    VmDnsClearRecord(pDest);

    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:31,代码来源:record-srv.c


示例5: VmDnsAllocateRWLock

DWORD
VmDnsAllocateRWLock(
    PVMDNS_RWLOCK* ppLock
    )
{
    DWORD dwError = 0;
    PVMDNS_RWLOCK pLock = NULL;

    BAIL_ON_VMDNS_INVALID_POINTER(ppLock, dwError);

    dwError = VmDnsAllocateMemory(sizeof(VMDNS_RWLOCK), (void**)&pLock);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = pthread_rwlock_init(&pLock->rwLock, NULL);
    dwError = POSIX_TO_WIN32_ERROR(dwError);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = pthread_key_create(&pLock->readKey, VmDnsFreeLockCount);
    dwError = POSIX_TO_WIN32_ERROR(dwError);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = pthread_key_create(&pLock->writeKey, VmDnsFreeLockCount);
    dwError = POSIX_TO_WIN32_ERROR(dwError);
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppLock = pLock;

cleanup:
    return dwError;
error:
    VMDNS_SAFE_FREE_MEMORY(pLock);
    goto cleanup;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:33,代码来源:threading.c


示例6: VmDnsThreadJoin

DWORD
VmDnsThreadJoin(
    PVMDNS_THREAD pThread,
    PDWORD pRetVal
)
{
    DWORD dwError = ERROR_SUCCESS;
    union
    {
        DWORD dwError;
        PVOID pvRet;
    } retVal = { 0 };

    if(pThread == NULL)
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwError = pthread_join(
        (*pThread),
        ((pRetVal != NULL) ? &(retVal.pvRet) : NULL)
    );
    BAIL_ON_VMDNS_ERROR(dwError);

    if( pRetVal != NULL )
    {
        // our ThreadFunction returns error code
        *pRetVal = retVal.dwError;
    }

error:

    return dwError;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:35,代码来源:threading.c


示例7: VmDnsAllocateMutex

DWORD
VmDnsAllocateMutex(
    PVMDNS_MUTEX* ppMutex
)
{
    DWORD dwError = ERROR_SUCCESS;
    PVMDNS_MUTEX pVmDnsMutex = NULL;

    if ( ppMutex == NULL )
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwError = VmDnsAllocateMemory( sizeof(VMDNS_MUTEX), ((PVOID*)&pVmDnsMutex));
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsInitializeMutexContent( pVmDnsMutex );
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppMutex = pVmDnsMutex;
    pVmDnsMutex = NULL;

error:

    VMDNS_SAFE_FREE_MUTEX( pVmDnsMutex );

    return dwError;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:29,代码来源:threading.c


示例8: VmDnsDuplicateNSRecord

DWORD
VmDnsDuplicateNSRecord(
    PVMDNS_RECORD   pSrc,
    PVMDNS_RECORD   *ppDest
    )
{
    DWORD            dwError = 0;
    PVMDNS_RECORD    pRecord = NULL;

    BAIL_ON_VMDNS_INVALID_POINTER(pSrc, dwError);
    BAIL_ON_VMDNS_INVALID_POINTER(ppDest, dwError);

    dwError = VmDnsAllocateMemory(sizeof(VMDNS_RECORD), (void**)&pRecord);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsCopyNSRecord(pSrc, pRecord);
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppDest = pRecord;
    pRecord = NULL;

cleanup:
    return dwError;

error:
    VMDNS_FREE_RECORD(pRecord);
    if (ppDest)
    {
        *ppDest = NULL;
    }
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:32,代码来源:record-ns.c


示例9: VmDnsCacheRemoveZone

DWORD
VmDnsCacheRemoveZone(
    PVMDNS_CACHE_CONTEXT    pContext,
    PVMDNS_ZONE_OBJECT      pZoneObject
    )
{
    DWORD dwError = 0;
    BOOL bLocked = FALSE;

    if (!pZoneObject)
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    VmDnsLockWrite(pContext->pLock);
    bLocked = TRUE;

    dwError = VmDnsZoneListRemoveZone(pContext->pZoneList, pZoneObject);
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:
    if (bLocked)
    {
        VmDnsUnlockWrite(pContext->pLock);
    }

    return dwError;

error:
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:32,代码来源:cache.c


示例10: VmDnsCliCreateZone

static
DWORD
VmDnsCliCreateZone(
    PVM_DNS_CLI_CONTEXT pContext
    )
{
    DWORD dwError = 0;

    if (pContext->dwZoneType == VMDNS_ZONE_TYPE_FORWARDER)
    {
        dwError = VmDnsCliCreateForwarderZone(pContext);
        BAIL_ON_VMDNS_ERROR(dwError);
    }
    else
    {
        dwError = VmDnsCliCreatePrimaryZone(pContext);
        BAIL_ON_VMDNS_ERROR(dwError);
    }

cleanup:

    return dwError;

error:

    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:27,代码来源:cli.c


示例11: VmDnsCachePurgeRecordProc

DWORD
VmDnsCachePurgeRecordProc(
    PVOID pData,
    PCSTR pszZone,
    PCSTR pszNode
    )
{
    PVMDNS_CACHE_CONTEXT pCacheContext = (PVMDNS_CACHE_CONTEXT) pData;
    PVMDNS_ZONE_OBJECT pZoneObject = NULL;
    DWORD dwError = 0;

    dwError = VmDnsCacheFindZone(
                    pCacheContext,
                    pszZone,
                    &pZoneObject
                    );
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsCachePurgeRecord(pZoneObject, pszNode, CACHE_PURGE_REPLICATION);
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:
    VmDnsZoneObjectRelease(pZoneObject);

    return dwError;

error:
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:29,代码来源:cache.c


示例12: VmDnsRpcCopyPtrRecord

DWORD
VmDnsRpcCopyPtrRecord(
    PVMDNS_RECORD   pSrc,
    PVMDNS_RECORD   pDest
    )
{
    DWORD dwError = 0;
    PVMDNS_PTR_DATAA pData = NULL;

    pData = &pDest->Data.PTR;

    VmDnsRpcAllocateStringA(pSrc->pszName, &pDest->pszName);
    BAIL_ON_VMDNS_ERROR(dwError);

    pDest->iClass = pSrc->iClass;
    pDest->dwTtl = pSrc->dwTtl;
    pDest->dwType = pSrc->dwType;

    VmDnsRpcAllocateStringA(pSrc->Data.PTR.pNameHost, &pData->pNameHost);
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:
    return dwError;

error:
    VmDnsRpcClearPtrRecord(pDest);

    goto cleanup;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:29,代码来源:record-ptr.c


示例13: VmDnsRpcDuplicatePtrRecord

DWORD
VmDnsRpcDuplicatePtrRecord(
    PVMDNS_RECORD   pSrc,
    PVMDNS_RECORD   *ppDest
    )
{
    DWORD            dwError = 0;
    PVMDNS_RECORD    pRecord = NULL;

    BAIL_ON_VMDNS_INVALID_POINTER(pSrc, dwError);
    BAIL_ON_VMDNS_INVALID_POINTER(ppDest, dwError);

    dwError = VmDnsRpcAllocateMemory(sizeof(VMDNS_RECORD), (PVOID*)&pRecord);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsRpcCopyPtrRecord(pSrc, pRecord);
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppDest = pRecord;
    pRecord = NULL;

cleanup:
    return dwError;

error:
    VmDnsRpcClearPtrRecord(pRecord);
    VmDnsRpcFreeMemory(pRecord);
    if (ppDest)
    {
        *ppDest = NULL;
    }
    goto cleanup;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:33,代码来源:record-ptr.c


示例14: VmDnsCacheSyncZones

DWORD
VmDnsCacheSyncZones(
    DWORD                dwLastChangedUSN,
    PVMDNS_CACHE_CONTEXT pCacheContext
    )
{
    DWORD dwError = 0;

    dwError = VmDnsStoreSyncDeleted(
                        dwLastChangedUSN,
                        VmDnsCacheRemoveZoneProc,
                        (PVOID) pCacheContext
                        );
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsStoreSyncNewObjects(
                        dwLastChangedUSN,
                        VmDnsCacheSyncZoneProc,
                        VmDnsCachePurgeRecordProc,
                        (PVOID) pCacheContext
                        );
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:
    return dwError;

error:
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:29,代码来源:cache.c


示例15: VmDnsCacheStopRefreshThread

static
DWORD
VmDnsCacheStopRefreshThread(
    PVMDNS_CACHE_CONTEXT    pContext
    )
{
    DWORD dwError = 0;

    if (!pContext->pRefreshEvent ||
        !pContext->pRefreshThread)
    {
        dwError = ERROR_INVALID_STATE;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    pContext->bShutdown = TRUE;
    dwError = VmDnsConditionSignal(pContext->pRefreshEvent);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsThreadJoin(pContext->pRefreshThread, &dwError);
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsCacheCleanupRefreshThread(pContext);
    BAIL_ON_VMDNS_ERROR(dwError);

cleanup:

    return dwError;

error:

    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:33,代码来源:cache.c


示例16: VmDnsConditionWait

DWORD
VmDnsConditionWait(
    PVMDNS_COND pCondition,
    PVMDNS_MUTEX pMutex
)
{
    DWORD dwError = ERROR_SUCCESS;

    if ( ( pCondition == NULL )
         ||
         ( pCondition->bInitialized == FALSE )
         ||
         ( pMutex == NULL )
         ||
         ( pMutex->bInitialized == FALSE )
       )
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwError = pthread_cond_wait(
        &(pCondition->cond),
        &(pMutex->critSect)
    );
    BAIL_ON_VMDNS_ERROR(dwError);

error:

    return dwError;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:31,代码来源:threading.c


示例17: VmDnsCliDelForwarder

static
DWORD
VmDnsCliDelForwarder(
    PVM_DNS_CLI_CONTEXT pContext
    )
{
    DWORD dwError = 0;

    if (pContext->pszZone)
    {
        dwError = VmDnsDeleteZoneForwarderA(
                        pContext->pServerContext,
                        pContext->pszForwarder,
                        pContext->pszZone);
        BAIL_ON_VMDNS_ERROR(dwError);
    }
    else
    {
        dwError = VmDnsDeleteForwarderA(
                        pContext->pServerContext,
                        pContext->pszForwarder);
        BAIL_ON_VMDNS_ERROR(dwError);
    }

cleanup:

    return dwError;

error:

    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:32,代码来源:cli.c


示例18: VmDnsPropertyListAddList

DWORD
VmDnsPropertyListAddList(
    PVMDNS_PROPERTY_LIST          pDestList,
    PVMDNS_PROPERTY_LIST          pSrcList
    )
{
    DWORD dwError = 0;
    DWORD i = 0;
    DWORD dwPropertyListSize = 0;

    BAIL_ON_VMDNS_INVALID_POINTER(pDestList, dwError);
    BAIL_ON_VMDNS_INVALID_POINTER(pSrcList, dwError);

    if (pSrcList->dwCurrentSize == 0)
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    dwPropertyListSize = VmDnsPropertyListGetSize(pSrcList);

    for (i = 0; i < dwPropertyListSize; i++)
    {
        dwError = VmDnsPropertyListAdd(pDestList, pSrcList->ppProperties[i]);
        BAIL_ON_VMDNS_ERROR(dwError);
    }

cleanup:
    return dwError;

error:
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:33,代码来源:propertylist.c


示例19: VmDnsCreateThread

DWORD
VmDnsCreateThread(
    PVMDNS_THREAD pThread,
    BOOLEAN bDetached,
    VmDnsStartRoutine* pStartRoutine,
    PVOID pArgs
)
{
    DWORD dwError = ERROR_SUCCESS;
    PVMDNS_THREAD_START_INFO pThreadStartInfo = NULL;
    pthread_attr_t     thrAttr;
    BOOLEAN bThreadAttrInited = FALSE;

    if ( ( pThread == NULL ) || ( pStartRoutine == NULL ) )
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    if( bDetached != FALSE )
    {
        pthread_attr_init(&thrAttr);
        bThreadAttrInited = TRUE;
        pthread_attr_setdetachstate(&thrAttr, PTHREAD_CREATE_DETACHED);
    }

    dwError = VmDnsAllocateMemory(
        sizeof(VMDNS_THREAD_START_INFO),
        ((PVOID*)&pThreadStartInfo)
    );
    BAIL_ON_VMDNS_ERROR(dwError);

    pThreadStartInfo->pStartRoutine = pStartRoutine;
    pThreadStartInfo->pArgs = pArgs;

    dwError = pthread_create(
        pThread,
        ((bDetached == FALSE) ? NULL : &thrAttr),
        ThreadFunction,
        pThreadStartInfo
    );
    BAIL_ON_VMDNS_ERROR(dwError);

    // we started successfully -> pThreadStartInfo is now owned by
    // ThreadFunction
    pThreadStartInfo = NULL;

error:

    if(bThreadAttrInited != FALSE)
    {
        pthread_attr_destroy(&thrAttr);
    }

    VMDNS_SAFE_FREE_MEMORY( pThreadStartInfo );

    return dwError;
}
开发者ID:DhanashreeA,项目名称:lightwave,代码行数:58,代码来源:threading.c


示例20: VmDnsListRecordsA

VMDNS_API
DWORD
VmDnsListRecordsA(
    PVMDNS_SERVER_CONTEXT   pServerContext,
    PSTR                    pszZone,
    PVMDNS_RECORD_ARRAY*    ppRecordArray
    )
{
    DWORD dwError = 0;
    PVMDNS_RECORD_ARRAY pRecordArray = NULL;
    PVMDNS_RECORD_ARRAY pRpcRecordArray = NULL;

    if (!pServerContext ||
        !pServerContext->hBinding ||
        !ppRecordArray)
    {
        dwError = ERROR_INVALID_PARAMETER;
        BAIL_ON_VMDNS_ERROR(dwError);
    }

    DCETHREAD_TRY
    {
        dwError = VmDnsRpcListRecords(
                        pServerContext->hBinding,
                        pszZone,
                        &pRpcRecordArray
                        );
    }
    DCETHREAD_CATCH_ALL(THIS_CATCH)
    {
        dwError = VmDnsRpcGetErrorCode(THIS_CATCH);
    }
    DCETHREAD_ENDTRY;
    BAIL_ON_VMDNS_ERROR(dwError);

    dwError = VmDnsAllocateFromRpcRecordArray(
                                pRpcRecordArray,
                                &pRecordArray
                                );
    BAIL_ON_VMDNS_ERROR(dwError);

    *ppRecordArray = pRecordArray;

cleanup:

    if (pRpcRecordArray)
    {
        VmDnsRpcClientFreeRpcRecordArray(pRpcRecordArray);
    }
    return dwError;

error:
    VMDNS_FREE_RECORD_ARRAY(pRecordArray);
    goto cleanup;
}
开发者ID:vmware,项目名称:lightwave,代码行数:55,代码来源:client.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ BAIL_ON_WBC_ERROR函数代码示例发布时间:2022-05-30
下一篇:
C++ BAIL_ON_VMDIR_ERROR函数代码示例发布时间: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