@@ -487,8 +487,8 @@ nodeController = do
487 ncEffectDied ident reason
487 ncEffectDied ident reason
488 NCMsg (ProcessIdentifier from) (Spawn proc ref) ->
488 NCMsg (ProcessIdentifier from) (Spawn proc ref) ->
489 ncEffectSpawn from proc ref
489 ncEffectSpawn from proc ref
490− NCMsg (ProcessIdentifier from) (Register label pid force) ->
490+ NCMsg (ProcessIdentifier from) (Register label atnode pid force) ->
491− ncEffectRegister from label pid force
491+ ncEffectRegister from label atnode pid force
492 NCMsg (ProcessIdentifier from) (WhereIs label) ->
492 NCMsg (ProcessIdentifier from) (WhereIs label) ->
493 ncEffectWhereIs from label
493 ncEffectWhereIs from label
494 NCMsg from (NamedSend label msg') ->
494 NCMsg from (NamedSend label msg') ->
@@ -609,8 +609,8 @@ ncEffectSpawn pid cProc ref = do
609-- Unified semantics does not explicitly describe how to implement 'register',
609-- Unified semantics does not explicitly describe how to implement 'register',
610-- but mentions it's "very similar to nsend" (Table 14)
610-- but mentions it's "very similar to nsend" (Table 14)
611-- We send a response indicated if the operation is invalid
611-- We send a response indicated if the operation is invalid
612−ncEffectRegister :: ProcessId -> String -> Maybe ProcessId -> Bool -> NC ()
612+ncEffectRegister :: ProcessId -> String -> NodeId -> Maybe ProcessId -> Bool -> NC ()
613−ncEffectRegister from label mPid reregistration = do
613+ncEffectRegister from label atnode mPid reregistration = do
614 node <- ask
614 node <- ask
615 currentVal <- gets (^. registryFor (label, localNodeId node))
615 currentVal <- gets (^. registryFor (label, localNodeId node))
@@ -621,9 +621,9 @@ ncEffectRegister from label mPid reregistration = do
621 do isvalidlocal <- isValidLocalIdentifier (ProcessIdentifier thepid)
621 do isvalidlocal <- isValidLocalIdentifier (ProcessIdentifier thepid)
622 return $ (isNothing currentVal /= reregistration) &&
622 return $ (isNothing currentVal /= reregistration) &&
623 (not (isLocal node (ProcessIdentifier thepid) ) || isvalidlocal )
623 (not (isLocal node (ProcessIdentifier thepid) ) || isvalidlocal )
624− if isLocal node (ProcessIdentifier from)
624+ if isLocal node (NodeIdentifier atnode)
625 then when (isOk) $
625 then when (isOk) $
626− do modify' $ registryFor (label, localNodeId node) ^= mPid
626+ do modify' $ registryFor (label, atnode) ^= mPid
627 let namedPid =
627 let namedPid =
628 head $ catMaybes [mPid, currentVal]
628 head $ catMaybes [mPid, currentVal]
629 when (not $ isLocal node (ProcessIdentifier namedPid)) $
629 when (not $ isLocal node (ProcessIdentifier namedPid)) $
@@ -633,9 +633,9 @@ ncEffectRegister from label mPid reregistration = do
633 WithImplicitReconnect
633 WithImplicitReconnect
635 { ctrlMsgSender = ProcessIdentifier from
635 { ctrlMsgSender = ProcessIdentifier from
636− , ctrlMsgSignal = Register label mPid reregistration
636+ , ctrlMsgSignal = Register label atnode mPid reregistration
638− else modify' $ registryFor (label,processNodeId from) ^= mPid
638+ else modify' $ registryFor (label,atnode) ^= mPid
639 liftIO $ sendMessage node
639 liftIO $ sendMessage node
640 (NodeIdentifier (localNodeId node))
640 (NodeIdentifier (localNodeId node))
641 (ProcessIdentifier from)
641 (ProcessIdentifier from)
@@ -708,7 +708,7 @@ destNid (Unlink ident) = Just $ nodeOf ident
708destNid (Monitor ref) = Just $ nodeOf (monitorRefIdent ref)
708destNid (Monitor ref) = Just $ nodeOf (monitorRefIdent ref)
709destNid (Unmonitor ref) = Just $ nodeOf (monitorRefIdent ref)
709destNid (Unmonitor ref) = Just $ nodeOf (monitorRefIdent ref)
710destNid (Spawn _ _) = Nothing
710destNid (Spawn _ _) = Nothing
711−destNid (Register _ _ _)= Nothing
711+destNid (Register _ _ _ _) = Nothing
712destNid (WhereIs _) = Nothing
712destNid (WhereIs _) = Nothing
713destNid (NamedSend _ _) = Nothing
713destNid (NamedSend _ _) = Nothing
714-- We don't need to forward 'Died' signals; if monitoring/linking is setup,
714-- We don't need to forward 'Died' signals; if monitoring/linking is setup,