renaming env var to device_name

This commit is contained in:
Ayush Saini 2023-01-18 23:38:31 +05:30
parent 81f76c44a8
commit 657109718e
2 changed files with 6 additions and 6 deletions

View File

@ -576,7 +576,7 @@ class ServerManagerApp:
# Set an environment var to change the device name.
# Device name is used while making connection with master server,
# cloud-console recognize us with this name.
os.environ['BA_HOST_NAME'] = self._config.party_name
os.environ['BA_DEVICE_NAME'] = self._config.party_name
print(f'{Clr.CYN}Launching server subprocess...{Clr.RST}', flush=True)
binary_name = ('BallisticaCoreHeadless.exe'

View File

@ -499,11 +499,11 @@ auto Platform::GetDeviceName() -> std::string {
}
auto Platform::DoGetDeviceName() -> std::string {
// Check hostname in env_var
char* hostname;
hostname = getenv("BA_HOST_NAME");
if (hostname != NULL) {
return hostname;
// Check devicename in env_var
char* devicename;
devicename = getenv("BA_DEVICE_NAME");
if (devicename != NULL) {
return devicename;
}
// Else just go with hostname as a decent default.