Skip to content

Commit

Permalink
getDRC should use the Conga namespace DRC #26
Browse files Browse the repository at this point in the history
  • Loading branch information
bpbecker committed Jul 24, 2023
1 parent a4ce7b3 commit 3edaba7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
7 changes: 5 additions & 2 deletions Source/isolate/RPCServer.dyalog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:Namespace RPCServer
:Namespace RPCServer
(⎕IO ⎕ML)1 1
SendProgress0
Protocol'' Set to IPv4 or IPv6 to lock in
Expand Down Expand Up @@ -74,7 +74,10 @@
allowremoteGetEnv 'AllowRemote' Remote access
allowremote(0allowremote)/{1¨(=',')}',',allowremote

z##.DRC.Init''
:If 9.2##.⎕NC'DRC' if DRC is not an instance of Conga.LIB
z##.DRC.Init''
:EndIf

localaddrs/{0::0 3 DNSLookup }¨'' 'localhost' Find all local addresses
:If 0=localaddrs /// paranoia: the above SHOULD work
localaddrs1 3'IPv4' '127.0.0.1'(127 0 0 1)
Expand Down
5 changes: 3 additions & 2 deletions Source/ynys/Init.dyalog
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{r}{allowremote}Init local;here;z;ss;op;maxws;ws;rt;iso;ports;pids;pclts;t
{r}{allowremote}Init local;here;z;ss;op;maxws;ws;rt;iso;ports;pids;pclts;t
r⎕THIS.⎕IO0
:If 0=⎕NC'allowremote' allowremote :EndIf
:If newSession''
Expand All @@ -12,7 +12,8 @@
zgetSet'debug'op.debug on or off
:Trap trapErr''
##.DRChere.DRCgetDRC op.drc
:If ~(zDRC.Init )0
:If 9.2⎕NC'DRC' if DRC is not an instance of Conga.LIB
:AndIf ~(zDRC.Init )0
('CONGA INIT FAILED: ',,z)⎕SIGNAL 11
:EndIf
zDRC.SetProp'.' 'Protocol'(op.protocol)
Expand Down
7 changes: 4 additions & 3 deletions Source/ynys/getDRC.dyalog
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
rgetDRC ref;ws
rgetDRC ref;ws
:If ref# rref Not set, so we must create it
:ElseIf 9=#.⎕NC'DRC' r#.DRC in # already?
:Else
ws'conga.dws'
:Trap 0
'DRC'#.⎕CY ws See if the interpreter can find it
'Conga'#.⎕CY ws See if the interpreter can find it
:Else
wsaddWSpath'conga.dws' Actually adds [DYALOG]/ws
:Trap 0
'DRC'#.⎕CY ws
'Conga'#.⎕CY ws
:Else
'Unable to locate conga.dws'⎕SIGNAL 11
:EndTrap
:EndTrap
#.DRC#.Conga.Init'isolate'
r#.DRC
:EndIf

0 comments on commit 3edaba7

Please sign in to comment.