| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676 |
- #include <dlfcn.h>
- #include <cstring>
- #include <algorithm>
- #include <unistd.h>
- #include <sys/time.h>
- #include "common_api.h"
- #include "RawCircleBuff.h"
- #include "SCF.h"
- SCFBuffer::SCFBuffer() {
- m_CurPacketIdx = 0;
- m_pPacket[0] = (SCFPacket*)MallocSCFPacket();
- m_pPacket[1] = (SCFPacket*)MallocSCFPacket();
- }
- SCFBuffer::~SCFBuffer() {
- ReleaseSCFPacket(m_pPacket[0]);
- ReleaseSCFPacket(m_pPacket[1]);
- }
- bool SCFBuffer::SetBuff(uint32_t Len) {
- bool ret = true;
- ret &= m_pPacket[0]->SetBuffLen(Len);
- ret &= m_pPacket[1]->SetBuffLen(Len);
- return ret;
- }
- const char* SCFBuffer::GetBuff() {
- return *m_pPacket[m_CurPacketIdx];
- }
- uint32_t SCFBuffer::GetPacketLen() {
- return m_pPacket[m_CurPacketIdx]->GetPacketLen();
- }
- int SCFBuffer::Add(const char* data, uint32_t len) {
- return m_pPacket[m_CurPacketIdx]->AddTail(data, len);
- }
- int SCFBuffer::Del(uint32_t len) {
- uint32_t Length = m_pPacket[m_CurPacketIdx]->GetPacketLen();
- if (Length == len) {
- m_pPacket[m_CurPacketIdx]->SetPacketLen(0);
- return SCF_SUCCEED;
- }
- else if (Length < len) {
- m_pPacket[m_CurPacketIdx]->SetPacketLen(0);
- return SCF_OVERFLOW;
- }
- const char* pOrg = *m_pPacket[m_CurPacketIdx];
- const char* pOrgLeft = &pOrg[len];
- uint32_t NextIdx = (m_CurPacketIdx + 1) % 2;
- m_CurPacketIdx = NextIdx;
- return m_pPacket[NextIdx]->SetPacket(pOrgLeft, Length - len);
- }
- void SCFBuffer::ClearData() {
- m_pPacket[m_CurPacketIdx]->SetPacketLen(0);
- }
- SCFPacket::SCFPacket() : m_PacketLength(0) {
- m_PacketBuff = new char[4096];
- m_PacketBuffLen = m_PacketBuff ? 4096 : 0;
- }
- SCFPacket::~SCFPacket() {
- delete[] m_PacketBuff;
- }
- SCFPacket::SCFPacket(char* pData, uint32_t Length) {
- if (pData && Length != 0) {
- m_PacketBuff = new char[Length + 1];
- if (m_PacketBuff) {
- m_PacketLength = Length;
- m_PacketBuffLen = Length + 1;
- memcpy(m_PacketBuff, pData, Length);
- m_PacketBuff[Length] = 0;
- }
- else {
- m_PacketBuff = nullptr;
- m_PacketLength = 0;
- m_PacketBuffLen = 0;
- }
- }
- else {
- m_PacketBuff = nullptr;
- m_PacketLength = 0;
- m_PacketBuffLen = 0;
- }
- }
- bool SCFPacket::ReAlloc(uint32_t BaseLen) {
- // 添加内存上限检查
- const uint32_t MAX_ALLOWED_SIZE = 1024 * 1024 * 100; // 100MB上限
- if (BaseLen > MAX_ALLOWED_SIZE) {
- return false;
- }
- uint32_t newSize = std::min(BaseLen + 1024 * 1024, MAX_ALLOWED_SIZE);
- char* temp = new (std::nothrow) char[newSize]; // 使用nothrow避免异常
- if (!temp) {
- return false;
- }
- // 初始化新内存
- memset(temp, 0, newSize);
- if (m_PacketBuff) {
- // 只复制有效数据
- uint32_t copyLen = std::min(m_PacketLength, newSize);
- if (copyLen > 0) {
- memcpy(temp, m_PacketBuff, copyLen);
- }
- delete[] m_PacketBuff;
- m_PacketLength = copyLen;
- }
- m_PacketBuff = temp;
- m_PacketBuffLen = newSize;
- return true;
- }
- bool SCFPacket::SetBuffLen(uint32_t Len) {
- if (m_PacketBuffLen <= Len) {
- return ReAlloc(Len);
- }
- return true;
- }
- SCFPacket& SCFPacket::operator = (const SCFPacket& tValue) {
- // Implementation needed
- return *this;
- }
- int SCFPacket::SetPacket(const char* pData, uint32_t Length) {
- if (Length >= m_PacketBuffLen) {
- if (!ReAlloc(Length)) return SCF_NOMEMORY;
- }
- memcpy(m_PacketBuff, pData, Length);
- m_PacketLength = Length;
- return m_PacketLength;
- }
- int SCFPacket::AddTail(const char* pData, uint32_t Length) {
- if (!pData) return SCF_PARAMETER_ERR;
- if (m_PacketBuffLen <= (m_PacketLength + Length)) {
- if (!ReAlloc(m_PacketLength + Length)) return SCF_NOMEMORY;
- }
- memcpy(&m_PacketBuff[m_PacketLength], pData, Length);
- m_PacketLength += Length;
- return m_PacketLength;
- }
- void SCFPacket::SetPacketLen(uint32_t Len) {
- m_PacketLength = Len;
- }
- uint32_t SCFPacket::GetPacketLen() {
- return m_PacketLength;
- }
- uint32_t SCFPacket::GetBuffLen() {
- return m_PacketBuffLen;
- }
- SCFPacket::operator char* () {
- return m_PacketBuff;
- }
- int SCFPacket::GetPacket(char* pData, uint32_t Length) {
- if (m_PacketLength > 0) {
- if (m_PacketLength > Length) return SCF_OVERFLOW;
- memcpy(pData, m_PacketBuff, m_PacketLength);
- return m_PacketLength;
- }
- return SCF_NOPACKET;
- }
- void* MallocSCFPacket() {
- return new SCFPacket();
- }
- void ReleaseSCFPacket(void* pObj) {
- delete static_cast<SCFPacket*>(pObj);
- }
- SCF::SCF() {
- m_pTransferBuffer = nullptr;
- m_pRtoNBuffer = nullptr;
- m_pNotifybuffer = nullptr;
- m_pReceivebuffer = nullptr;
- m_hNotifyhandle = LinuxEvent::CreateEvent(LinuxEvent::AUTO_RESET,false);
- m_hReceivehandle = LinuxEvent::CreateEvent(LinuxEvent::AUTO_RESET, false);
- MaxComLen = SCF_MAX_LIMITED_BUFF_SIZE;
- NormalPackLen = 4096;
- ReadWaitTime = 20000;
- m_pTransferBuffer = (SCFPacket*)MallocSCFPacket();
- m_pRtoNBuffer = (SCFPacket*)MallocSCFPacket();
- if (!m_pTransferBuffer || !m_pRtoNBuffer) {
- // 清理已分配的资源
- if (m_pTransferBuffer) {
- ReleaseSCFPacket(m_pTransferBuffer);
- m_pTransferBuffer = nullptr;
- }
- if (m_pRtoNBuffer) {
- ReleaseSCFPacket(m_pRtoNBuffer);
- m_pRtoNBuffer = nullptr;
- }
- return;
- }
- m_pNotifybuffer = new CircleBuff();
- m_pReceivebuffer = new CircleBuff();
- if (!m_pNotifybuffer || !m_pReceivebuffer) {
- // 清理已分配的资源
- if (m_pNotifybuffer) {
- delete static_cast<CircleBuff*>(m_pNotifybuffer);
- m_pNotifybuffer = nullptr;
- }
- if (m_pReceivebuffer) {
- delete static_cast<CircleBuff*>(m_pReceivebuffer);
- m_pReceivebuffer = nullptr;
- }
- return;
- }
- SetBuffersize(NormalPackLen, MaxComLen);
- m_LibHandle = nullptr;
- }
- SCF::~SCF() {
- StopSCFServer();
- if (m_pRtoNBuffer) {
- ReleaseSCFPacket(m_pRtoNBuffer);
- m_pRtoNBuffer = nullptr;
- }
- if (m_pTransferBuffer) {
- ReleaseSCFPacket(m_pTransferBuffer);
- m_pTransferBuffer = nullptr;
- }
- if (m_pNotifybuffer) {
- delete static_cast<CircleBuff*>(m_pNotifybuffer);
- m_pNotifybuffer = nullptr;
- }
- if (m_pReceivebuffer) {
- delete static_cast<CircleBuff*>(m_pReceivebuffer);
- m_pReceivebuffer = nullptr;
- }
- }
- void SCF::SetBuffersize(uint32_t NormalPackSize, uint32_t MaxBuffLimit) {
- MaxComLen = MaxBuffLimit;
- NormalPackLen = NormalPackSize;
- m_RawBuffer.SetBuff(NormalPackLen);
- m_pTransferBuffer->SetBuffLen(NormalPackLen);
- m_pRtoNBuffer->SetBuffLen(NormalPackLen);
- static_cast<CircleBuff*>(m_pNotifybuffer)->SetBuffMaxLimit(MaxComLen);
- static_cast<CircleBuff*>(m_pReceivebuffer)->SetBuffMaxLimit(MaxComLen);
- }
- void SCF::InitSCF(const char* pLogFileName) {
- // Linux日志初始化
- }
- const char* SCF::GetConnectionType() {
- return nullptr;
- }
- ResDataObject SCF::GetConnectionAttributes() {
- return m_ConnectionParams;
- }
- bool SCF::SetSourceAttribute(ResDataObject& Sourceprameters) {
- return false;
- }
- int SCF::Connect(ResDataObject& Connectprameters, PacketParser callback,
- SCF_TRANSFERTYPE TransferType, uint32_t CommunicateTimeout) {
- if (TransferType == SCF_PACKET_TRANSFER && callback == nullptr) {
- return SCF_PARAMETER_ERR;
- }
- m_TransferType = TransferType;
- if (StartSCFServer()) {
- m_CommunicateTimeout = CommunicateTimeout;
- m_pPacketParser = callback;
- m_ConnectionParams = Connectprameters;
- return SCF_SUCCEED;
- }
- return SCF_FAILED;
- }
- void SCF::Disconnect() {
- StopSCFServer();
- m_pPacketParser = nullptr;
- m_ConnectionParams.clear();
- }
- bool SCF::isConnected() {
- return false;
- }
- bool SCF::StartSCFServer() {
- if (m_TransferType == SCF_PACKET_TRANSFER) {
- return StartThread();
- }
- return true;
- }
- void SCF::StopSCFServer() {
- StopThread();
- }
- int SCF::ProcessCmd(const char* data, int datalength) {
- if (!data || datalength <= 0) {
- return SCF_PARAMETER_ERR;
- }
- int bret = 0;
- uint32_t stop = 0;
- PACKET_RET ret = PACKET_ISPACKET;
- m_RawBuffer.Thread_Lock();
- bret = m_RawBuffer.Add(data, datalength);
- if (bret < 0) {
- m_RawBuffer.Thread_UnLock();
- return bret;
- }
- if (!m_pPacketParser) {
- m_RawBuffer.Thread_UnLock();
- return SCF_FAILED;
- }
- while (((ret == PACKET_ISPACKET) || (ret == PACKET_USELESS)) && (m_RawBuffer.GetPacketLen() > 0)) {
- ret = m_pPacketParser(m_RawBuffer.GetBuff(), m_RawBuffer.GetPacketLen(), stop);
- if (stop > m_RawBuffer.GetPacketLen() * 10) {
- // 防止异常大的stop值导致问题
- m_RawBuffer.ClearData();
- m_RawBuffer.Thread_UnLock();
- return SCF_OVERFLOW;
- }
- if (ret == PACKET_ISPACKET) {
- if (stop > 0) {
- if (stop > m_RawBuffer.GetPacketLen()) {
- m_RawBuffer.ClearData();
- m_RawBuffer.Thread_UnLock();
- return 0;
- }
- uint32_t result = SCFLock(0);
- if (result == WAIT_OBJECT_0) {
- if (m_pNotifybuffer) {
- uint32_t push_res = static_cast<CircleBuff*>(m_pNotifybuffer)->Push(m_RawBuffer.GetBuff(), stop);
- if (push_res == 0) {
- m_RawBuffer.Thread_UnLock();
- SCFUnLock();
- return SCF_NOMEMORY;
- }
- SCFUnLock();
- m_hNotifyhandle->SetEvent();
- }
- }
- else {
- if (m_pReceivebuffer) {
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_Lock();
- if (static_cast<CircleBuff*>(m_pReceivebuffer)->Push(m_RawBuffer.GetBuff(), stop) == 0) {
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_UnLock();
- m_RawBuffer.Thread_UnLock();
- return SCF_NOMEMORY;
- }
- m_hReceivehandle->SetEvent();
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_UnLock();
- }
- }
- m_RawBuffer.Del(stop);
- }
- else {
- // 错误处理
- m_RawBuffer.ClearData();
- }
- }
- else if (ret == PACKET_USELESS) {
- if (stop > 0) {
- if (stop > m_RawBuffer.GetPacketLen()) {
- m_RawBuffer.ClearData();
- m_RawBuffer.Thread_UnLock();
- return 0;
- }
- m_RawBuffer.Del(stop);
- }
- else {
- m_RawBuffer.ClearData();
- }
- }
- }
- m_RawBuffer.Thread_UnLock();
- return bret;
- }
- int SCF::ReceivetoNotify() {
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_Lock();
- while (static_cast<CircleBuff*>(m_pReceivebuffer)->GetPacketCount()) {
- uint32_t packetLen = static_cast<CircleBuff*>(m_pReceivebuffer)->GetFrontPacketSize();
- if (m_pTransferBuffer->SetBuffLen(packetLen)) {
- int ret = static_cast<CircleBuff*>(m_pReceivebuffer)->Pop((char*)(*m_pTransferBuffer), m_pTransferBuffer->GetBuffLen());
- if (ret > 0) {
- m_pTransferBuffer->SetPacketLen(ret);
- ret = static_cast<CircleBuff*>(m_pNotifybuffer)->Push((char*)(*m_pTransferBuffer), m_pTransferBuffer->GetPacketLen());
- if (ret == -1) {
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_UnLock();
- return SCF_NOMEMORY;
- }
- m_hNotifyhandle->SetEvent();
- }
- }
- else {
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_UnLock();
- return SCF_NOMEMORY;
- }
- }
- static_cast<CircleBuff*>(m_pReceivebuffer)->Thread_UnLock();
- return SCF_SUCCEED;
- }
- int SCF::ReceivetoNotify_Ex()
- {
- ((CircleBuff*)m_pReceivebuffer)->Thread_Lock();
- m_hReceivehandle->ResetEvent();
- while (((CircleBuff*)m_pReceivebuffer)->GetPacketCount())
- {
- DWORD packetLen = ((CircleBuff*)m_pReceivebuffer)->GetFrontPacketSize();
- if (m_pRtoNBuffer->SetBuffLen(packetLen))
- {
- int ret = ((CircleBuff*)m_pReceivebuffer)->Pop((char*)(*m_pRtoNBuffer), m_pRtoNBuffer->GetBuffLen());
- if (ret > 0)
- {
- //copy it
- m_pRtoNBuffer->SetPacketLen((DWORD)ret);
- ret = ((CircleBuff*)m_pNotifybuffer)->Push((char*)(*m_pRtoNBuffer), m_pRtoNBuffer->GetPacketLen());
- if (ret == (DWORD)-1)
- {
- ((CircleBuff*)m_pReceivebuffer)->Thread_UnLock();
- //PRINTA_ERROR(m_pSCFLogger, "No memory for push Notify ");
- return SCF_NOMEMORY;
- }
- m_hNotifyhandle->SetEvent();
- }
- //ret == 0,ignore it
- //ret == -1,not gonna happen
- }
- else
- {
- ((CircleBuff*)m_pReceivebuffer)->Thread_UnLock();
- //PRINTA_ERROR(m_pSCFLogger, "No memory for push Notify ");
- return SCF_NOMEMORY;
- }
- }
- ((CircleBuff*)m_pReceivebuffer)->Thread_UnLock();
- return SCF_SUCCEED;
- }
- int SCF::WritetoNotify(const char* pPacket, int length) {
- uint32_t ret = static_cast<CircleBuff*>(m_pNotifybuffer)->Push(pPacket, length);
- if (ret == (uint32_t)-1) {
- return SCF_NOMEMORY;
- }
- m_hNotifyhandle->SetEvent();
- return SCF_SUCCEED;
- }
- bool SCF::Exec() {
- if (!isConnected()|| m_TransferType == SCF_NORMAL_TRANSFER) return false;
- if (SCFLock(0) == WAIT_OBJECT_0) {
- if (ReceivetoNotify() < 0) {
- Disconnect();
- SCFUnLock();
- return false;
- }
- SCFUnLock();
- }
-
- int ret = ReadData((char*)(*m_pTransferBuffer),
- m_pTransferBuffer->GetBuffLen(),
- ReadWaitTime);
- if (ret > 0) {
- ret = ProcessCmd((char*)(*m_pTransferBuffer), ret);
- if (ret < 0) {
- Disconnect();
- return false;
- }
- }
- else if (ret != SCF_TIMEOUT) {
- return false;
- }
- return true;
- }
- int SCF::SendPacket(const char* pPacket, uint32_t length, uint32_t timeout) {
- return SCF_FAILED;
- }
- int SCF::SendPacket(SCFPacket* pPacket, uint32_t timeout) {
- return SCF_FAILED;
- }
- int SCF::ReadData(char* pPacket, uint32_t length, uint32_t timeout) {
- // std::cout << "SCF::ReadData" << std::endl;
- return SCF_FAILED;
- }
- uint32_t SCF::GetReceivePacketSize() {
- if (!m_pReceivebuffer) return 0;
- if (static_cast<CircleBuff*>(m_pReceivebuffer)->GetPacketCount() > 0) {
- return static_cast<CircleBuff*>(m_pReceivebuffer)->GetFrontPacketSize();
- }
- return 0;
- }
- uint32_t SCF::GetNotifyPacketSize() {
- if (!m_pNotifybuffer) return 0;
- if (static_cast<CircleBuff*>(m_pNotifybuffer)->GetPacketCount() > 0) {
- return static_cast<CircleBuff*>(m_pNotifybuffer)->GetFrontPacketSize();
- }
- return 0;
- }
- int SCF::ReceivePacket(char* pPacket, uint32_t length, uint32_t timeout) {
- if (m_TransferType == SCF_NORMAL_TRANSFER) {
- return ReadData(pPacket, length, timeout);
- }
- return DeQueNotifyPacket(pPacket, length,timeout);
- /*int ret = static_cast<CircleBuff*>(m_pReceivebuffer)->Pop(pPacket, length);
- if (ret > 0) return ret;
- if (ret == 0) {
- if (!m_hReceivehandle->Wait(timeout)) {
- return SCF_TIMEOUT;
- }
- ret = static_cast<CircleBuff*>(m_pReceivebuffer)->Pop(pPacket, length);
- if (ret > 0) return ret;
- if (ret == 0) return SCF_NOPACKET;
- }
- return SCF_OVERFLOW;*/
- }
- int SCF::ReceivePacket(SCFPacket* pPacket, uint32_t timeout) {
- if (m_TransferType == SCF_NORMAL_TRANSFER) {
- int ret = ReadData((char*)(*pPacket), pPacket->GetBuffLen(), timeout);
- if (ret > 0) pPacket->SetPacketLen(ret);
- else pPacket->SetPacketLen(0);
- return ret;
- }
- int ret = ReceivePacket((char*)(*pPacket), pPacket->GetBuffLen(), timeout);
- if (ret >= 0) pPacket->SetPacketLen(ret);
- else pPacket->SetPacketLen(0);
- if (ret == SCF_OVERFLOW) {
- if (pPacket->SetBuffLen(GetReceivePacketSize())) {
- ret = ReceivePacket((char*)(*pPacket), pPacket->GetBuffLen(), 0);
- if (ret >= 0) pPacket->SetPacketLen(ret);
- else pPacket->SetPacketLen(0);
- }
- else {
- ret = SCF_NOMEMORY;
- }
- }
- return ret;
- }
- int SCF::QueNotifyPacket(const char* pPacket, uint32_t length) {
- if (!m_pNotifybuffer) return SCF_FAILED;
- return WritetoNotify(pPacket, length);
- }
- int SCF::QueNotifyPacket(SCFPacket* pPacket) {
- return QueNotifyPacket((char*)(*pPacket), pPacket->GetPacketLen());
- }
- int SCF::DeQueNotifyPacket(char* pPacket, uint32_t length, uint32_t timeout) {
- int ret = static_cast<CircleBuff*>(m_pNotifybuffer)->Pop(pPacket, length);
- if (ret > 0) return ret;
- if (ret == 0) {
- if (!m_hNotifyhandle->Wait(timeout)) {
- return SCF_TIMEOUT;
- }
- ret = static_cast<CircleBuff*>(m_pNotifybuffer)->Pop(pPacket, length);
- if (ret > 0) return ret;
- if (ret == 0) return SCF_NOPACKET;
- }
- return SCF_OVERFLOW;
- }
- int SCF::DeQueNotifyPacket(SCFPacket* pPacket, uint32_t timeout) {
- int ret = DeQueNotifyPacket((char*)(*pPacket), pPacket->GetBuffLen(), timeout);
- if (ret >= 0) pPacket->SetPacketLen(ret);
- else pPacket->SetPacketLen(0);
- if (ret == SCF_OVERFLOW) {
- if (pPacket->SetBuffLen(GetNotifyPacketSize())) {
- ret = DeQueNotifyPacket((char*)(*pPacket), pPacket->GetBuffLen(), 0);
- if (ret >= 0) pPacket->SetPacketLen(ret);
- else pPacket->SetPacketLen(0);
- }
- else {
- ret = SCF_NOMEMORY;
- }
- }
- return ret;
- }
- uint32_t SCF::SCFLock(uint32_t timeout) {
- uint32_t ret = WAIT_OBJECT_0;
- ret = Thread_Lock(timeout);
- return ret;
- }
- void SCF::SCFUnLock() {
- if (ReceivetoNotify_Ex() < 0) {
- Disconnect();
- }
- Thread_UnLock();
- }
- SCF* LoadScf(const char* pFilename) {
- SCF* pScf = nullptr;
- if (pFilename) {
- void* module = dlopen(pFilename, RTLD_LAZY);
- if (module) {
- GetSCF_Proc getscf = (GetSCF_Proc)dlsym(module, "GetSCF");
- if (getscf) {
- pScf = getscf();
- if (pScf) {
- pScf->m_LibHandle = module;
- }
- }
- }
- }
- return pScf;
- }
- void UnLoadScf(SCF* pHandle) {
- if (pHandle) {
- void* mod = pHandle->m_LibHandle;
- if (mod) {
- ReleaseSCF_Proc releasescf = (ReleaseSCF_Proc)dlsym(pHandle->m_LibHandle, "ReleaseSCF");
- if (releasescf) {
- releasescf(pHandle);
- }
- dlclose(mod);
- }
- }
- }
|