git://git.onelab.eu
/
distributedratelimiting.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3d0e0dc
)
minor build fix for zonekeeperless builds
author
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 25 Jan 2010 19:44:55 +0000
(19:44 +0000)
committer
S.Çağlar Onur
<caglar@cs.princeton.edu>
Mon, 25 Jan 2010 19:44:55 +0000
(19:44 +0000)
drl/config.c
patch
|
blob
|
history
diff --git
a/drl/config.c
b/drl/config.c
index
261ce0c
..
86d1ec4
100644
(file)
--- a/
drl/config.c
+++ b/
drl/config.c
@@
-119,7
+119,9
@@
static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) {
ident_peer *current = NULL;
/* The struct has been memsetted to 0, this is just to be safe. */
ident_peer *current = NULL;
/* The struct has been memsetted to 0, this is just to be safe. */
+#ifdef BUILD_ZOOKEEPER
common->zk_host = NULL;
common->zk_host = NULL;
+#endif
common->peers = NULL;
common->members = NULL;
common->next = NULL;
common->peers = NULL;
common->members = NULL;
common->next = NULL;
@@
-311,11
+313,12
@@
static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) {
} else if ((!xmlStrcmp(fields->name, (const xmlChar *) "zkhost"))) {
xmlChar *host = xmlNodeListGetString(doc, fields->children, 1);
} else if ((!xmlStrcmp(fields->name, (const xmlChar *) "zkhost"))) {
xmlChar *host = xmlNodeListGetString(doc, fields->children, 1);
+#ifdef BUILD_ZOOKEEPER
common->zk_host = strdup((const char *) host);
if (common->zk_host == NULL) {
return ENOMEM;
}
common->zk_host = strdup((const char *) host);
if (common->zk_host == NULL) {
return ENOMEM;
}
-
+#endif
xmlFree(host);
}
fields = fields->next;
xmlFree(host);
}
fields = fields->next;
@@
-326,11
+329,12
@@
static int parse_common(xmlDocPtr doc, xmlNodePtr ident, ident_config *common) {
return EINVAL;
}
return EINVAL;
}
+#ifdef BUILD_ZOOKEEPER
if (common->membership == ZOOKEEPER && common->zk_host == NULL) {
printlog(LOG_CRITICAL, "Group membership protocol ZOOKEEPER requires a zkhost field.\n");
return EINVAL;
}
if (common->membership == ZOOKEEPER && common->zk_host == NULL) {
printlog(LOG_CRITICAL, "Group membership protocol ZOOKEEPER requires a zkhost field.\n");
return EINVAL;
}
-
+#endif
/* No errors. */
return 0;
}
/* No errors. */
return 0;
}