Revision 6cf09f41
Added by Marc Dequènes almost 14 years ago
- ID 6cf09f4111b26b80fcc647de2c201fb1b22a30d8
lib/cyborghood/cyborg/botnet/backend/unix.rb | ||
---|---|---|
end
|
||
|
||
def contact_peer(peer, dont_open_new_connection = false, &block)
|
||
if peer.index("@")
|
||
short_peer, remote_host = peer.split("@")
|
||
raise CyberError.new(:unrecoverable, "backend/UNIX", "Cannot contact remote peers with this backend") if remote_host.downcase != self.host_fqdn.downcase
|
||
end
|
||
|
||
super(peer, block, dont_open_new_connection) do |callback|
|
||
EventMachine.connect_unix_domain(peer_socket(peer), Conversation, self, callback)
|
||
EventMachine.connect_unix_domain(peer_socket(short_peer), Conversation, self, callback)
|
||
end
|
||
end
|
||
|
Also available in: Unified diff
[fix] backend/UNIX: handle long peer names correctly