void MainExitServer() { lprintf("ExitServer terminating server\n"); ExitAsyncConnections(); CloseAllSessions(); /* gotta do this before anything, cause it uses kod, accounts */ CloseDefaultChannels(); ResetLoadMotd(); ResetLoadBof(); ResetTable(); ResetBufferPool(); ResetSysTimer(); ResetDLlist(); ResetNameID(); ResetAccount(); ResetUser(); ResetString(); ResetRoomData(); ResetResource(); ResetTimer(); ResetList(); ResetObject(); ResetMessage(); ResetClass(); ResetConfig(); DeleteAllBlocks(); }
//-------------------------------------------------------------------------------------------------- void le_msg_DeleteService ( le_msg_ServiceRef_t serviceRef ///< [in] Reference to the service. ) //-------------------------------------------------------------------------------------------------- { LE_FATAL_IF(serviceRef->serverThread != le_thread_GetCurrent(), "Attempted to delete service (%s:%s) not owned by thread.", serviceRef->id.name, le_msg_GetProtocolIdStr(serviceRef->id.protocolRef)); // If the service is still advertised, hide it. le_msg_HideService(serviceRef); // Close any remaining open sessions. CloseAllSessions(serviceRef); // NOTE: Lock the mutex here to prevent a race between this thread dropping ownership // of the service and another thread trying to offer the same service. This is very // unlikely to ever happen, but just in case, make sure it fails with a sensible // ("duplicate") log message, instead of just quietly messing up the hashmap or something. LOCK // Clear out the server thread reference. serviceRef->serverThread = NULL; // Release the server's hold on the object. le_mem_Release(serviceRef); UNLOCK }
/* C_CloseAllSessions * closes all sessions an application has with a token. slotID specifies the * token’s slot. */ CK_DEFINE_FUNCTION(CK_RV, C_CloseAllSessions)( CK_SLOT_ID slotID) /* the token's slot */ { return CloseAllSessions(slotID); }