X-Git-Url: http://git.onelab.eu/?p=distributedratelimiting.git;a=blobdiff_plain;f=drl%2Fconfig.c;h=8b15cd23b48efdc1412009809e19f3efd79c298b;hp=65d8eb953037646b0dd161879ecf1f9c00863483;hb=d12ab8f1cd4ff135d692f7841360af70f0beb57b;hpb=762f4e00371f2a8e01a6cf60867f837b90460a60 diff --git a/drl/config.c b/drl/config.c index 65d8eb9..8b15cd2 100644 --- 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 *independent; 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); } + 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);