git://git.onelab.eu
/
distributedratelimiting.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added an 'independent' option for set identites that will put them under the
[distributedratelimiting.git]
/
drl
/
config.c
diff --git
a/drl/config.c
b/drl/config.c
index
65d8eb9
..
8b15cd2
100644
(file)
--- a/
drl/config.c
+++ b/
drl/config.c
@@
-107,6
+107,7
@@
static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) {
xmlChar *ewma;
xmlChar *mainloop_intervals;
xmlChar *communication_intervals;
xmlChar *ewma;
xmlChar *mainloop_intervals;
xmlChar *communication_intervals;
+ xmlChar *independent;
xmlNodePtr fields = ident->children;
ident_peer *current = NULL;
xmlNodePtr fields = ident->children;
ident_peer *current = NULL;
@@
-206,6
+207,14
@@
static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) {
xmlFree(communication_intervals);
}
xmlFree(communication_intervals);
}
+ independent = xmlGetProp(ident, (const xmlChar *) "independent");
+ if (independent == NULL) {
+ common->independent = 0;
+ } else {
+ common->independent = atoi((const char *) independent);
+ xmlFree(independent);
+ }
+
while (fields != NULL) {
if((!xmlStrcmp(fields->name, (const xmlChar *) "peer"))) {
xmlChar *ip = xmlNodeListGetString(doc, fields->children, 1);
while (fields != NULL) {
if((!xmlStrcmp(fields->name, (const xmlChar *) "peer"))) {
xmlChar *ip = xmlNodeListGetString(doc, fields->children, 1);