Changeset: 619f059e5d89 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=619f059e5d89
Modified Files:
        tools/merovingian/daemon/argvcmds.c
Branch: default
Log Message:

monetdbd get: turn version support into backwards compat only

Make support more specific for the current code, backwards compat path
is more explicit now in this branch.


diffs (33 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
@@ -246,12 +246,11 @@ command_get(confkeyval *ckv, int argc, c
                                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 */
+                                * what's available (backwards compatability) */
                                if (readProps(cport, dbfarm) != 0) {
                                        fprintf(stderr, "unable to read 
properties from %s: %s\n",
                                                        dbfarm, 
strerror(errno));
@@ -261,12 +260,12 @@ command_get(confkeyval *ckv, int argc, c
                                /* try to retrieve running merovingian version 
*/
                                kv = findConfKey(ckv, "sockdir");
                                value = kv->val;
-                               kv = findConfKey(cport, "controlport");
+                               kv = findConfKey(cport, "controlport"); /* 
backwards compat */
                                if (kv->ival == -1)
-                                       kv = findConfKey(cport, "port"); /* 
forward compat */
-                               freeConfFile(cport);
+                                       kv = findConfKey(ckv, "port");
                                snprintf(buf, sizeof(buf), "%s/" CONTROL_SOCK 
"%d",
                                                value, kv->ival);
+                               freeConfFile(cport);
                                value = control_send(&res, buf, -1, "", 
"version", 0, NULL);
                                if (value != NULL) {
                                        free(value);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to