egs_crash_2.patch

kervala, 10/06/2010 12:02 pm

Download (15.2 kB)

b/code/ryzom/common/src/game_share/_backup_service_interface_singleton.cpp Wed Oct 06 11:56:21 2010 +0200
49 49
// method used to update stuff on config file reload / variable change
50 50
void onSaveShardRootModified( NLMISC::IVariable &var );
51 51
// configuration variables - to be setup in cfg files
52
CVariable<string>	SaveShardRoot("variables", "SaveShardRoot", "Root directory of all files saved by any shard", "", 0, true, onSaveShardRootModified, false);
52
CVariable<string>		 GSSaveShardRoot("variables", "GSSaveShardRoot", "Root directory of all files saved by any shard", "", 0, true, onSaveShardRootModified, false);
53 53

  
54 54
// stats variables
55 55
CVariable<NLMISC::TTime> BSLastAckTime("BSIF", "BSLastAckTime", "The timestamp of the last ack received from backup system", 0, 0, true);
......
103 103

  
104 104
	_ShardDependentBsi.init("BS");
105 105
	_ShardDependentBsi.setRemotePath( IService::getInstance()->SaveFilesDirectory.toString() );
106
	_ShardDependentBsi.setLocalPath( CPath::standardizePath( SaveShardRoot.get() ) + IService::getInstance()->SaveFilesDirectory.toString() );
106
	_ShardDependentBsi.setLocalPath( CPath::standardizePath( GSSaveShardRoot.get() ) + IService::getInstance()->SaveFilesDirectory.toString() );
107 107

  
108 108
	_GlobalBsi.init("BS");
109 109
	_GlobalBsi.setRemotePath( string() );
110
	_GlobalBsi.setLocalPath( SaveShardRoot.get() );
110
	_GlobalBsi.setLocalPath( GSSaveShardRoot.get() );
111 111

  
112 112
//	_PDBsi.init("PDBS");
113 113
//	_PDBsi.setRemotePath( IService::getInstance()->SaveFilesDirectory.toString() );
......
357 357
	if ( var.getName() == "SaveFilesDirectory" )
358 358
	{
359 359
		_ShardDependentBsi.setRemotePath( var.toString() );
360
		_ShardDependentBsi.setLocalPath( CPath::standardizePath( SaveShardRoot.get() ) + var.toString() );
360
		_ShardDependentBsi.setLocalPath( CPath::standardizePath( GSSaveShardRoot.get() ) + var.toString() );
361 361
//		_PDBsi.setRemotePath( var.toString() );
362 362
//		_PDBsi.setLocalPath( CPath::standardizePath( SaveShardRoot.get() ) + var.toString() );
363 363
	}
b/code/ryzom/common/src/game_share/server_edition_module.cpp Wed Oct 06 11:56:21 2010 +0200
96 96
CVariable<uint32> TimeBeforeAutoCloseAnimationSessionWithNoPlayer("DSS", "TimeBeforeAutoCloseAnimationSessionWithNoPlayer", "Delay in secondes before a empty animation session is closed", 15*60, 0, true);
97 97

  
98 98
CVariable<std::string>	DefaultCharRingAccess( "DSS", "DefaultCharRingAccess", "Default Access Ring for player eg 'f1:j1:l1:d1:p1:g1:a1:'", "a1", 0, true );
99
CVariable<bool>	DontUseSU( "DSS", "DontUseSU", "Simulate the SU", false, 0, true );
99
CVariable<bool>	DSSDontUseSU( "DSS", "DSSDontUseSU", "Simulate the SU", false, 0, true );
100 100

  
101 101
CVariable<bool> AcceptScenarioWithoutHeader("DSS", "AcceptScenarioWithoutHeader", "AcceptScenarioWithoutHeader", false, 0, true);
102 102
CVariable<bool> MustVerifyRingAccessWhileLoadingAnimation("DSS", "MustVerifyRingAccessWhileLoadingAnimation", "MustVerifyRingAccessWhileLoadingAnimation", false, 0, true);
......
1205 1205
		return;
1206 1206
	}
1207 1207

  
1208
	if (DontUseSU)
1208
	if (DSSDontUseSU)
1209 1209
	{
1210 1210
		TCharId charId = static_cast<TCharId>(clientEid.getShortId());
1211 1211
		CEditionSession* editionSession = getSessionByCharId(charId);
b/code/ryzom/server/src/ai_service/ai_script_data_manager.cpp Wed Oct 06 11:56:21 2010 +0200
97 97
}
98 98

  
99 99

  
100
CVariable<string>	SaveShardRoot2("variables", "SaveShardRoot2", "Root directory of all saved data by any shard", "/home/nevrax/save_shard", 0, true, cbOnSaveShardRootModified); // (SaveShardRoot from game_share/backup_service_interface.cpp is not instanciated because nothing is used from that file)
100
CVariable<string>	AISSaveShardRoot("variables", "AISSaveShardRoot", "Root directory of all saved data by any shard", "/home/nevrax/save_shard", 0, true, cbOnSaveShardRootModified); // (SaveShardRoot from game_share/backup_service_interface.cpp is not instanciated because nothing is used from that file)
101 101
CVariable<string>	PdrFilename("ai", "PdrFilename", "Pdr file containing AIScript variables", string("ai_persistent_var.pdr"), 0, true);
102 102

  
103 103

  
......
173 173

  
174 174
std::string CAIScriptDataManager::dirname()
175 175
{
176
	return SaveShardRoot2.get()+"/"+IService::getInstance()->SaveFilesDirectory.toString()+"/ai_script_data";
176
	return AISSaveShardRoot.get()+"/"+IService::getInstance()->SaveFilesDirectory.toString()+"/ai_script_data";
177 177
}
178 178

  
179 179
//CConfigFile* CAIScriptDataManager::createFile(string name)
b/code/ryzom/server/src/backup_service/backup_file_access.cpp Wed Oct 06 11:56:21 2010 +0200
36 36
NLMISC::CVariable<bool>	VerboseLog("backup", "VerboseLog", "Activate verbose logging of BS activity", false);
37 37
NLMISC::CVariable<bool>	UseTempFile("backup", "UseTempFile", "Flag the use of temporary file for safe write or append operation", true, true);
38 38

  
39
extern NLMISC::CVariable<std::string> SaveShardRoot;
39
extern NLMISC::CVariable<std::string> BSSaveShardRoot;
40 40

  
41 41
bool	bsstrincmp(const char* s1, const char* s2, int n)
42 42
{
......
48 48

  
49 49
std::string	getBackupFileName(const std::string& filename)
50 50
{
51
	return SaveShardRoot.get() + filename;
51
	return BSSaveShardRoot.get() + filename;
52 52
	/* // BSFilePrefix and BSFileSubst are deprecated
53 53
	if (BSFilePrefix.get().empty())
54 54
		return filename;
b/code/ryzom/server/src/backup_service/backup_service.cpp Wed Oct 06 11:56:21 2010 +0200
60 60

  
61 61

  
62 62
extern CDirectoryRateStat	DirStats;
63
extern NLMISC::CVariable<std::string> SaveShardRoot;
63
extern NLMISC::CVariable<std::string> BSSaveShardRoot;
64 64

  
65 65
using namespace NLNET;
66 66
using namespace NLMISC;
......
537 537
		}
538 538
	}
539 539
	// In case something like getPathContent() has returned full paths, make paths relative to match the requested filenames
540
	fdc.stripFilename(SaveShardRoot.get());
540
	fdc.stripFilename(BSSaveShardRoot.get());
541 541

  
542 542
	// compose the output message
543 543
	CMessage	msgout("BS_FILE_CLASS");
b/code/ryzom/server/src/backup_service/commands.cpp Wed Oct 06 11:56:21 2010 +0200
30 30

  
31 31
CDirectoryRateStat	DirStats;
32 32

  
33
extern CVariable<string>	SaveShardRoot;
33
extern CVariable<string>	BSSaveShardRoot;
34 34

  
35 35

  
36 36
NLMISC_COMMAND(displayFileStats, "display file read/write stats for the last minute", "")
......
74 74
	{
75 75
		// just output the list of available shard id
76 76
		vector<string>	shards;
77
		CPath::getPathContent(SaveShardRoot, false, true, false, shards);
77
		CPath::getPathContent(BSSaveShardRoot, false, true, false, shards);
78 78

  
79
		log.displayNL("Listing %u available shard id in path '%s':", shards.size(), SaveShardRoot.c_str());
79
		log.displayNL("Listing %u available shard id in path '%s':", shards.size(), BSSaveShardRoot.c_str());
80 80
		for (uint i=0; i<shards.size(); ++i)
81 81
		{
82 82
			string id = shards[i];
......
107 107
		useFilter = true;
108 108
	}
109 109

  
110
	string fileName = SaveShardRoot.toString()+"/"+args[0]+"/characters/account_"+args[1]+"_"+args[2]+"_pdr.bin";
110
	string fileName = BSSaveShardRoot.toString()+"/"+args[0]+"/characters/account_"+args[1]+"_"+args[2]+"_pdr.bin";
111 111
	if (!CFile::isExists(fileName))
112 112
	{
113 113
		log.displayNL("The file '%s' (located here '%s') cannot be found in '%s' backup directory", 
b/code/ryzom/server/src/backup_service/web_connection.cpp Wed Oct 06 11:56:21 2010 +0200
169 169
}
170 170

  
171 171
CVariable<string>	IncrementalBackupDirectory("backup", "IncrementalBackupDirectory", "Directory to find incremental backuped archives", "", 0, true);
172
CVariable<string>	SaveShardRoot("backup", "SaveShardRoot", "Root directory of all saved data by BS", "/home/nevrax/save_shard", 0, true, cbOnSaveShardRootModified); // (SaveShardRoot from game_share/backup_service_interface.cpp is not instanciated because the nothing is used from that file)
172
CVariable<string>	BSSaveShardRoot("backup", "BSSaveShardRoot", "Root directory of all saved data by BS", "/home/nevrax/save_shard", 0, true, cbOnSaveShardRootModified); // (SaveShardRoot from game_share/backup_service_interface.cpp is not instanciated because the nothing is used from that file)
173 173
CVariable<string>	SaveTemplatePath("backup", "SaveTemplatePath", "Directory to find saves (with shard and account replacement strings)", "$shard/characters/account_$userid_$charid$ext", 0, true);
174 174
CVariable<string>	SaveExtList("backup", "SaveExtList", "List of possible extensions for save files (space separated)", "_pdr.bin _pdr.xml .bin", 0, true);
175 175

  
......
209 209
	explode(str, string("%%"), params, true);
210 210

  
211 211
	string	incrementalDir = IncrementalBackupDirectory;
212
	string	saveShardRoot = SaveShardRoot;
212
	string	saveShardRoot = BSSaveShardRoot;
213 213
	string	templatePath = SaveTemplatePath;
214 214
	string	extList = SaveExtList;
215 215

  
......
292 292

  
293 293
	explode(str, string("%%"), params, true);
294 294

  
295
	string	saveShardRoot = SaveShardRoot;
295
	string	saveShardRoot = BSSaveShardRoot;
296 296
	string	templatePath = SaveTemplatePath;
297 297

  
298 298
	string	shard;
......
367 367

  
368 368
	explode(str, string("%%"), params, true);
369 369

  
370
	string	saveShardRoot = SaveShardRoot;
370
	string	saveShardRoot = BSSaveShardRoot;
371 371
	string	templatePath = SaveTemplatePath;
372 372
	string	extList = SaveExtList;
373 373

  
b/code/ryzom/server/src/entities_game_service/entity_manager/entity_callbacks.cpp Wed Oct 06 11:56:21 2010 +0200
106 106

  
107 107
extern vector<CMainlandSummary>		Mainlands;
108 108

  
109
extern CVariable<bool> DontUseSU;
109
extern CVariable<bool> EGSDontUseSU;
110 110

  
111 111
// For shard names
112 112
extern NLMISC::CVariable<uint32> FixedSessionId;
......
1011 1011
		goto CreationFailed;
1012 1012
	}
1013 1013

  
1014
	if( DontUseSU.get() == 0)
1014
	if( EGSDontUseSU.get() == 0)
1015 1015
	{
1016 1016
		IShardUnifierEvent::getInstance()->validateCharacterCreation(userId, createCharMsg.Slot, createCharMsg);
1017 1017
	}
b/code/ryzom/server/src/entities_game_service/guild_manager/guild_manager.cpp Wed Oct 06 11:56:21 2010 +0200
55 55
extern bool						IOSIsUp;
56 56
extern CGenericXmlMsgHeaderManager	GenericMsgManager;
57 57
extern CVariable<uint32> AllowCharsFromAllSessions;
58
extern CVariable<bool> DontUseSU;
58
extern CVariable<bool> EGSDontUseSU;
59 59

  
60 60
CGuildManager* CGuildManager::_Instance = NULL;
61 61

  
......
1367 1367

  
1368 1368
	// Send the guild list to SU to synchronize the ring database and name manager
1369 1369
	// (and eventualy rename some conflicting guilds)
1370
	if (DontUseSU.get() == 0)
1370
	if (EGSDontUseSU.get() == 0)
1371 1371
	{
1372 1372
		std::vector<CHARSYNC::CGuildInfo> guildInfos;
1373 1373

  
......
1388 1388
	_GuildLoaded = true;
1389 1389

  
1390 1390
	// check guild member list against the eid translator
1391
	if ((DontUseSU.get() == 0) && IShardUnifierEvent::getInstance()->isEidTranslatorInitilazed())
1391
	if ((EGSDontUseSU.get() == 0) && IShardUnifierEvent::getInstance()->isEidTranslatorInitilazed())
1392 1392
	{
1393 1393
		checkGuildMemberLists();
1394 1394
	}
b/code/ryzom/server/src/entities_game_service/modules/shard_unifier_client.cpp Wed Oct 06 11:56:21 2010 +0200
54 54

  
55 55
extern NLMISC::CVariable<uint32> FixedSessionId;
56 56

  
57
CVariable<bool> DontUseSU( "su", "DontUseSU", "If 1, allow running a shard with no Shard Unifier Service", 0, 0, 1 ); 
57
CVariable<bool> EGSDontUseSU( "su", "EGSDontUseSU", "If 1, allow running a shard with no Shard Unifier Service", 0, 0, 1 ); 
58 58
CVariable<bool> SimulateCharacterHasEditSession( "su", "SimulateCharacterHasEditSession", "If 1 simulate that character have alreay an edition sessiion", 0, 0, 1 ); 
59 59

  
60 60

  
......
662 662

  
663 663
	virtual void validateCharacterNameBeforeCreate(uint32 userId, uint8 charIndex, const ucstring &name, uint32 homeSessionId)
664 664
	{
665
		if (DontUseSU.get() == 1)
665
		if (EGSDontUseSU.get() == 1)
666 666
		{
667 667
			// send the response to the client
668 668
			sendIfNameIsValide( userId, true );
......
694 694

  
695 695
	virtual bool validateCharacterCreation	(uint32 userId, uint8 charIndex, const CCreateCharMsg &createCharMsg)
696 696
	{
697
		if (DontUseSU.get() == 1)
697
		if (EGSDontUseSU.get() == 1)
698 698
		{
699 699
			cbCreateChar_part2(userId, createCharMsg, true);
700 700
			return true;
701 701
		}
702 702
		
703 703
		// send a name assignment to SU name unifier
704
		if ((_CharacterSynch == NULL) && (DontUseSU.get() == 0))
704
		if ((_CharacterSynch == NULL) && (EGSDontUseSU.get() == 0))
705 705
		{
706 706
			nlinfo("VALID_NAME::SU::validateCharacterCreation name %s rejected because we have no character sync to validate the name with using SU", createCharMsg.Name.toString().c_str());
707 707
			return false;
b/code/ryzom/server/src/frontend_service/fe_receive_sub.cpp Wed Oct 06 11:56:21 2010 +0200
75 75
void cbGwTrDisconnection ( TClientId clientId );
76 76

  
77 77

  
78
CVariable<string>	SaveShardRoot("variables", "SaveShardRoot", "Root directory of all files saved by any shard", "", 0, true, NULL, false);
78
CVariable<string>	FESSaveShardRoot("variables", "FESSaveShardRoot", "Root directory of all files saved by any shard", "", 0, true, NULL, false);
79 79
extern CVariable<bool> VerboseFEStatsTime;
80 80

  
81 81

  
......
842 842
			{
843 843
				// The client has neither been authenticated nor provided a user id, but is allowed to connect (dev mode)
844 844
				nlinfo ("%s using AutoAllocUserid", _CurrentInMsg->AddrFrom.asString().c_str() );
845
				string filename = CPath::standardizePath( SaveShardRoot.get() ) + CPath::standardizePath( IService::getInstance()->SaveFilesDirectory.get() ) + "auto_uid_map.bin";
845
				string filename = CPath::standardizePath( FESSaveShardRoot.get() ) + CPath::standardizePath( IService::getInstance()->SaveFilesDirectory.get() ) + "auto_uid_map.bin";
846 846

  
847 847
				// Get previously allocated user ids 
848 848
				if ( _AutoUidMap.empty() )