Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions idl/mdsconnect.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ case (!version.os) of
endcase
end

function sockmin
if !version.os eq 'linux' then return, 0 else return, 11-(!version.os eq 'MacOS')
end

function mds$socket,quiet=quiet,status=status,socket=socket
status = 1
sockmin=1l-(!version.os eq 'MacOS')
sockmin=sockmin()
sock=sockmin-1
if (keyword_set(socket)) then $
if (socket ge sockmin) then $
Expand Down Expand Up @@ -116,7 +120,7 @@ pro mds$connect,host,status=status,quiet=quiet,port=port
endif
if (!version.release ne '5.0.3') then !ERROR_STATE.MSG="About to connect"
sock = call_external(MdsIPImage(),'IdlConnectToMds',host,value=[byte(!version.os ne 'windows')])
sockmin=1l-(!version.os eq 'MacOS')
sockmin=sockmin()
if (sock ge sockmin) then begin
status = 1
!MDS_SOCKET = sock
Expand Down Expand Up @@ -158,7 +162,7 @@ pro mdsconnect,host,status=status,quiet=quiet,port=port,socket=socket
endif

sock = call_external(MdsIPImage(),'IdlConnectToMds',host,value=[byte(!version.os ne 'windows')])
sockmin=1l-(!version.os eq 'MacOS')
sockmin=sockmin()
if (sock ge sockmin) then begin
status = 1
if not keyword_set(socket) then $
Expand Down