Changeset: 55349c1d2524 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=55349c1d2524 Modified Files: tools/merovingian/client/monetdb.c Branch: Jan2014 Log Message:
Merging heads --- sorry, forgot "--rebase" with "hg pull --update" diffs (38 lines): diff --git a/tools/merovingian/client/monetdb.c b/tools/merovingian/client/monetdb.c --- a/tools/merovingian/client/monetdb.c +++ b/tools/merovingian/client/monetdb.c @@ -1711,17 +1711,14 @@ main(int argc, char *argv[]) * where we should search, which defaults to '/tmp' */ if (mero_host == NULL) mero_host = "/tmp"; - do { - /* first try the port given (or else its default) */ - snprintf(buf, sizeof(buf), "%s/.s.merovingian.%d", - mero_host, mero_port == -1 ? 50000 : mero_port); - if (control_ping(buf, -1, NULL) == 0) { - mero_host = buf; - break; - } - - /* if port wasn't given, we can try and search for available - * sockets */ + /* first try the port given (or else its default) */ + snprintf(buf, sizeof(buf), "%s/.s.merovingian.%d", + mero_host, mero_port == -1 ? 50000 : mero_port); + if (control_ping(buf, -1, NULL) == 0) { + mero_host = buf; + } else { + /* if port wasn't given, we can try and search + * for available sockets */ if (mero_port == -1) { DIR *d; struct dirent *e; @@ -1747,7 +1744,7 @@ main(int argc, char *argv[]) } closedir(d); } - } while(0); + } if (mero_host != buf) { fprintf(stderr, "monetdb: cannot find a control socket, use -h and/or -p\n"); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list