aboutsummaryrefslogtreecommitdiff
path: root/libarmep/service.c
diff options
context:
space:
mode:
authorAndy Green <andy.green@linaro.org>2012-10-14 12:56:57 +0800
committerAndy Green <andy.green@linaro.org>2012-10-14 13:40:56 +0800
commitbadb9cf4e9f0afee1a25254ddb0f0178a624cb10 (patch)
tree561993d498566a2ae417eae70d8f50efdbe62970 /libarmep/service.c
parent93a3d0724c9bc593d6759d80fdbc430151afab36 (diff)
config allow virtual summing supplies in config
Signed-off-by: Andy Green <andy.green@linaro.org>
Diffstat (limited to 'libarmep/service.c')
-rw-r--r--libarmep/service.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libarmep/service.c b/libarmep/service.c
index 77683e5..c8d0208 100644
--- a/libarmep/service.c
+++ b/libarmep/service.c
@@ -149,7 +149,7 @@ void probe_close(struct aep *aep)
close(aep->fd);
}
-static void copy_public_ch_info_to_shared(struct aep_shared *aep_shared, struct aep_channel *ch)
+static void copy_public_ch_info_to_shared(struct aep_shared *aep_shared, int chan, struct aep_channel *ch)
{
strncpy(aep_shared->channel_name[chan], ch->channel_name, sizeof(aep_shared->channel_name[0]));
aep_shared->channel_name[chan][sizeof(aep_shared->channel_name[0]) - 1] = '\0';
@@ -373,7 +373,7 @@ bail:
if (!ch->requested)
continue;
- copy_public_ch_info_to_shared(aep_context->aep_shared, ch);
+ copy_public_ch_info_to_shared(aep_context->aep_shared, chan, ch);
chan++;
aep_context->aep_shared->chans = chan;
@@ -384,6 +384,11 @@ bail:
aep_context->aeps[m].sec_last_traffic = tv.tv_sec;
}
+ for (m = 0; m < aep_context->count_virtual_channels; m++) {
+ copy_public_ch_info_to_shared(aep_context->aep_shared, chan++, &aep_context->vch[m]);
+ aep_context->aep_shared->vchans++;
+ }
+
}
post_start: