这篇教程C++ AnscFreeMemory函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AnscFreeMemory函数的典型用法代码示例。如果您正苦于以下问题:C++ AnscFreeMemory函数的具体用法?C++ AnscFreeMemory怎么用?C++ AnscFreeMemory使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AnscFreeMemory函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: AnscFreeMemoryANSC_STATUSHttpSmpoRemove ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PHTTP_SIMPLE_MSG_PARSER pMyObject = (PHTTP_SIMPLE_MSG_PARSER)hThisObject; if (pMyObject->hHfpIf) { PHTTP_HFP_INTERFACE pHfpIf; pHfpIf = (PHTTP_HFP_INTERFACE)(pMyObject->hHfpIf); AnscFreeMemory(pHfpIf); } pMyObject->RemoveXTable((ANSC_HANDLE)pMyObject); AnscCoRemove((ANSC_HANDLE)pMyObject); return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:23,
示例2: AnscFreeMemoryANSC_STATUSSysIroV2Remove ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PSYS_IROV2_OBJECT pMyObject = (PSYS_IROV2_OBJECT )hThisObject; PSYS_IRA_INTERFACE pIraIf = (PSYS_IRA_INTERFACE )pMyObject->hIraIf; pMyObject->Cancel((ANSC_HANDLE)pMyObject); pMyObject->Reset ((ANSC_HANDLE)pMyObject); if ( pIraIf ) { AnscFreeMemory(pIraIf); } AnscFreeLock (&pMyObject->AccessLock ); AnscCoRemove ((ANSC_HANDLE)pMyObject ); return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:23,
示例3: AnscAsn1FreeOidvoidAnscAsn1FreeOidArray ( ANSC_ASN1_OID** asn1_oid_array, ULONG array_size ){ ULONG i = 0; for ( i = 0; i < array_size; i++ ) { if ( asn1_oid_array[i] ) { AnscAsn1FreeOid(asn1_oid_array[i]); asn1_oid_array[i] = NULL; } } AnscFreeMemory(asn1_oid_array); return;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:23,
示例4: AnscSizeOfStringBOOLDslhVarroIsValidBase64String ( PCHAR pString ){ ULONG length = 0; PUCHAR pNewBuf = NULL; if( pString == NULL) { return TRUE; /* empty string is fine */ } length = AnscSizeOfString(pString); if( length == 0) { return TRUE; /* empty string is fine */ } pNewBuf = AnscBase64Decode ( (PCHAR)pString, &length ); if( pNewBuf == NULL) { return FALSE; } AnscFreeMemory(pNewBuf); return TRUE;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:37,
示例5: DslhCwmpFreeParamDescrANSC_STATUSDslhVareoReset ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PDSLH_VAR_ENTITY_OBJECT pMyObject = (PDSLH_VAR_ENTITY_OBJECT)hThisObject; PDSLH_VAREO_TOKEN_VALUE pTokenValue = (PDSLH_VAREO_TOKEN_VALUE)NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; ULONG i = 0; if ( pMyObject->ParamDescr ) { DslhCwmpFreeParamDescr(pMyObject->ParamDescr); pMyObject->ParamDescr = NULL; } if ( pMyObject->TokenTable ) { pSLinkEntry = AnscQueuePopEntry(pMyObject->TokenTable); while ( pSLinkEntry ) { pTokenValue = ACCESS_DSLH_VAREO_TOKEN_VALUE(pSLinkEntry); pSLinkEntry = AnscQueuePopEntry(pMyObject->TokenTable); DslhVareoFreeTokenValue(pTokenValue); } AnscFreeMemory(pMyObject->TokenTable); pMyObject->TokenTable = NULL; } return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:37,
示例6: AnscFreeMemoryANSC_STATUSAnscAsn1PKCS10BeforeDecodingChild ( ANSC_HANDLE hThisObject, int index, PVOID* ppEncoding ){ PANSC_ASN1_CERTIFICATEREQUEST pThisObject = (PANSC_ASN1_CERTIFICATEREQUEST)hThisObject; if( pThisObject != NULL && index == 0) { /* free the signed data part */ if( pThisObject->pSignedData != NULL && pThisObject->uSignedLength > 0) { AnscFreeMemory(pThisObject->pSignedData); } pThisObject->pSignedData = *ppEncoding; pThisObject->uSignedLength = 0; } return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:24,
示例7: AnscFreeMemoryANSC_STATUSAnscScuoShutdown ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_SIMPLE_CLIENT_UDP_OBJECT pMyObject = (PANSC_SIMPLE_CLIENT_UDP_OBJECT)hThisObject; PANSC_SCUO_WORKER_OBJECT pWorker = (PANSC_SCUO_WORKER_OBJECT )pMyObject->hWorker; pMyObject->Reset((ANSC_HANDLE)pMyObject); if ( pWorker ) { AnscFreeMemory(pWorker); pMyObject->hWorker = (ANSC_HANDLE)NULL; } AnscFreeLock (&pMyObject->OpLock ); AnscCoVer3Shutdown((ANSC_HANDLE)pMyObject); return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:24,
示例8: AnscFreeMemoryANSC_STATUSAnscLpccoImcSetPartyName ( ANSC_HANDLE hThisObject, char* party_name ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; if ( pMyObject->PartyName ) { AnscFreeMemory(pMyObject->PartyName); pMyObject->PartyName = NULL; } if ( party_name ) { pMyObject->PartyName = AnscCloneString(party_name); } return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:24,
示例9: AnscFreeMemoryANSC_STATUSBwrmCpoSetPagePath ( ANSC_HANDLE hThisObject, char* page_path ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBWRM_COOKED_PAGE_OBJECT pMyObject = (PBWRM_COOKED_PAGE_OBJECT)hThisObject; if ( pMyObject->PagePath ) { AnscFreeMemory(pMyObject->PagePath); pMyObject->PagePath = NULL; } if ( page_path ) { pMyObject->PagePath = AnscCloneString(page_path); } return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:24,
示例10: AnscFreeMemoryANSC_STATUSSlapOwoSetLpcPartyName ( ANSC_HANDLE hThisObject, char* party_name ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PSLAP_OBJ_WRAPPER_OBJECT pMyObject = (PSLAP_OBJ_WRAPPER_OBJECT)hThisObject; if ( pMyObject->LpcPartyName ) { AnscFreeMemory(pMyObject->LpcPartyName); pMyObject->LpcPartyName = NULL; } if ( party_name ) { pMyObject->LpcPartyName = AnscCloneString(party_name); } return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:24,
示例11: _ansc_sprintfANSC_STATUSssp_cancel_wifi ( PCCSP_COMPONENT_CFG pStartCfg ){ int nRet = 0; char CrName[256]; char CpName[256]; if( pDslhCpeController == NULL) { return ANSC_STATUS_SUCCESS; } if ( g_Subsystem[0] != 0 ) { _ansc_sprintf(CrName, "%s%s", g_Subsystem, CCSP_DBUS_INTERFACE_CR); _ansc_sprintf(CpName, "%s%s", g_Subsystem, pStartCfg->ComponentName); } else { _ansc_sprintf(CrName, "%s", CCSP_DBUS_INTERFACE_CR); _ansc_sprintf(CpName, "%s", pStartCfg->ComponentName); } /* unregister component */ nRet = CcspBaseIf_unregisterComponent(bus_handle, CrName, CpName ); AnscTrace("unregisterComponent returns %d/n", nRet); pDslhCpeController->Cancel((ANSC_HANDLE)pDslhCpeController); AnscFreeMemory(pDslhCpeController); pDslhCpeController = NULL; return ANSC_STATUS_SUCCESS;}
开发者ID:rdkcmf,项目名称:rdkb-CcspWifiAgent,代码行数:36,
示例12: CcspTraceWarningANSC_STATUSCosaNatRegGetNatInfo ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PCOSA_DATAMODEL_NAT pMyObject = ( PCOSA_DATAMODEL_NAT )hThisObject; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoNat = (PPOAM_IREP_FOLDER_OBJECT )pMyObject->hIrepFolderNat; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoNatPt = (PPOAM_IREP_FOLDER_OBJECT )pMyObject->hIrepFolderNatPt; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoEnumNat = (PPOAM_IREP_FOLDER_OBJECT )NULL; PCOSA_CONTEXT_PMAPPING_LINK_OBJECT pCosaNatContext = NULL; PCOSA_CONTEXT_LINK_OBJECT pCosaNatPtContext = NULL; PCOSA_DML_NAT_PMAPPING pCosaNat = NULL; PCOSA_DML_NAT_PTRIGGER pCosaNatPt = NULL; PSLAP_VARIABLE pSlapVariable = NULL; ULONG ulEntryCount = 0; ULONG ulIndex = 0; ULONG uInstanceNumber = 0; BOOL bNew = FALSE; char* pAliasNat = NULL; char* pFolderName = NULL; CcspTraceWarning(("!!!!!! In CosaNatRegGetNatInfo !!!!!!/n")); if ( !pPoamIrepFoNat || !pPoamIrepFoNatPt ) { CcspTraceWarning(("!!!!!! pPoamIrepFoNat: %p, pPoamIrepFoNatPt: %p !!!!!!/n", pPoamIrepFoNat, pPoamIrepFoNatPt)); return ANSC_STATUS_FAILURE; } /* This is saved structure for nat ***************************************** <Nat> <1> <alias>xxx</> <bNew>false</> </1> <2> <alias>xxx</> <bNew>false</> </2> </Nat> **************************************************** */ /* enumerate Portmapping.{i} */ ulEntryCount = pPoamIrepFoNat->GetFolderCount((ANSC_HANDLE)pPoamIrepFoNat); for ( ulIndex = 0; ulIndex < ulEntryCount; ulIndex++ ) { /* Get i in Portmapping.{i} */ pFolderName = pPoamIrepFoNat->EnumFolder ( (ANSC_HANDLE)pPoamIrepFoNat, ulIndex ); if ( !pFolderName ) { continue; } uInstanceNumber = _ansc_atol(pFolderName); if ( uInstanceNumber == 0 ) { AnscFreeMemory(pFolderName); continue; } pPoamIrepFoEnumNat = pPoamIrepFoNat->GetFolder((ANSC_HANDLE)pPoamIrepFoNat, pFolderName); AnscFreeMemory(pFolderName); if ( !pPoamIrepFoEnumNat ) { continue; } /* Get PortMapping.{i}.Alias value*/ if ( TRUE ) { pSlapVariable = (PSLAP_VARIABLE)pPoamIrepFoEnumNat->GetRecord ( (ANSC_HANDLE)pPoamIrepFoEnumNat, COSA_DML_RR_NAME_NATAlias, NULL ); if ( pSlapVariable ) { pAliasNat = AnscCloneString(pSlapVariable->Variant.varString); SlapFreeVariable(pSlapVariable); } }//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:101,
示例13: AnscFreeMemoryANSC_STATUSStunScoRetryTimerInvoke ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PSTUN_SIMPLE_CLIENT_OBJECT pMyObject = (PSTUN_SIMPLE_CLIENT_OBJECT )hThisObject; PSTUN_SIMPLE_CLIENT_PROPERTY pProperty = (PSTUN_SIMPLE_CLIENT_PROPERTY )&pMyObject->Property; PANSC_TIMER_DESCRIPTOR_OBJECT pRetryTimerObj = (PANSC_TIMER_DESCRIPTOR_OBJECT )pMyObject->hRetryTimerObj; PANSC_SIMPLE_CLIENT_UDP_OBJECT pSimpleClientUdp1 = (PANSC_SIMPLE_CLIENT_UDP_OBJECT)pMyObject->hSimpleClientUdp1; PSTUN_BSM_INTERFACE pStunBsmIf = (PSTUN_BSM_INTERFACE )pMyObject->hStunBsmIf; /* * Reliability is accomplished through client retransmissions. Clients SHOULD retransmit the * request starting with an interval of 100ms, doubling every retransmit until the interval * reaches 1.6s. Retransmissions continue with intervals of 1.6s until a response is received, * or a total of 9 requests have been sent. If no response is received by 1.6 seconds after the * last request has been sent, the client SHOULD consider the transaction to have failed. In * other words, requests would be sent at times 0ms, 100ms, 300ms, 700ms, 1500ms, 3100ms, * 4700ms, 6300ms, and 7900ms. At 9500ms, the client considers the transaction to have failed * if no response has been received. */ if ( pMyObject->SocketState1 == STUN_SCO_SOCKET_STATE_Requesting ) { if ( pMyObject->RetransTime1 >= STUN_MIN_RETRANSMISSION_TIMES ) { pMyObject->ClientState = STUN_SCO_CLIENT_STATE_Idle; pMyObject->SocketState1 = STUN_SCO_SOCKET_STATE_Idle; pMyObject->RetransInterval1 = STUN_MIN_RETRANSMISSION_INTERVAL; pMyObject->RetransTime1 = 0; pMyObject->bMsgIntegrity1 = FALSE; if ( pMyObject->LastSendMsg1 ) { AnscFreeMemory(pMyObject->LastSendMsg1); pMyObject->LastSendMsg1 = NULL; pMyObject->LastMsgSize1 = 0; } if ( pStunBsmIf ) { returnStatus = pStunBsmIf->Notify ( pStunBsmIf->hOwnerContext, STUN_BSM_EVENT_serverUnreachable, (ANSC_HANDLE)NULL ); } return ANSC_STATUS_SUCCESS; } if ( pMyObject->LastSendMsg1 ) { pMyObject->RetransInterval1 = AnscGetMin2(pMyObject->RetransInterval1 * 2, STUN_MAX_RETRANSMISSION_INTERVAL); pMyObject->RetransTime1 += 1; returnStatus = pSimpleClientUdp1->Send2 ( (ANSC_HANDLE)pSimpleClientUdp1, pProperty->ServerAddr.Value, pProperty->ServerPort, pMyObject->LastSendMsg1, pMyObject->LastMsgSize1, (ANSC_HANDLE)NULL ); pRetryTimerObj->SetInterval((ANSC_HANDLE)pRetryTimerObj, pMyObject->RetransInterval1); pRetryTimerObj->Start ((ANSC_HANDLE)pRetryTimerObj); } } return returnStatus;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:77,
示例14: CosaDmlDdnsInit//.........这里部分代码省略......... /* Initialize middle layer */ ulServiceCount = CosaDmlDdnsGetNumberOfServices(NULL); for ( ulIndex = 0; ulIndex < ulServiceCount; ulIndex++ ) { pDdnsService = (PCOSA_DML_DDNS_SERVICE)AnscAllocateMemory(sizeof(COSA_DML_DDNS_SERVICE)); if ( !pDdnsService ) { returnStatus = ANSC_STATUS_RESOURCES; goto EXIT1; } returnStatus = CosaDmlDdnsGetService(NULL, ulIndex, pDdnsService); if ( returnStatus == ANSC_STATUS_SUCCESS ) { pCosaContext = (PCOSA_CONTEXT_LINK_OBJECT)AnscAllocateMemory(sizeof(COSA_CONTEXT_LINK_OBJECT)); if ( !pCosaContext ) { returnStatus = ANSC_STATUS_RESOURCES; goto EXIT2; } if ( pDdnsService->InstanceNumber != 0 ) { pCosaContext->InstanceNumber = pDdnsService->InstanceNumber; if ( pMyObject->ulNextInstance <= pDdnsService->InstanceNumber ) { pMyObject->ulNextInstance = pDdnsService->InstanceNumber + 1; if ( pMyObject->ulNextInstance == 0 ) { pMyObject->ulNextInstance = 1; } } } else { pDdnsService->InstanceNumber = pCosaContext->InstanceNumber = pMyObject->ulNextInstance; pMyObject->ulNextInstance++; if ( pMyObject->ulNextInstance == 0 ) { pMyObject->ulNextInstance = 1; } /* Generate Alias */ _ansc_sprintf(pDdnsService->Alias, "DdnsService%d", pCosaContext->InstanceNumber); returnStatus = CosaDmlDdnsServiceSetValues ( NULL, ulIndex, pCosaContext->InstanceNumber, pDdnsService->Alias ); if ( returnStatus != ANSC_STATUS_SUCCESS ) { CcspTraceWarning(("!!! CosaDmlDdnsServiceSetValues index: %d-- fail !!!/n", ulIndex)); AnscFreeMemory(pDdnsService); AnscFreeMemory(pCosaContext); continue; } } pCosaContext->hContext = (ANSC_HANDLE)pDdnsService; pCosaContext->hParentTable = NULL; pCosaContext->bNew = FALSE; CosaSListPushEntryByInsNum(pListHead, pCosaContext); } } /* Load the newly added but not yet committed entries, if exist */ CosaDdnsRegGetDdnsInfo((ANSC_HANDLE)pMyObject); goto EXIT1;EXIT2: AnscFreeMemory(pDdnsService);EXIT1: AnscFreeMemory(pDdnsCfg); return returnStatus;}
开发者ID:davekimble,项目名称:CcspPandM,代码行数:101,
示例15: whileBOOLDslhVarroIsValidMaskString ( PCHAR pStringValue ){ PANSC_TOKEN_CHAIN pAddrListTokenChain = (PANSC_TOKEN_CHAIN )NULL; PANSC_STRING_TOKEN pAddrStringToken = (PANSC_STRING_TOKEN )NULL; ULONG ulMaskValue = 0; ULONG i = 0; BOOL bIsValid = FALSE; if ( !pStringValue || (AnscSizeOfString(pStringValue) == 0) ) { return TRUE; } if ( pAddrListTokenChain = AnscTcAllocate(pStringValue, ".") ) { if (pAddrListTokenChain->TokensQueue.Depth != 0x4) { goto EXIT; } while ( pAddrStringToken = AnscTcUnlinkToken(pAddrListTokenChain) ) { ulMaskValue = (ulMaskValue<<0x8) + AnscGetStringUlong(pAddrStringToken->Name); AnscFreeMemory(pAddrStringToken); } if ( ! ulMaskValue ) { bIsValid = TRUE; goto EXIT; } for ( i = 0; !(ulMaskValue & 0x1); i++) { ulMaskValue >>= 0x1; } /* Subnet mask shorter than 8 bits is rejected */ if ( i > 24) { goto EXIT; } else if ( (!i && !(~(0x0 ^ ulMaskValue))) /* 255.255.255.255 */ || ! (~( ( (~0x0<<(32-i))) ^ ulMaskValue )) /* Other subnet masks */ ) { bIsValid = TRUE; goto EXIT; } }EXIT: if ( pAddrListTokenChain ) { AnscTcFree((ANSC_HANDLE)pAddrListTokenChain); } return bIsValid;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:67,
示例16: CosaDmlUserGetNumberOfEntriesANSC_STATUSCosaUsersBackendGetUserInfo ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PCOSA_DATAMODEL_USERS pMyObject = (PCOSA_DATAMODEL_USERS)hThisObject; PCOSA_DML_USER pCosaUser = NULL; ULONG clientCount = 0; ULONG count = 0; ULONG ulIndex = 0; PCOSA_CONTEXT_LINK_OBJECT pUserCxtLink = NULL; PCOSA_CONTEXT_LINK_OBJECT pUserCxtLink2 = NULL; PCOSA_CONTEXT_LINK_OBJECT pCxtLink = NULL; BOOL bNeedSave = FALSE; /* Get Users.user.{i} */ clientCount = CosaDmlUserGetNumberOfEntries(NULL); for ( ulIndex = 0; ulIndex < clientCount; ulIndex++ ) { pCosaUser = (PCOSA_DML_USER)AnscAllocateMemory( sizeof(COSA_DML_USER) ); if ( !pCosaUser ) { break; } USERS_USER_SET_DEFAULTVALUE(pCosaUser); pCosaUser->NumOfFailedAttempts=0; returnStatus = CosaDmlUserGetEntry(NULL, ulIndex, pCosaUser); if ( returnStatus != ANSC_STATUS_SUCCESS ) { AnscFreeMemory(pCosaUser); break; } if (ulIndex == 2) { char buff[128]={'/0'}; syscfg_get( NULL, "hash_password_3",buff, sizeof(buff)); if( buff[0] != '/0' && pCosaUser->HashedPassword[0]== '/0') { _ansc_strncpy(pCosaUser->HashedPassword,buff,sizeof(pCosaUser->HashedPassword)); } }#if defined(_COSA_FOR_BCI_) if (ulIndex == 1) { char buff[128]={'/0'}; syscfg_get( NULL, "hash_password_2",buff, sizeof(buff)); if( buff[0] != '/0' && pCosaUser->HashedPassword[0]== '/0') { _ansc_strncpy(pCosaUser->HashedPassword,buff,sizeof(pCosaUser->HashedPassword)); } pCosaUser->LockOutRemainingTime = 0 ; memset(buff,0,sizeof(buff)); syscfg_get( NULL, "PasswordLockoutAttempts", buff, sizeof(buff)); if( atoi ( buff ) != 10 ) { memset(buff,0,sizeof(buff)); sprintf(buff, "%d", 10); syscfg_set(NULL, "PasswordLockoutAttempts", buff) ; syscfg_commit() ; } memset(buff,0,sizeof(buff)); syscfg_get( NULL, "NumOfFailedAttempts_2", buff, sizeof(buff)); if( buff[0] != '/0' ) { pCosaUser->NumOfFailedAttempts = atoi(buff) ; } memset(buff,0,sizeof(buff)); syscfg_get( NULL, "PasswordLoginCounts_2", buff, sizeof(buff)); if( buff[0] != '/0' ) { pCosaUser->LoginCounts = atoi(buff) ; } }#endif pUserCxtLink = (PCOSA_CONTEXT_LINK_OBJECT)AnscAllocateMemory( sizeof(COSA_CONTEXT_LINK_OBJECT) ); if ( !pUserCxtLink ) { AnscFreeMemory(pCosaUser); break; } COSA_CONTEXT_LINK_INITIATION_CONTENT(pUserCxtLink) pUserCxtLink->hContext = (ANSC_HANDLE)pCosaUser; pUserCxtLink->bNew = FALSE; if ( !pCosaUser->InstanceNumber ) { if ( !++pMyObject->maxInstanceOfUser ) { pMyObject->maxInstanceOfUser = 1; } bNeedSave = TRUE; pCosaUser->InstanceNumber = pMyObject->maxInstanceOfUser; pUserCxtLink->InstanceNumber = pCosaUser->InstanceNumber;//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:101,
示例17: AnscTraceFlowANSC_STATUSBbhmDiagipStartDiag ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBBHM_DIAG_IP_PING_OBJECT pMyObject = (PBBHM_DIAG_IP_PING_OBJECT )hThisObject; PDSLH_PING_INFO pDiagInfo = (PDSLH_PING_INFO)pMyObject->hDslhDiagInfo; if ( pMyObject->CheckCanStart((ANSC_HANDLE)pMyObject) ) { AnscTraceFlow(("BbhmDiagipStartDiag -- enter.../n")); pMyObject->SetEnv(pMyObject); pMyObject->ResetProperty((ANSC_HANDLE)pMyObject); /* TODO set source interface name here */ pMyObject->SetSrcIp((ANSC_HANDLE)pMyObject, pDiagInfo->IfAddrName); if ( pMyObject->SetDstIp((ANSC_HANDLE)pMyObject, pDiagInfo->Host) == ANSC_STATUS_SUCCESS) { pMyObject->SetNumPkts((ANSC_HANDLE)pMyObject, pDiagInfo->NumberOfRepetitions); pMyObject->SetPktSize((ANSC_HANDLE)pMyObject, pDiagInfo->DataBlockSize); pMyObject->SetTimeOut((ANSC_HANDLE)pMyObject, pDiagInfo->Timeout); pMyObject->Open(pMyObject); if ( pMyObject->hSendBuffer ) { AnscFreeMemory(pMyObject->hSendBuffer); pMyObject->hSendBuffer = NULL; } pMyObject->hSendBuffer = (PCHAR)AnscAllocateMemory(pDiagInfo->DataBlockSize + sizeof(ICMPV4_HEADER)); if ( !pMyObject->hSendBuffer ) { return ANSC_STATUS_RESOURCES; } returnStatus = pMyObject->SetControl ( (ANSC_HANDLE)pMyObject, BBHM_IP_PING_CONTROL_START ); if ( returnStatus == ANSC_STATUS_SUCCESS ) { BbhmDiageoStartDiag((ANSC_HANDLE)pMyObject); } else { return returnStatus; } } else { pDiagInfo->DiagnosticState = DSLH_DIAG_STATE_TYPE_PING_Error_HostName; } return ANSC_STATUS_SUCCESS; } else { AnscTraceFlow(("BbhmDiagipStartDiag -- query task is running.../n")); return ANSC_STATUS_PENDING; }}
开发者ID:rdkcmf,项目名称:rdkb-TestAndDiagnostic,代码行数:71,
示例18: returnANSC_HANDLEBmc2ReqcoPecGetCookedPage ( ANSC_HANDLE hThisObject, char* page_path ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PBMC2_REQ_CONTROLLER_OBJECT pMyObject = (PBMC2_REQ_CONTROLLER_OBJECT)hThisObject; PBMC2_ENV_CONTROLLER_OBJECT pBmc2EnvController = (PBMC2_ENV_CONTROLLER_OBJECT)pMyObject->hBmc2EnvController; PBMC2_COM_DOMAIN_OBJECT pBmc2ComDomain = (PBMC2_COM_DOMAIN_OBJECT )pMyObject->hBmc2ComDomain; PBMC2_COM_TERMINAL_OBJECT pBmc2ComTerminal = (PBMC2_COM_TERMINAL_OBJECT )pBmc2ComDomain->hBmc2ComTerminal; PBMC2_COM_EXECUTOR_OBJECT pBmc2ComExecutor = (PBMC2_COM_EXECUTOR_OBJECT )pBmc2EnvController->hBmc2ComExecutor; PBWRM_ENV_CONTROLLER_OBJECT pBwrmEnvController = (PBWRM_ENV_CONTROLLER_OBJECT)pBmc2EnvController->hBwrmEnvController; PBWRM_RAM_INTERFACE pBwrmRamIf = (PBWRM_RAM_INTERFACE )pBwrmEnvController->GetBwrmRamIf((ANSC_HANDLE)pBwrmEnvController); char* pRootPath = (char* )pBmc2EnvController->Property.RootPath; PBWRM_COOKED_PAGE_OBJECT pBwrmCookedPage = (PBWRM_COOKED_PAGE_OBJECT )NULL; void* pPageBuffer = (void* )NULL; ULONG ulPageSize = (ULONG )0; /* * The script parsing can take fairly long time, which mandates some sort of page caching * mechanism to be used. The BWRM (BroadWay Web Resource Manager) module is responsible for * file-based page access and page caching. We first try to retrieve the requested page from * the in-memory cache, and only load the page from the underlying storage system if the * requested page is not in the cache. */ returnStatus = pBwrmRamIf->GetCookedPage ( pBwrmRamIf->hOwnerContext, pRootPath, page_path, &pBwrmCookedPage ); if ( returnStatus != ANSC_STATUS_SUCCESS ) { returnStatus = pBwrmRamIf->GetRawPage ( pBwrmRamIf->hOwnerContext, pRootPath, page_path, &pPageBuffer, &ulPageSize ); if ( returnStatus != ANSC_STATUS_SUCCESS ) { return (ANSC_HANDLE)NULL; } else { pBwrmCookedPage = (PBWRM_COOKED_PAGE_OBJECT)pBmc2ComExecutor->PreparePage ( (ANSC_HANDLE)pBmc2ComExecutor, page_path, pPageBuffer, ulPageSize ); } if ( !pBwrmCookedPage ) { AnscFreeMemory(pPageBuffer); return (ANSC_HANDLE)NULL; } else if ( pBmc2EnvController->Property.bCacheScpPages || pBwrmRamIf->IsPageCacheForced(pBwrmRamIf->hOwnerContext, page_path) ) { returnStatus = pBwrmRamIf->AddCookedPage ( pBwrmRamIf->hOwnerContext, pRootPath, page_path, (ANSC_HANDLE)pBwrmCookedPage ); } else { pBwrmCookedPage->SetRootPath ((ANSC_HANDLE)pBwrmCookedPage, pRootPath ); pBwrmCookedPage->SetPagePath ((ANSC_HANDLE)pBwrmCookedPage, page_path ); pBwrmCookedPage->SetTimestamp((ANSC_HANDLE)pBwrmCookedPage, AnscGetTickInSeconds()); } } return (ANSC_HANDLE)pBwrmCookedPage;}
开发者ID:rdkcmf,项目名称:rdkb-CcspCommonLibrary,代码行数:91,
示例19: AnscFreeMemoryANSC_STATUSCosaDdnsRegGetDdnsInfo ( ANSC_HANDLE hThisObject ){ PCOSA_DATAMODEL_DDNS pMyObject = (PCOSA_DATAMODEL_DDNS )hThisObject; PSLIST_HEADER pListHead = (PSLIST_HEADER )&pMyObject->ContextHead; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoDdns = (PPOAM_IREP_FOLDER_OBJECT )pMyObject->hIrepFolderDdns; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoDdnsSp = (PPOAM_IREP_FOLDER_OBJECT )NULL; PCOSA_CONTEXT_LINK_OBJECT pCosaContext = (PCOSA_CONTEXT_LINK_OBJECT)NULL; PCOSA_DML_DDNS_SERVICE pDdnsService = (PCOSA_DML_DDNS_SERVICE )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; PSLAP_VARIABLE pSlapVariable = (PSLAP_VARIABLE )NULL; ULONG ulEntryCount = 0; ULONG ulIndex = 0; ULONG ulInstanceNumber = 0; char* pFolderName = NULL; char* pAlias = NULL; if ( !pPoamIrepFoDdns ) { return ANSC_STATUS_FAILURE; } /* Load the newly added but not yet commited entries */ ulEntryCount = pPoamIrepFoDdns->GetFolderCount((ANSC_HANDLE)pPoamIrepFoDdns); for ( ulIndex = 0; ulIndex < ulEntryCount; ulIndex++ ) { pFolderName = pPoamIrepFoDdns->EnumFolder ( (ANSC_HANDLE)pPoamIrepFoDdns, ulIndex ); if ( !pFolderName ) { continue; } pPoamIrepFoDdnsSp = pPoamIrepFoDdns->GetFolder((ANSC_HANDLE)pPoamIrepFoDdns, pFolderName); AnscFreeMemory(pFolderName); if ( !pPoamIrepFoDdnsSp ) { continue; } if ( TRUE ) { pSlapVariable = (PSLAP_VARIABLE)pPoamIrepFoDdnsSp->GetRecord ( (ANSC_HANDLE)pPoamIrepFoDdnsSp, COSA_DML_RR_NAME_DdnsServiceInsNum, NULL ); if ( pSlapVariable ) { ulInstanceNumber = pSlapVariable->Variant.varUint32; SlapFreeVariable(pSlapVariable); } } if ( TRUE ) { pSlapVariable = (PSLAP_VARIABLE)pPoamIrepFoDdnsSp->GetRecord ( (ANSC_HANDLE)pPoamIrepFoDdnsSp, COSA_DML_RR_NAME_DdnsServiceAlias, NULL ); if ( pSlapVariable ) { pAlias = AnscCloneString(pSlapVariable->Variant.varString); SlapFreeVariable(pSlapVariable); } if ( pAlias == NULL ) { continue; } } pPoamIrepFoDdnsSp->Remove((ANSC_HANDLE)pPoamIrepFoDdnsSp); pCosaContext = (PCOSA_CONTEXT_LINK_OBJECT)AnscAllocateMemory(sizeof(COSA_CONTEXT_LINK_OBJECT)); if ( !pCosaContext ) { AnscFreeMemory(pAlias);//.........这里部分代码省略.........
开发者ID:davekimble,项目名称:CcspPandM,代码行数:101,
示例20: AnscTraceANSC_STATUSAnscBetoSendTask ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_BROKER_ENGINE_TCP_OBJECT pMyObject = (PANSC_BROKER_ENGINE_TCP_OBJECT)hThisObject; ansc_fd_set* pSendSet1 = (ansc_fd_set* )pMyObject->SendSocketSet; xskt_fd_set* pSendSet2 = (xskt_fd_set* )pMyObject->SendSocketSet; PANSC_BROKER_SERVER_TCP_OBJECT pServer = (PANSC_BROKER_SERVER_TCP_OBJECT)pMyObject->hBrokerServer; PANSC_BSTO_WORKER_OBJECT pWorker = (PANSC_BSTO_WORKER_OBJECT )pServer->hWorker; PANSC_BETO_PACKET_OBJECT pPacket = NULL; PANSC_BROKER_SOCKET_TCP_OBJECT pSocket = NULL; PSINGLE_LINK_ENTRY pSLinkEntry = NULL; BOOL bSendable = FALSE; int s_result = 0; int s_error = 0; AnscTrace("AnscBetoSendTask is activated ...!/n"); /* * As a scalable server implemention, we shall accept as many incoming client connections as * possible and can only be limited by the system resources. Once the listening socket becomes * readable, which means an incoming connection attempt has arrived. We create a new socket * object and associate it with the client. This is a repeated process until the socket owner * closes the socket. */ while ( pMyObject->bStarted ) { AnscAcquireLock(&pMyObject->PacketQueueLock); pSLinkEntry = AnscQueuePopEntry(&pMyObject->PacketQueue); AnscReleaseLock(&pMyObject->PacketQueueLock); if ( !pSLinkEntry ) { continue; } else { pPacket = ACCESS_ANSC_BETO_PACKET_OBJECT(pSLinkEntry); pSocket = (PANSC_BROKER_SOCKET_TCP_OBJECT)pPacket->hSocket; } #if !defined(_ANSC_KERNEL) || !defined(_ANSC_LINUX) AnscAcquireLock(&pMyObject->SendSocketSetLock); bSendable = (pServer->Mode & ANSC_BSTO_MODE_XSOCKET)? XSKT_SOCKET_FD_ISSET(pSocket->Socket, pSendSet2) : ANSC_SOCKET_FD_ISSET(pSocket->Socket, pSendSet1); AnscReleaseLock(&pMyObject->SendSocketSetLock); if ( !bSendable ) { returnStatus = pWorker->SendComplete ( pWorker->hWorkerContext, (ANSC_HANDLE)pSocket, pPacket->hWorkerReserved, ANSC_STATUS_FAILURE ); AnscFreeMemory(pPacket); continue; } #endif if ( pServer->Mode & ANSC_BSTO_MODE_XSOCKET ) { s_result = _xskt_send(((XSKT_SOCKET)pSocket->Socket), pPacket->PacketBuffer, (int)pPacket->PacketSize, 0); } else { s_result = _ansc_send(pSocket->Socket, pPacket->PacketBuffer, (int)pPacket->PacketSize, 0); } if ( ((s_result == XSKT_SOCKET_ERROR) && (pServer->Mode & ANSC_BSTO_MODE_XSOCKET)) || ((s_result == ANSC_SOCKET_ERROR) && !(pServer->Mode & ANSC_BSTO_MODE_XSOCKET)) ) { s_error = (pServer->Mode & ANSC_BSTO_MODE_XSOCKET)? _xskt_get_last_error() : _ansc_get_last_error(); returnStatus = pWorker->SendComplete ( pWorker->hWorkerContext, (ANSC_HANDLE)pSocket, pPacket->hWorkerReserved, ANSC_STATUS_FAILURE ); if ( pServer->Mode & ANSC_BSTO_MODE_AUTO_CLOSE ) { pMyObject->DelSocket((ANSC_HANDLE)pMyObject, (ANSC_HANDLE)pSocket); } } else { returnStatus = pWorker->SendComplete ( pWorker->hWorkerContext,//.........这里部分代码省略.........
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:101,
示例21: AnscTrace/********************************************************************** prototype: BOOL CcspCrLoadDeviceProfile ( ANSC_HANDLE hCcspCr ); description: This function is called to load device profile for CR. argument: ANSC_HANDLE hCcspCr the handle of CCSP CR component; return: Succeeded or not;**********************************************************************/BOOLCcspCrLoadDeviceProfile ( ANSC_HANDLE hCcspCr ){ PCCSP_CR_MANAGER_OBJECT pMyObject = (PCCSP_CR_MANAGER_OBJECT)hCcspCr; PCCSP_NAMESPACE_MGR_OBJECT pNSMgr = (PCCSP_NAMESPACE_MGR_OBJECT)pMyObject->hCcspNamespaceMgr; ANSC_HANDLE pFileHandle = NULL; char* pXMLContent = NULL; char* pBackContent = NULL; ULONG uXMLLength = 0; PANSC_XML_DOM_NODE_OBJECT pXmlNode = (PANSC_XML_DOM_NODE_OBJECT)NULL; PANSC_XML_DOM_NODE_OBJECT pListNode = (PANSC_XML_DOM_NODE_OBJECT)NULL; PANSC_XML_DOM_NODE_OBJECT pChildNode = (PANSC_XML_DOM_NODE_OBJECT)NULL; BOOL bStatus = TRUE; ULONG uFileLength = 0; ULONG uBufferSize = 0; char buffer[512] = { 0 }; ULONG uLength = 511; PCCSP_COMPONENT_INFO pCompInfo = (PCCSP_COMPONENT_INFO)NULL; /* load from the file */ pFileHandle = AnscOpenFile ( CCSP_CR_DEVICE_PROFILE_XML_FILE, ANSC_FILE_O_BINARY | ANSC_FILE_O_RDONLY, ANSC_FILE_S_IREAD ); if( pFileHandle == NULL) { AnscTrace("Failed to load the file : '%s'/n", CCSP_CR_DEVICE_PROFILE_XML_FILE); return FALSE; } uFileLength = AnscGetFileSize( pFileHandle); pXMLContent = (char*)AnscAllocateMemory( uFileLength + 8); if( pXMLContent == NULL) { return FALSE; } uBufferSize = uFileLength + 8; if( AnscReadFile( pFileHandle, pXMLContent, &uBufferSize) != ANSC_STATUS_SUCCESS) { AnscFreeMemory(pXMLContent); return FALSE; } if( pFileHandle != NULL) { AnscCloseFile(pFileHandle); } /* parse the XML content */ pBackContent = pXMLContent; pXmlNode = (PANSC_XML_DOM_NODE_OBJECT) AnscXmlDomParseString((ANSC_HANDLE)NULL, (PCHAR*)&pXMLContent, uBufferSize); AnscFreeMemory(pBackContent); if( pXmlNode == NULL) { AnscTraceWarning(("Failed to parse the CR profile file./n")); return FALSE; } /* load CR name */ pChildNode = (PANSC_XML_DOM_NODE_OBJECT) AnscXmlDomNodeGetChildByName(pXmlNode, CCSP_CR_XML_NODE_crName); //.........这里部分代码省略.........
开发者ID:davekimble,项目名称:CcspCr,代码行数:101,
示例22: AnscFreeMemoryANSC_STATUSStunScoRemove ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PSTUN_SIMPLE_CLIENT_OBJECT pMyObject = (PSTUN_SIMPLE_CLIENT_OBJECT )hThisObject; PANSC_TIMER_DESCRIPTOR_OBJECT pStageTimerObj = (PANSC_TIMER_DESCRIPTOR_OBJECT )pMyObject->hStageTimerObj; PANSC_TDO_CLIENT_OBJECT pStageTimerIf = (PANSC_TDO_CLIENT_OBJECT )pMyObject->hStageTimerIf; PANSC_TIMER_DESCRIPTOR_OBJECT pRetryTimerObj = (PANSC_TIMER_DESCRIPTOR_OBJECT )pMyObject->hRetryTimerObj; PANSC_TDO_CLIENT_OBJECT pRetryTimerIf = (PANSC_TDO_CLIENT_OBJECT )pMyObject->hRetryTimerIf; PANSC_TIMER_DESCRIPTOR_OBJECT pProbeTimerObj = (PANSC_TIMER_DESCRIPTOR_OBJECT )pMyObject->hProbeTimerObj; PANSC_TDO_CLIENT_OBJECT pProbeTimerIf = (PANSC_TDO_CLIENT_OBJECT )pMyObject->hProbeTimerIf; PANSC_SIMPLE_CLIENT_UDP_OBJECT pSimpleClientUdp1 = (PANSC_SIMPLE_CLIENT_UDP_OBJECT)pMyObject->hSimpleClientUdp1; PANSC_SCUO_WORKER_OBJECT pClientUdpWorker1 = (PANSC_SCUO_WORKER_OBJECT )pMyObject->hClientUdpWorker1; PANSC_SIMPLE_CLIENT_UDP_OBJECT pSimpleClientUdpA = (PANSC_SIMPLE_CLIENT_UDP_OBJECT)pMyObject->hSimpleClientUdpA; PANSC_SCUO_WORKER_OBJECT pClientUdpWorkerA = (PANSC_SCUO_WORKER_OBJECT )pMyObject->hClientUdpWorkerA; PANSC_SIMPLE_CLIENT_UDP_OBJECT pSimpleClientUdpB = (PANSC_SIMPLE_CLIENT_UDP_OBJECT)pMyObject->hSimpleClientUdpB; PANSC_SCUO_WORKER_OBJECT pClientUdpWorkerB = (PANSC_SCUO_WORKER_OBJECT )pMyObject->hClientUdpWorkerB; pMyObject->Cancel((ANSC_HANDLE)pMyObject); if ( pStageTimerObj ) { pStageTimerObj->Remove((ANSC_HANDLE)pStageTimerObj); } if ( pStageTimerIf ) { AnscFreeMemory(pStageTimerIf); } if ( pRetryTimerObj ) { pRetryTimerObj->Remove((ANSC_HANDLE)pRetryTimerObj); } if ( pRetryTimerIf ) { AnscFreeMemory(pRetryTimerIf); } if ( pProbeTimerObj ) { pProbeTimerObj->Remove((ANSC_HANDLE)pProbeTimerObj); } if ( pProbeTimerIf ) { AnscFreeMemory(pProbeTimerIf); } if ( pSimpleClientUdp1 ) { pSimpleClientUdp1->Remove((ANSC_HANDLE)pSimpleClientUdp1); pMyObject->hSimpleClientUdp1 = (ANSC_HANDLE)NULL; } if ( pClientUdpWorker1 ) { AnscFreeMemory(pClientUdpWorker1); pMyObject->hClientUdpWorker1 = (ANSC_HANDLE)NULL; } if ( pSimpleClientUdpA ) { pSimpleClientUdpA->Remove((ANSC_HANDLE)pSimpleClientUdpA); pMyObject->hSimpleClientUdpA = (ANSC_HANDLE)NULL; } if ( pClientUdpWorkerA ) { AnscFreeMemory(pClientUdpWorkerA); pMyObject->hClientUdpWorkerA = (ANSC_HANDLE)NULL; } if ( pSimpleClientUdpB ) { pSimpleClientUdpB->Remove((ANSC_HANDLE)pSimpleClientUdpB); pMyObject->hSimpleClientUdpB = (ANSC_HANDLE)NULL; } if ( pClientUdpWorkerB ) { AnscFreeMemory(pClientUdpWorkerB); pMyObject->hClientUdpWorkerB = (ANSC_HANDLE)NULL; } AnscFreeEvent(&pMyObject->SocketEventA); AnscCoRemove ((ANSC_HANDLE)pMyObject ); return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:100,
示例23: SlapFreeVariableANSC_STATUSCosaUsersRegGetUserInfo ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PCOSA_DATAMODEL_USERS pMyObject = ( PCOSA_DATAMODEL_USERS )hThisObject; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoUser = (PPOAM_IREP_FOLDER_OBJECT )pMyObject->hIrepFolderUser; PPOAM_IREP_FOLDER_OBJECT pPoamIrepFoEnumUser = (PPOAM_IREP_FOLDER_OBJECT )NULL; PCOSA_CONTEXT_LINK_OBJECT pCosaUserContext = NULL; PCOSA_DML_USER pCosaUser = NULL; PSLAP_VARIABLE pSlapVariable = NULL; ULONG ulEntryCount = 0; ULONG ulIndex = 0; ULONG uInstanceNumber = 0; BOOL bNew = FALSE; char* pAliasUser = NULL; char* pFolderName = NULL; if ( !pPoamIrepFoUser ) { return ANSC_STATUS_FAILURE; } /* This is saved structure for user ***************************************** <User> <NextInstanceNumber> xxx </> <1> <alias>xxx</> <bNew>false</> </1> <2> <alias>xxx</> <bNew>false</> </2> </User> **************************************************** */ /* Get Maximum number */ if ( TRUE ) { pSlapVariable = (PSLAP_VARIABLE)pPoamIrepFoUser->GetRecord ( (ANSC_HANDLE)pPoamIrepFoUser, COSA_DML_RR_NAME_UserNextInsNunmber, NULL ); if ( pSlapVariable ) { pMyObject->maxInstanceOfUser = pSlapVariable->Variant.varUint32; SlapFreeVariable(pSlapVariable); } } /* enumerate user.{i} */ ulEntryCount = pPoamIrepFoUser->GetFolderCount((ANSC_HANDLE)pPoamIrepFoUser); for ( ulIndex = 0; ulIndex < ulEntryCount; ulIndex++ ) { /* Get i in user.{i} */ pFolderName = pPoamIrepFoUser->EnumFolder ( (ANSC_HANDLE)pPoamIrepFoUser, ulIndex ); if ( !pFolderName ) { continue; } uInstanceNumber = _ansc_atol(pFolderName); if ( uInstanceNumber == 0 ) { AnscFreeMemory(pFolderName); continue; } pPoamIrepFoEnumUser = pPoamIrepFoUser->GetFolder((ANSC_HANDLE)pPoamIrepFoUser, pFolderName); AnscFreeMemory(pFolderName); if ( !pPoamIrepFoEnumUser ) { continue; } /* Get user.{i}.Username value*/ if ( TRUE ) {//.........这里部分代码省略.........
开发者ID:rdkcmf,项目名称:rdkb-CcspPandM,代码行数:101,
示例24: whileANSC_STATUSHttpSmpoParseUrlList ( ANSC_HANDLE hHttpSmpo, PVOID buffer, ULONG ulSize, PULONG pulUrlCount, PANSC_HANDLE phUrlArray ){ PHTTP_SIMPLE_MSG_PARSER pMyObject = (PHTTP_SIMPLE_MSG_PARSER)hHttpSmpo; PHTTP_REQUEST_URI *pUrlArray = (PHTTP_REQUEST_URI *)phUrlArray; PHTTP_REQUEST_URI pRequestUri; PUCHAR pUri = buffer; PUCHAR pLast = pUri + ulSize - 1; PUCHAR pNext; ULONG ulUriLen; ULONG ulUrlCount = 0; ULONG ulMaxCount = pulUrlCount ? *pulUrlCount : 0; BOOL bSucc; if (!buffer || ulSize == 0) { return ANSC_STATUS_BAD_PARAMETER; } while (pUri && pUri < pLast && ulUrlCount < ulMaxCount) { pUri = _ansc_memchr(pUri, HTTP_SMPO_CHAR_LESS, pLast - pUri + 1); if (pUri) { pUri ++; pNext = _ansc_memchr(pUri, HTTP_SMPO_CHAR_LARGE, pLast - pUri + 1); if (!pNext) { break; } ulUriLen = pNext - pUri; if (ulUriLen != 0) { pRequestUri = (PHTTP_REQUEST_URI)AnscAllocateMemory(sizeof(HTTP_REQUEST_URI)); if (!pRequestUri) { break; } bSucc = HttpSmpoUtilParseRquestLineUri ( hHttpSmpo, (ANSC_HANDLE)pRequestUri, pUri, ulUriLen ); if (!bSucc) { AnscFreeMemory(pRequestUri); } else { pUrlArray[ulUrlCount ++] = pRequestUri; } } pUri = pNext + 1; } } if (pulUrlCount) { *pulUrlCount = ulUrlCount; } return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:81,
示例25: AnscAcquireLockANSC_STATUSAnscLpccoConnTimerInvoke ( ANSC_HANDLE hThisObject ){ ANSC_STATUS returnStatus = ANSC_STATUS_SUCCESS; PANSC_LPC_CONNECTOR_OBJECT pMyObject = (PANSC_LPC_CONNECTOR_OBJECT)hThisObject; PANSC_CPC_INTERFACE pAnscCpcIf = (PANSC_CPC_INTERFACE )pMyObject->hAnscCpcIf; PANSC_LPC_PARTY_ADDR pPartyAddr = (PANSC_LPC_PARTY_ADDR )NULL; PSINGLE_LINK_ENTRY pSLinkEntry = (PSINGLE_LINK_ENTRY )NULL; ULONG i = 0; if ( !pMyObject->bActive ) { return ANSC_STATUS_SUCCESS; } AnscAcquireLock(&pMyObject->PartyTableLock); for ( i = 0; i < ANSC_LPCCO_PARTY_TABLE_SIZE; i++ ) { pSLinkEntry = AnscQueueGetFirstEntry(&pMyObject->PartyTable[i]); while ( pSLinkEntry ) { pPartyAddr = ACCESS_ANSC_LPC_PARTY_ADDR(pSLinkEntry); pSLinkEntry = AnscQueueGetNextEntry(pSLinkEntry); if ( pPartyAddr->Timestamp == 0 ) { continue; } else if ( (pPartyAddr->PartyState & ANSC_LPC_PARTY_STATE_connectedIn ) || (pPartyAddr->PartyState & ANSC_LPC_PARTY_STATE_connectedOut) ) { continue; } else if ( pPartyAddr->PartyType == ANSC_LPC_PARTY_TYPE_manager ) { if ( (pMyObject->LpcOpmode == ANSC_LPC_OPMODE_CLIENT) && (pMyObject->bConnected == TRUE ) ) { pMyObject->bConnected = FALSE; } continue; } else if ( pPartyAddr->PartyType != ANSC_LPC_PARTY_TYPE_client ) { continue; } else if ( pPartyAddr->RefCount > 0 ) { continue; } AnscQueuePopEntryByLink(&pMyObject->PartyTable[i], &pPartyAddr->Linkage); if ( TRUE ) { returnStatus = pAnscCpcIf->NotifyEvent ( pAnscCpcIf->hOwnerContext, ANSC_CPC_EVENT_DISCONNECTED, (ANSC_HANDLE)pPartyAddr ); } AnscFreeMemory(pPartyAddr); } } AnscReleaseLock(&pMyObject->PartyTableLock); if ( (pMyObject->LpcOpmode == ANSC_LPC_OPMODE_CLIENT) && (pMyObject->bConnected == FALSE ) ) { returnStatus = pMyObject->ConnectToManager((ANSC_HANDLE)pMyObject); } return ANSC_STATUS_SUCCESS;}
开发者ID:davekimble,项目名称:CcspCommonLibrary,代码行数:84,
注:本文中的AnscFreeMemory函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AnscReleaseLock函数代码示例 C++ AnscEqualString函数代码示例 |