return ENOMEM;
}
+ memset(leaves, 0, count * sizeof(leaf_t));
for (i = 0; i < count; ++i) {
leaves[i].xid = atoi(names[i]->d_name);
leaves[i].parent = NULL;
+ leaves[i].drop_prob = 0.0;
+ leaves[i].delay = 0;
free(names[i]);
xmlChar *branch;
xmlChar *accounting;
xmlChar *ewma;
- xmlChar *intervals;
+ xmlChar *mainloop_intervals;
+ xmlChar *communication_intervals;
+ xmlChar *independent;
xmlNodePtr fields = ident->children;
ident_peer *current = NULL;
common->accounting = ACT_SAMPLEHOLD;
} else if (!xmlStrcmp(accounting, (const xmlChar *) "SIMPLE")) {
common->accounting = ACT_SIMPLE;
+ } else if (!xmlStrcmp(accounting, (const xmlChar *) "MULTIPLEINTERVAL")) {
+ common->accounting = ACT_MULTIPLE;
} else {
printlog(LOG_CRITICAL, "Unknown/invalid accounting table.\n");
xmlFree(accounting);
xmlFree(ewma);
}
- intervals = xmlGetProp(ident, (const xmlChar *) "intervals");
- if (intervals == NULL) {
- printlog(LOG_CRITICAL, "Ident missing interval count.\n");
- return EINVAL;
+ mainloop_intervals = xmlGetProp(ident, (const xmlChar *) "loop_intervals");
+ if (mainloop_intervals == NULL) {
+ printlog(LOG_WARN, "Ident id: %d missing loop_intervals, assuming 1.\n", common->id);
+ common->mainloop_intervals = 1;
+ } else {
+ common->mainloop_intervals = atoi((const char *) mainloop_intervals);
+ xmlFree(mainloop_intervals);
+ }
+
+ communication_intervals = xmlGetProp(ident, (const xmlChar *) "comm_intervals");
+ if (communication_intervals == NULL) {
+ printlog(LOG_WARN, "Ident id: %d missing comm_intervals, assuming 1.\n", common->id);
+ common->communication_intervals = 1;
+ } else {
+ common->communication_intervals = atoi((const char *) communication_intervals);
+ xmlFree(communication_intervals);
+ }
+
+ independent = xmlGetProp(ident, (const xmlChar *) "independent");
+ if (independent == NULL) {
+ common->independent = 0;
} else {
- common->intervals = atoi((const char *) intervals);
- xmlFree(intervals);
+ common->independent = atoi((const char *) independent);
+ xmlFree(independent);
}
while (fields != NULL) {