Changeset: 0ae1ab3b10b9 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0ae1ab3b10b9
Modified Files:
tools/merovingian/daemon/argvcmds.c
Branch: default
Log Message:
Merged from Aug2011
diffs (34 lines):
diff --git a/tools/merovingian/daemon/argvcmds.c
b/tools/merovingian/daemon/argvcmds.c
--- a/tools/merovingian/daemon/argvcmds.c
+++ b/tools/merovingian/daemon/argvcmds.c
@@ -244,13 +244,27 @@ command_get(confkeyval *ckv, int argc, c
} else if (strcmp(p, "status") == 0) {
if (meropid > 0) {
char *res;
+ confkeyval cport[] = {
+ {"controlport", NULL, -1, INT},
+ {"port", NULL, -1, INT},
+ { NULL, NULL, 0, INVALID}
+ };
+
+ /* re-read, this time with empty defaults, so
we can see
+ * what's available (forward/backwards
compatability */
+ if (readProps(cport, dbfarm) != 0) {
+ fprintf(stderr, "unable to read
properties from %s: %s\n",
+ dbfarm,
strerror(errno));
+ return(1);
+ }
/* try to retrieve running merovingian version
*/
kv = findConfKey(ckv, "sockdir");
value = kv->val;
- kv = findConfKey(ckv, "controlport");
- if (kv == NULL)
- kv = findConfKey(ckv, "port"); /*
forward compat */
+ kv = findConfKey(cport, "controlport");
+ if (kv->ival == -1)
+ kv = findConfKey(cport, "port"); /*
forward compat */
+ freeConfFile(cport);
snprintf(buf, sizeof(buf), "%s/" CONTROL_SOCK
"%d",
value, kv->ival);
value = control_send(&res, buf, -1, "",
"version", 0, NULL);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list