Skip to content

Commit

Permalink
Fix: mdsconnect incorrectly aborts on the first connection
Browse files Browse the repository at this point in the history
Somewhere along the line TdiShrExt->rMdsConnect started returning the connection number (starting at 0) instead of a status code.
On an error, it actually returns -1, not 0.
If mdsconnect is called with _abort set, then it will abort() on the first connection.
  • Loading branch information
WhoBrokeTheBuild authored and joshStillerman committed May 2, 2023
1 parent faf001d commit 953bda0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tdi/remote/MdsConnect.fun
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ call: _host = Host name eg elpp1.epfl.ch or elpp1.epfl.ch:9000
write(*,"Host taken from MDS_HOST ["//_host//"]");
}
_status = TdiShrExt->rMdsConnect(ref(_host//char(0)));
if (present(_abort) && _status == 0) abort();
if (present(_abort) && _status == -1) abort();
return(_status);
}

0 comments on commit 953bda0

Please sign in to comment.