Moving the untrustedMode setting into the marshalling ops

This commit is contained in:
Viktor Klang 2011-11-24 10:38:36 +01:00
parent abcaf01525
commit 4a64428e48
2 changed files with 10 additions and 6 deletions

View file

@ -292,7 +292,7 @@ class ActiveRemoteClientHandler(
}
case arp: AkkaRemoteProtocol if arp.hasMessage
client.remoteSupport.receiveMessage(new RemoteMessage(arp.getMessage, client.remoteSupport, client.loader), untrustedMode = false) //TODO FIXME Sensible or not?
client.remoteSupport.receiveMessage(new RemoteMessage(arp.getMessage, client.remoteSupport, client.loader))
case other
throw new RemoteClientException("Unknown message received in remote client handler: " + other, client.remoteSupport, client.remoteAddress)
@ -359,6 +359,8 @@ class NettyRemoteSupport(_system: ActorSystem) extends RemoteSupport(_system) wi
private val remoteClients = new HashMap[RemoteAddress, RemoteClient]
private val clientsLock = new ReentrantReadWriteLock
override protected def useUntrustedMode = serverSettings.UNTRUSTED_MODE
protected[akka] def send(message: Any,
senderOption: Option[ActorRef],
recipientAddress: RemoteAddress,
@ -629,7 +631,7 @@ class RemoteServerHandler(
override def messageReceived(ctx: ChannelHandlerContext, event: MessageEvent) = try {
event.getMessage match {
case remote: AkkaRemoteProtocol if remote.hasMessage
remoteSupport.receiveMessage(new RemoteMessage(remote.getMessage, remoteSupport, applicationLoader), UNTRUSTED_MODE)
remoteSupport.receiveMessage(new RemoteMessage(remote.getMessage, remoteSupport, applicationLoader))
case remote: AkkaRemoteProtocol if remote.hasInstruction
val instruction = remote.getInstruction