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

C++ AnscReleaseLock函数代码示例

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

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



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

示例1: AnscHashUlong

ANSC_HANDLE
HttpBmoGetHeaderField
    (
        ANSC_HANDLE                 hThisObject,
        ULONG                       ulHeaderId
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PHTTP_BASIC_MESSAGE_OBJECT      pMyObject    = (PHTTP_BASIC_MESSAGE_OBJECT)hThisObject;
    PHTTP_HFP_INTERFACE             pHfpIf       = (PHTTP_HFP_INTERFACE       )pMyObject->hHfpIf;
    PHTTP_HEADER_FIELD              pHttpHfo     = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;
    ULONG                           ulHashIndex  = AnscHashUlong(ulHeaderId, HTTP_BMO_HFO_TABLE_SIZE);

    AnscAcquireLock(&pMyObject->HfoTableLock);

    pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->HfoTable[ulHashIndex]);

    while ( pSLinkEntry )
    {
        pHttpHfo    = ACCESS_HTTP_HEADER_FIELD(pSLinkEntry);
        pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry);

        if ( pHttpHfo->HeaderId == ulHeaderId )
        {
            AnscReleaseLock(&pMyObject->HfoTableLock);

            return  (ANSC_HANDLE)pHttpHfo;
        }
    }

    AnscReleaseLock(&pMyObject->HfoTableLock);

    return  (ANSC_HANDLE)NULL;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:35,代码来源:http_bmo_header.c


示例2: AnscHashString

ANSC_HANDLE
HttpFcoGetFormElement
    (
        ANSC_HANDLE                 hThisObject,
        char*                       name
    )
{
    ANSC_STATUS                     returnStatus  = ANSC_STATUS_SUCCESS;
    PHTTP_FORM_CONTENT_OBJECT       pMyObject     = (PHTTP_FORM_CONTENT_OBJECT)hThisObject;
    PHTTP_HFP_INTERFACE             pHfpIf        = (PHTTP_HFP_INTERFACE      )pMyObject->hHfpIf;
    PHTTP_FORM_ELEMENT              pFormElement  = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry   = NULL;
    ULONG                           ulHashIndex   = AnscHashString(name, AnscSizeOfString(name), HTTP_FCO_FEO_TABLE_SIZE);

    AnscAcquireLock(&pMyObject->FeoTableLock);

    pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->FeoTable[ulHashIndex]);

    while ( pSLinkEntry )
    {
        pFormElement = ACCESS_HTTP_FORM_ELEMENT(pSLinkEntry);
        pSLinkEntry  = AnscQueueGetNextEntry(pSLinkEntry);

        if ( AnscEqualString(pFormElement->Name, name, TRUE) )
        {
            AnscReleaseLock(&pMyObject->FeoTableLock);

            return  (ANSC_HANDLE)pFormElement;
        }
    }

    AnscReleaseLock(&pMyObject->FeoTableLock);

    return  (ANSC_HANDLE)NULL;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:35,代码来源:http_fco_management.c


示例3: AnscAcquireLock

ANSC_HANDLE
AnscLpccoGetPendingCall
    (
        ANSC_HANDLE                 hThisObject,
        ULONG                       msg_type,
        ULONG                       seq_number
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PANSC_LPC_CONNECTOR_OBJECT      pMyObject    = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject;
    PANSC_LPCCO_PENDING_CALL        pPendingCall = (PANSC_LPCCO_PENDING_CALL  )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = (PSINGLE_LINK_ENTRY        )NULL;

    AnscAcquireLock(&pMyObject->PcallQueueLock);

    pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->PcallQueue);

    while ( pSLinkEntry )
    {
        pPendingCall = ACCESS_ANSC_LPCCO_PENDING_CALL(pSLinkEntry);
        pSLinkEntry  = AnscQueueGetNextEntry(pSLinkEntry);

        if ( (pPendingCall->ImcpMsgType   == msg_type  ) &&
             (pPendingCall->CallSeqNumber == seq_number) )
        {
            AnscReleaseLock(&pMyObject->PcallQueueLock);

            return  (ANSC_HANDLE)pPendingCall;
        }
    }

    AnscReleaseLock(&pMyObject->PcallQueueLock);

    return  (ANSC_HANDLE)NULL;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:35,代码来源:ansc_lpcco_management.c


示例4: AnscAcquireLock

ANSC_STATUS
BbhmDiagipSetStopTime
    (
        ANSC_HANDLE                 hThisObject,
        USHORT                      SeqNumber,
        ULONG                       PktSize,
        UCHAR                       TTL,
        ULONG                       StopTime
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_FAILURE;
    PBBHM_DIAG_IP_PING_OBJECT       pMyObject    = (PBBHM_DIAG_IP_PING_OBJECT)hThisObject;
    PBBHM_IP_PING_PROPERTY          pProperty    = (PBBHM_IP_PING_PROPERTY        )&pMyObject->Property;
    PBBHM_IP_PING_TDO_OBJECT        pStateTimer  = (PBBHM_IP_PING_TDO_OBJECT      )pMyObject->hStateTimer;
    PBBHM_IP_PING_SINK_OBJECT       pSink        = (PBBHM_IP_PING_SINK_OBJECT     )pMyObject->hSinkObject;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;
    PBBHM_IP_PING_ECHO_ENTRY        pEchoEntry   = NULL;
    PBBHM_IP_PING_ECHO_ENTRY        pMEchoEntry  = NULL;
    ULONG                           ulHashIndex  = SeqNumber % MAX_ECHO_TABLE_SIZE;

    AnscAcquireLock(&pMyObject->EchoTableLock);
    pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->EchoTable[ulHashIndex]);

    while ( pSLinkEntry )
    {
        pEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)ACCESS_BBHM_IP_PING_ECHO_ENTRY(pSLinkEntry);
        pSLinkEntry = AnscSListGetNextEntry(pSLinkEntry);

        if ( pEchoEntry->SeqId == SeqNumber )
        {
            if ( (StopTime - pEchoEntry->StartTime <= pProperty->TimeOut) && (pEchoEntry->StopTime == 0) )
            {
                returnStatus = ANSC_STATUS_SUCCESS;
                pEchoEntry->StopTime    = StopTime;
                pEchoEntry->TTL         = TTL;
                pEchoEntry->PktSize     = PktSize;
                pEchoEntry->ICMPType    = 0;
                pMEchoEntry = (PBBHM_IP_PING_ECHO_ENTRY)AnscAllocateMemory(sizeof(BBHM_IP_PING_ECHO_ENTRY));
                if ( pMEchoEntry )
                {
                    pMEchoEntry->StartTime = pEchoEntry->StartTime;
                    pMEchoEntry->StopTime  = pEchoEntry->StopTime;
                    pMEchoEntry->SeqId     = pEchoEntry->SeqId;
                    pMEchoEntry->PktSize   = pEchoEntry->PktSize;
                    pMEchoEntry->TTL       = pEchoEntry->TTL;
                    pMEchoEntry->ICMPType  = pEchoEntry->ICMPType;
                    AnscAcquireLock(&pMyObject->MiddleResultLock);
                    AnscSListPushEntryAtBack(&pMyObject->MiddleResult, &pMEchoEntry->Linkage);
                    AnscReleaseLock(&pMyObject->MiddleResultLock);
                }
            }

            break;
        }
    }

    AnscReleaseLock(&pMyObject->EchoTableLock);

    return  returnStatus;
}
开发者ID:davekimble,项目名称:TestAndDiagnostic,代码行数:60,代码来源:bbhm_diagip_operation.c


示例5: AnscHashString2

ANSC_HANDLE
HttpScoGetWcso
(
    ANSC_HANDLE                 hThisObject,
    char*                       host,
    USHORT                      port,
    ANSC_HANDLE                 hReqContext,
    BOOL                        bUseTls
)
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PHTTP_SIMPLE_CLIENT_OBJECT      pMyObject    = (PHTTP_SIMPLE_CLIENT_OBJECT  )hThisObject;
    PHTTP_SIMPLE_CLIENT_PROPERTY    pProperty    = (PHTTP_SIMPLE_CLIENT_PROPERTY)&pMyObject->Property;
    PHTTP_WEBC_SESSION_OBJECT       pWebcSession = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;
    ULONG                           ulHashIndex  = AnscHashString2(host, AnscSizeOfString(host), HTTP_SCO_WCSO_TABLE_SIZE);
    ULONG                           ulSessFlags;

    AnscAcquireLock(&pMyObject->WcsoTableLock);

    pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->WcsoTable[ulHashIndex]);

    while ( pSLinkEntry )
    {
        pWebcSession = ACCESS_HTTP_WEBC_SESSION_OBJECT(pSLinkEntry);
        pSLinkEntry  = AnscSListGetNextEntry(pSLinkEntry);

        ulSessFlags = bUseTls? HTTP_WCSO_FLAG_tlsEnabled : 0;

        if ( pMyObject->ClientMode & HTTP_SCO_MODE_XSOCKET )
        {
            ulSessFlags |= HTTP_WCSO_FLAG_xsocketEnabled;
        }

        if ( pMyObject->ClientMode & HTTP_SCO_MODE_NOTIFY_ON_ALL_CONN_ONCE )
        {
            ulSessFlags |= HTTP_WCSO_FLAG_BspNotifyOnAllConnOnce;
        }

        if ( pWebcSession->MatchServer
                (
                    (ANSC_HANDLE)pWebcSession,
                    host,
                    port,
                    ulSessFlags
                ) )
        {
            pWebcSession->AcquireAccess((ANSC_HANDLE)pWebcSession);

            AnscReleaseLock(&pMyObject->WcsoTableLock);

            return  (ANSC_HANDLE)pWebcSession;
        }
    }

    AnscReleaseLock(&pMyObject->WcsoTableLock);

    return  (ANSC_HANDLE)NULL;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:59,代码来源:http_sco_access.c


示例6: AnscAcquireLock

ANSC_HANDLE
HttpWcsoGetCurWcto
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PHTTP_WEBC_SESSION_OBJECT       pMyObject    = (PHTTP_WEBC_SESSION_OBJECT )hThisObject;
    PHTTP_BSP_INTERFACE             pBspIf       = (PHTTP_BSP_INTERFACE       )pMyObject->hBspIf;
    PHTTP_HFP_INTERFACE             pHfpIf       = (PHTTP_HFP_INTERFACE       )pMyObject->hHfpIf;
    PHTTP_WEBC_TRANS_OBJECT         pWebcTrans   = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;
    ULONG                           ulWctoState  = HTTP_WCTO_STATE_INITIALIZED;

    AnscAcquireLock(&pMyObject->WctoSListLock);

    pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->WctoSList);

    if ( pSLinkEntry )
    {
        pWebcTrans  = ACCESS_HTTP_WEBC_TRANS_OBJECT(pSLinkEntry);
        ulWctoState = pWebcTrans->GetTransState((ANSC_HANDLE)pWebcTrans);

        if ( ulWctoState != HTTP_WCTO_STATE_FINISHED )
        {
            pWebcTrans->AcquireAccess((ANSC_HANDLE)pWebcTrans);

            AnscReleaseLock(&pMyObject->WctoSListLock);

            return  (ANSC_HANDLE)pWebcTrans;
        }
        else if ( pWebcTrans->IsLastTrans((ANSC_HANDLE)pWebcTrans) )
        {
            AnscReleaseLock(&pMyObject->WctoSListLock);

            return  (ANSC_HANDLE)NULL;
        }
    }

    AnscReleaseLock(&pMyObject->WctoSListLock);

    /*
     * Remove all existing HTTP transactions to reserve memory. Note that this MAY cause problem if
     * the asynchronous mode is enabled. However, I remember it's specified that HTTP client should
     * NOT start a new transaction until the old name is completed. So we should be OK.
     */
    pMyObject->DelAllWctos((ANSC_HANDLE)pMyObject);

    pWebcTrans = (PHTTP_WEBC_TRANS_OBJECT)pMyObject->AddNewWcto((ANSC_HANDLE)pMyObject);

    return  (ANSC_HANDLE)pWebcTrans;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:52,代码来源:http_wcso_management.c


示例7: AnscSizeOfString

ANSC_HANDLE
BwrmPmoGetPage
    (
        ANSC_HANDLE                 hThisObject,
        char*                       root_path,
        char*                       file_path
    )
{
    ANSC_STATUS                     returnStatus      = ANSC_STATUS_SUCCESS;
    PBWRM_PAGE_MANAGER_OBJECT       pMyObject         = (PBWRM_PAGE_MANAGER_OBJECT    )hThisObject;
    PBWRM_PAGE_MANAGER_PROPERTY     pProperty         = (PBWRM_PAGE_MANAGER_PROPERTY  )&pMyObject->Property;
    PANSC_TIMER_DESCRIPTOR_OBJECT   pCacheTimerObject = (PANSC_TIMER_DESCRIPTOR_OBJECT)pMyObject->hCacheTimerObject;
    PBWRM_COOKED_PAGE_OBJECT        pCookedPage       = (PBWRM_COOKED_PAGE_OBJECT     )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry       = (PSINGLE_LINK_ENTRY           )NULL;
    ULONG                           ulHashIndex       = (ULONG                        )AnscHashString(file_path, AnscSizeOfString(file_path), BWRM_PMO_CPO_TABLE_SIZE);
    ULONG                           ulCurTime         = AnscGetTickInSeconds();

    pMyObject->Timestamp = ulCurTime;

    AnscAcquireLock(&pMyObject->CpoTableLock);

    pSLinkEntry = AnscSListGetFirstEntry(&pMyObject->CpoTable[ulHashIndex]);

    while ( pSLinkEntry )
    {
        pCookedPage = ACCESS_BWRM_COOKED_PAGE_OBJECT(pSLinkEntry);
        pSLinkEntry = AnscSListGetNextEntry(pSLinkEntry);

        if ( pCookedPage->MatchPath
                (
                    (ANSC_HANDLE)pCookedPage,
                    root_path,
                    file_path
                ) )
        {
            pCookedPage->SetTimestamp((ANSC_HANDLE)pCookedPage, ulCurTime);
            pCookedPage->IncRefCount ((ANSC_HANDLE)pCookedPage);

            AnscReleaseLock(&pMyObject->CpoTableLock);

            return  (ANSC_HANDLE)pCookedPage;
        }
    }

    AnscReleaseLock(&pMyObject->CpoTableLock);

    return  (ANSC_HANDLE)NULL;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:48,代码来源:bwrm_pmo_management.c


示例8: AnscAcquireLock

BOOLEAN
BbhmDiageoCheckCanStart
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus    = ANSC_STATUS_SUCCESS;
    PBBHM_DIAG_EXEC_OBJECT          pMyObject       = (PBBHM_DIAG_EXEC_OBJECT)hThisObject;
    PDSLH_DIAG_INFO_BASE            pDiagInfo       = (PDSLH_DIAG_INFO_BASE  )pMyObject->hDslhDiagInfo;
    BOOLEAN                         bCanStart       = FALSE;

    AnscAcquireLock(&pMyObject->AccessLock);

    if ( pMyObject->bResultQueryRunning )
    {
        bCanStart = FALSE;
    }
    else
    {
        bCanStart = TRUE;
    }

    AnscReleaseLock(&pMyObject->AccessLock);

    return  bCanStart;
}
开发者ID:davekimble,项目名称:TestAndDiagnostic,代码行数:26,代码来源:bbhm_diageo_process.c


示例9: AnscAcquireLock

ANSC_STATUS
Bmc2EnvcoDelAllCommandProperties
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus         = ANSC_STATUS_SUCCESS;
    PBMC2_ENV_CONTROLLER_OBJECT     pMyObject            = (PBMC2_ENV_CONTROLLER_OBJECT  )hThisObject;
    PBMC2_ENV_CONTROLLER_PROPERTY   pProperty            = (PBMC2_ENV_CONTROLLER_PROPERTY)&pMyObject->Property;
    PBMC2_COMMAND_PROPERTY          pBmc2CommandProperty = (PBMC2_COMMAND_PROPERTY       )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry          = (PSINGLE_LINK_ENTRY           )NULL;
    ULONG                           i                    = 0;

    AnscAcquireLock(&pMyObject->CompoTableLock);

    for ( i = 0; i < BMC2_ENVCO_COMPO_TABLE_SIZE; i++ )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->CompoTable[i]);

        while ( pSLinkEntry )
        {
            pBmc2CommandProperty = ACCESS_BMC2_COMMAND_PROPERTY(pSLinkEntry);
            pSLinkEntry          = AnscQueuePopEntry(&pMyObject->CompoTable[i]);

            Bmc2FreeCommandProperty(pBmc2CommandProperty);
        }
    }

    AnscReleaseLock(&pMyObject->CompoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:32,代码来源:bmc2_envco_management.c


示例10: AnscAcquireLock

ANSC_STATUS
PsmSysroSysRamEnableFileSync
    (
        ANSC_HANDLE                 hThisObject,
        BOOL                        bEnabled
    )
{
    ANSC_STATUS                     returnStatus       = ANSC_STATUS_SUCCESS;
    PPSM_SYS_REGISTRY_OBJECT       pMyObject          = (PPSM_SYS_REGISTRY_OBJECT  )hThisObject;
    PPSM_SYS_REGISTRY_PROPERTY     pProperty          = (PPSM_SYS_REGISTRY_PROPERTY)&pMyObject->Property;
    PSYS_INFO_REPOSITORY_OBJECT     pSysInfoRepository = (PSYS_INFO_REPOSITORY_OBJECT)pMyObject->hSysInfoRepository;
    PSYS_IRA_INTERFACE              pIraIf             = (PSYS_IRA_INTERFACE         )pSysInfoRepository->GetIraIf((ANSC_HANDLE)pSysInfoRepository);

    AnscAcquireLock(&pMyObject->AccessLock);
//CcspTraceInfo(("\n##PsmSysroSysRamEnableFileSync() begins##\n"));
    if ( bEnabled )
    {
        pMyObject->FileSyncRefCount--;
    }
    else
    {
        pMyObject->FileSyncRefCount++;
    }

    AnscReleaseLock(&pMyObject->AccessLock);
//CcspTraceInfo(("\n##PsmSysroSysRamEnableFileSync() ENDs##\n"));
    return  ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspPsm,代码行数:28,代码来源:psm_sysro_sysramif.c


示例11: AnscAcquireLock

ANSC_STATUS
HttpAuthcoClearAllAuthInfo
    (
        ANSC_HANDLE                 hThisObject
    )
{
    PHTTP_AUTH_CLIENT_OBJECT        pMyObject    = (PHTTP_AUTH_CLIENT_OBJECT)hThisObject;
    PHTTP_AUTHO_INFO                pAuthInfo    = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;

    AnscAcquireLock(&pMyObject->AuthInfoListLock);

    /* remove auth info */
    pSLinkEntry = AnscSListPopEntry(&pMyObject->AuthInfoList);
    while (pSLinkEntry)
    {
        pAuthInfo   = ACCESS_HTTP_AUTHO_INFO_OBJECT(pSLinkEntry);
        pSLinkEntry = AnscSListPopEntry(&pMyObject->AuthInfoList);

        HttpAuthInfoRemove(pAuthInfo);
    }

    AnscReleaseLock(&pMyObject->AuthInfoListLock);

    return ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:26,代码来源:http_authco_management.c


示例12: AnscAcquireLock

ANSC_STATUS
TlsSmoDelAllSessions
(
    ANSC_HANDLE                 hThisObject
)
{
    PTLS_SESSION_MANAGER_OBJECT     pMyObject     = (PTLS_SESSION_MANAGER_OBJECT  )hThisObject;
    PTLS_SESSION_ENTRY_OBJECT       pSessionEntry = (PTLS_SESSION_ENTRY_OBJECT    )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry   = (PSINGLE_LINK_ENTRY           )NULL;
    ULONG                           i             = 0;

    AnscAcquireLock(&pMyObject->SeoTableLock);

    for ( i = 0; i < TLS_SMO_SEO_TABLE_SIZE; i++ )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->SeoTable[i]);

        while ( pSLinkEntry )
        {
            pSessionEntry = ACCESS_TLS_SESSION_ENTRY_OBJECT(pSLinkEntry);
            pSLinkEntry   = AnscQueuePopEntry(&pMyObject->SeoTable[i]);

            pSessionEntry->Remove((ANSC_HANDLE)pSessionEntry);
        }
    }

    AnscReleaseLock(&pMyObject->SeoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:30,代码来源:tls_smo_management.c


示例13: AnscQueuePopEntryByLink

ANSC_STATUS
HttpFcoDelFormElement
    (
        ANSC_HANDLE                 hThisObject,
        char*                       name
    )
{
    ANSC_STATUS                     returnStatus  = ANSC_STATUS_SUCCESS;
    PHTTP_FORM_CONTENT_OBJECT       pMyObject     = (PHTTP_FORM_CONTENT_OBJECT)hThisObject;
    PHTTP_HFP_INTERFACE             pHfpIf        = (PHTTP_HFP_INTERFACE      )pMyObject->hHfpIf;
    PHTTP_FORM_ELEMENT              pFormElement  = NULL;
    ULONG                           ulHashIndex   = 0;

    pFormElement =
        (PHTTP_FORM_ELEMENT)pMyObject->GetFormElement
            (
                (ANSC_HANDLE)pMyObject,
                name
            );

    if ( !pFormElement )
    {
        return  ANSC_STATUS_CANT_FIND;
    }
    else
    {
        ulHashIndex = pFormElement->HashIndex;
    }

    AnscAcquireLock        (&pMyObject->FeoTableLock);
    AnscQueuePopEntryByLink(&pMyObject->FeoTable[ulHashIndex], &pFormElement->Linkage);
    AnscReleaseLock        (&pMyObject->FeoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:35,代码来源:http_fco_management.c


示例14: AnscSizeOfString

ANSC_STATUS
HttpFcoAddFormElement
    (
        ANSC_HANDLE                 hThisObject,
        ANSC_HANDLE                 hFeo
    )
{
    ANSC_STATUS                     returnStatus  = ANSC_STATUS_SUCCESS;
    PHTTP_FORM_CONTENT_OBJECT       pMyObject     = (PHTTP_FORM_CONTENT_OBJECT)hThisObject;
    PHTTP_HFP_INTERFACE             pHfpIf        = (PHTTP_HFP_INTERFACE      )pMyObject->hHfpIf;
    PHTTP_FORM_ELEMENT              pFormElement  = (PHTTP_FORM_ELEMENT       )hFeo;
    ULONG                           ulHashIndex   = 0;

    ulHashIndex =
        AnscHashString
            (
                pFormElement->Name,
                AnscSizeOfString(pFormElement->Name),
                HTTP_FCO_FEO_TABLE_SIZE
            );

    pFormElement->FormIndex = pMyObject->FormIndex++;
    pFormElement->HashIndex = ulHashIndex;

    AnscAcquireLock   (&pMyObject->FeoTableLock);
    AnscQueuePushEntry(&pMyObject->FeoTable[ulHashIndex], &pFormElement->Linkage);
    AnscReleaseLock   (&pMyObject->FeoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:30,代码来源:http_fco_management.c


示例15: AnscReleaseSemaphore

ANSC_STATUS
SysIroRelAccess
    (
        ANSC_HANDLE                 hThisObject,
        BOOL                        bReadAccess
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PSYS_INFO_REPOSITORY_OBJECT     pMyObject    = (PSYS_INFO_REPOSITORY_OBJECT  )hThisObject;
    PSYS_INFO_REPOSITORY_PROPERTY   pProperty    = (PSYS_INFO_REPOSITORY_PROPERTY)&pMyObject->Property;
    ULONG                           i            = 0;

    /*
    if ( bReadAccess )
    {
        AnscReleaseSemaphore(&pMyObject->AccessSemaphore, 1);
    }
    else
    {
        AnscReleaseSemaphore(&pMyObject->AccessSemaphore, SYS_IRO_MAX_REP_ACCESS_COUNT);
    }
    */

    if ( !bReadAccess )
    {
        AnscReleaseLock(&pMyObject->AccessLock);
    }

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:30,代码来源:sys_iro_operation.c


示例16: AnscAcquireLock

ANSC_STATUS
AnscDstoStopEngines
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PANSC_DAEMON_SERVER_TCP_OBJECT  pMyObject    = (PANSC_DAEMON_SERVER_TCP_OBJECT)hThisObject;
    PANSC_DAEMON_ENGINE_TCP_OBJECT  pEngine      = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;

    AnscAcquireLock(&pMyObject->EngineQueueLock);

    pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->EngineQueue);

    while ( pSLinkEntry )
    {
        pEngine     = ACCESS_ANSC_DAEMON_ENGINE_TCP_OBJECT(pSLinkEntry);
        pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry);

        pEngine->Stop((ANSC_HANDLE)pEngine);
    }

    AnscReleaseLock(&pMyObject->EngineQueueLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:27,代码来源:ansc_dsto_operation.c


示例17: HttpFumEntityAlloc

ANSC_STATUS
WebSsoRegisterMdhIf
    (
        ANSC_HANDLE                 hThisObject,
        PUCHAR                      pRequestUri,
        ANSC_HANDLE                 hMdhIf
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PWEB_SIMPLE_SERVER_OBJECT       pMyObject    = (PWEB_SIMPLE_SERVER_OBJECT)hThisObject;
    PHTTP_FUM_INTERFACE             pFumIf       = (PHTTP_FUM_INTERFACE      )pMyObject->hFumIf;
    PHTTP_FUM_ENTITY                pEntity      = NULL;

    if ( (ANSC_HANDLE)NULL == pFumIf->GetMdhIf(pFumIf->hOwnerContext, pRequestUri) )
    {
        HttpFumEntityAlloc(pEntity, pRequestUri, hMdhIf);
        if ( !pEntity )
        {
            returnStatus = ANSC_STATUS_RESOURCES;
        }
        else
        {
            AnscAcquireLock(&pMyObject->MdhSListLock);
            AnscSListPushEntry(&pMyObject->MdhSList, &pEntity->Linkage);
            AnscReleaseLock(&pMyObject->MdhSListLock);
        }
    }

    return returnStatus;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:30,代码来源:web_sso_fumif.c


示例18: AnscFreeMemory

ANSC_STATUS
DslhWmpdoReset
(
    ANSC_HANDLE                 hThisObject
)
{
    ANSC_STATUS                     returnStatus   = ANSC_STATUS_SUCCESS;
    PDSLH_WMP_DATABASE_OBJECT       pMyObject      = (PDSLH_WMP_DATABASE_OBJECT  )hThisObject;
    PDSLH_WMP_DATABASE_PROPERTY     pProperty      = (PDSLH_WMP_DATABASE_PROPERTY)&pMyObject->Property;
    PDSLH_OBJ_RECORD_OBJECT         pRootObjRecord = (PDSLH_OBJ_RECORD_OBJECT    )pMyObject->hRootObjRecord;
    PDSLH_OBJ_ENTITY_OBJECT         pRootObjEntity = (PDSLH_OBJ_ENTITY_OBJECT    )pMyObject->hRootObjEntity;
    PDSLH_WMPDO_MONITOR_PARAM       pMonitorParam  = (PDSLH_WMPDO_MONITOR_PARAM  )NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry    = (PSINGLE_LINK_ENTRY         )NULL;

    pMyObject->ResetObjVarArray(hThisObject);

    if ( pMyObject->LockedEntity )
    {
        AnscFreeMemory(pMyObject->LockedEntity);

        pMyObject->LockedEntity = NULL;
    }

    if ( pMyObject->pRootObjName)
    {
        AnscFreeMemory(pMyObject->pRootObjName);

        pMyObject->pRootObjName = NULL;
    }

    if ( pRootObjRecord )
    {
        pRootObjRecord->Remove((ANSC_HANDLE)pRootObjRecord);

        pMyObject->hRootObjRecord = (ANSC_HANDLE)NULL;
    }

    if ( pRootObjEntity )
    {
        pRootObjEntity->Remove((ANSC_HANDLE)pRootObjEntity);

        pMyObject->hRootObjEntity = (ANSC_HANDLE)NULL;
    }

    AnscAcquireLock(&pMyObject->MpoQueueLock);

    pSLinkEntry = AnscQueuePopEntry(&pMyObject->MpoQueue);

    while ( pSLinkEntry )
    {
        pMonitorParam = ACCESS_DSLH_WMPDO_MONITOR_PARAM(pSLinkEntry);
        pSLinkEntry   = AnscQueuePopEntry(&pMyObject->MpoQueue);

        DslhWmpdoFreeMonitorParam(pMonitorParam);
    }

    AnscReleaseLock(&pMyObject->MpoQueueLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:60,代码来源:dslh_wmpdo_states.c


示例19: AnscAcquireLock

ANSC_STATUS
HttpBmoDelAllHfos
    (
        ANSC_HANDLE                 hThisObject
    )
{
    ANSC_STATUS                     returnStatus = ANSC_STATUS_SUCCESS;
    PHTTP_BASIC_MESSAGE_OBJECT      pMyObject    = (PHTTP_BASIC_MESSAGE_OBJECT)hThisObject;
    PHTTP_HFP_INTERFACE             pHfpIf       = (PHTTP_HFP_INTERFACE       )pMyObject->hHfpIf;
    PHTTP_HEADER_FIELD              pHttpHfo     = NULL;
    PSINGLE_LINK_ENTRY              pSLinkEntry  = NULL;
    ULONG                           i            = 0;

    AnscAcquireLock(&pMyObject->HfoTableLock);

    for ( i = 0; i < HTTP_BMO_HFO_TABLE_SIZE; i++ )
    {
        pSLinkEntry = AnscQueuePopEntry(&pMyObject->HfoTable[i]);

        while ( pSLinkEntry )
        {
            pHttpHfo    = ACCESS_HTTP_HEADER_FIELD(pSLinkEntry);
            pSLinkEntry = AnscQueuePopEntry(&pMyObject->HfoTable[i]);

            AnscFreeMemory(pHttpHfo);
        }
    }

    AnscReleaseLock(&pMyObject->HfoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:32,代码来源:http_bmo_header.c


示例20: AnscHashString

ANSC_STATUS
Bmc2EnvcoAddCommandProperty
    (
        ANSC_HANDLE                 hThisObject,
        ANSC_HANDLE                 hCommandProperty,
        ANSC_HANDLE                 hCommandInsertBefore
    )
{
    ANSC_STATUS                     returnStatus         = ANSC_STATUS_SUCCESS;
    PBMC2_ENV_CONTROLLER_OBJECT     pMyObject            = (PBMC2_ENV_CONTROLLER_OBJECT  )hThisObject;
    PBMC2_ENV_CONTROLLER_PROPERTY   pProperty            = (PBMC2_ENV_CONTROLLER_PROPERTY)&pMyObject->Property;
    PBMC2_COMMAND_PROPERTY          pBmc2CommandProperty = (PBMC2_COMMAND_PROPERTY       )hCommandProperty;
    PBMC2_COMMAND_PROPERTY          pBmc2CommandPropRef  = (PBMC2_COMMAND_PROPERTY       )hCommandInsertBefore;
    ULONG                           ulHashIndex          = AnscHashString(pBmc2CommandProperty->CommandName, AnscSizeOfString(pBmc2CommandProperty->CommandName), BMC2_ENVCO_COMPO_TABLE_SIZE);

    AnscAcquireLock   (&pMyObject->CompoTableLock);
    if ( !pBmc2CommandPropRef )
    {
        AnscQueuePushEntry(&pMyObject->CompoTable[ulHashIndex], &pBmc2CommandProperty->Linkage);
    }
    else
    {
        /* This makes sure that the command property with more specific domain pattern name appears before those
         * with less specific name. So when the command is issued, framework always tries to match domain
         * with longer domain name, therefore there will be no mismatch.
         */
        AnscQueuePushEntryBefore(&pMyObject->CompoTable[ulHashIndex], &pBmc2CommandProperty->Linkage, &pBmc2CommandPropRef->Linkage);
    }
    AnscReleaseLock   (&pMyObject->CompoTableLock);

    return  ANSC_STATUS_SUCCESS;
}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:32,代码来源:bmc2_envco_management.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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