Skip to content

Commit

Permalink
the fix for >100 instances does not understand C component instances.…
Browse files Browse the repository at this point in the history
….. fix the C ones to be like python
  • Loading branch information
petersilva committed Sep 24, 2024
1 parent 13ef022 commit 490e5f4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sr_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -1790,13 +1790,13 @@ int sr_config_finalize(struct sr_config_s *sr_cfg, const int is_consumer)
}
// pidfn statehost
if (val) {
sprintf(p, "%s/.cache/%s/%s/%s/%s/i%02d.pid", home, sr_cfg->appname,
val, sr_cfg->progname, sr_cfg->configname, sr_cfg->instance);
sprintf(p, "%s/.cache/%s/%s/%s/%s/%s_%s_%02d.pid", home, sr_cfg->appname,
val, sr_cfg->progname, sr_cfg->configname, sr_cfg->progname, sr_cfg->configname, sr_cfg->instance);
}
// pidfn default
else {
sprintf(p, "%s/.cache/%s/%s/%s/i%02d.pid", home, sr_cfg->appname,
sr_cfg->progname, sr_cfg->configname, sr_cfg->instance);
sprintf(p, "%s/.cache/%s/%s/%s/%s_%s_%02d.pid", home, sr_cfg->appname,
sr_cfg->progname, sr_cfg->configname, sr_cfg->progname, sr_cfg->configname, sr_cfg->instance);
}

sr_cfg->pidfile = strdup(p);
Expand Down Expand Up @@ -2609,8 +2609,8 @@ void sr_config_list(struct sr_config_s *sr_cfg)
*s = '\0';
}

sprintf(p, "%s/.cache/%s/%s/%s/i001.pid", getenv("HOME"),
sr_cfg->appname, sr_cfg->progname, d->d_name);
sprintf(p, "%s/.cache/%s/%s/%s/%s_%s_01.pid", getenv("HOME"),
sr_cfg->appname, sr_cfg->progname, sr_cfg->appname, sr_cfg->progname, d->d_name);
f = fopen(p, "r");
if (f) // read the pid from the file.
{
Expand Down

0 comments on commit 490e5f4

Please sign in to comment.