Exemple #1
0
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();
}
Exemple #2
0
CResetAttributes::ResetResult CTestResource::RemoteReset(LogFunc *pfnLog, void *pfnLogparam)
{
  String strHost;
  int nPort;
  CeCosSocket::ParseHostPort(HostPort(),strHost,nPort);
  String strCmd;
  strCmd.Format(_T("rsh %s x10reset %s\n"),(LPCTSTR)strHost,ResetString());
  pfnLog(pfnLogparam,strCmd);

  CSubprocess sp;
  sp.Run(pfnLog,pfnLogparam,strCmd);
  return CResetAttributes::RESET_OK; // FIXME
}
Exemple #3
0
void InterfaceReloadSystem()
{
	EnterServerLock();
	
	lprintf("InterfaceReloadSystem reloading system\n");
	
	PauseTimers();
	
	SendBlakodBeginSystemEvent(SYSEVENT_RELOAD_SYSTEM);
	
	GarbageCollect();
	SaveAll();
	
	ResetAdminConstants();
	ResetUser();
	ResetString();
	ResetRoomData();
	ResetLoadMotd();
	ResetLoadBof();
	ResetDLlist();
	ResetNameID();
	ResetResource();
	ResetTimer();
	ResetList();
	ResetObject();
	ResetMessage();
	ResetClass();
	
	LoadMotd();
	LoadBof();
	LoadRsc();
	
	LoadKodbase();
	
	UpdateSecurityRedbook();
	
	LoadAdminConstants();
	/* can't reload accounts because sessions have pointers to accounts */
	if (!LoadAllButAccount()) 
		eprintf("InterfaceReloadSystem couldn't load game.  You are dead.\n");
	
	AllocateParseClientListNodes(); /* it needs a list to send to users */
	AddBuiltInDLlist();
	
	SendBlakodEndSystemEvent(SYSEVENT_RELOAD_SYSTEM);
	
	UnpauseTimers();
	
	LeaveServerLock();
}
Exemple #4
0
CResetAttributes::ResetResult CTestResource::Reset(LogFunc *pfnLog, void *pfnLogparam)
{
  String strReset;
  strReset.Format(_T("port(%s,%d) %s"),Serial(),Baud(),ResetString());
  return CResetAttributes(strReset).Reset(pfnLog,pfnLogparam);
}