From 2e2513eb364dbd071b3b430f523c53c243ac231e Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Wed, 27 Feb 2013 11:44:25 +0100 Subject: [PATCH] Introduce ORTE_STRENGTH environment variable It can be used to override strength of publishers in the given application. --- src/types/roboortegen.pl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/types/roboortegen.pl b/src/types/roboortegen.pl index 80613470..ae3a197d 100755 --- a/src/types/roboortegen.pl +++ b/src/types/roboortegen.pl @@ -300,6 +300,7 @@ print OUTFILE << "(END)"; */ #include "$library_name_prefix$roboorte_name.h" +#include /* ---------------------------------------------------------------------- * CREATE PUBLISHERS @@ -390,12 +391,20 @@ print OUTFILE << "(END)"; int ${roboorte_name}_roboorte_init(struct ${roboorte_name}_orte_data *data) { \tint rv = 0; +\tconst char *s; \tORTEDomainProp prop; \tORTEInit(); \tif ($data_arg_name->strength <= 0) \t\t$data_arg_name->strength = $publication_strength; + if ((s = getenv("ORTE_STRENGTH"))) { + char *end; + long l = strtol(s, &end, 10); + if (s != end) + data->strength = l; + } + \tORTEVerbositySetOptions("ALL.0"); \tORTEDomainPropDefaultGet(&prop); \tNTPTIME_BUILD(prop.baseProp.refreshPeriod, $refresh_period); -- 2.39.2