Make rtipc name configurable

This commit is contained in:
Bjarne von Horn 2024-07-04 18:13:17 +02:00
parent 4c953d5000
commit daa555a4f6
1 changed files with 9 additions and 1 deletions

View File

@ -272,7 +272,15 @@ ec_master_t *ecrt_request_master(
return new ec_master(); return new ec_master();
} }
ec_master::ec_master() : rt_ipc(rtipc_create("FakeTaxi", "/tmp/FakeTaxi")) static const char *getName()
{
if (const auto ans = getenv("FAKE_EC_NAME")) {
return ans;
}
return "FakeTaxi";
}
ec_master::ec_master() : rt_ipc(rtipc_create(getName(), "/tmp/FakeTaxi"))
{ {
} }