Added the UPNP protocol command for non-persistent updates.
This commit is contained in:
parent
f185aceb41
commit
abdb91e58e
|
@ -194,6 +194,23 @@ module Ildus
|
|||
prot_msg 240, host, addr
|
||||
end
|
||||
|
||||
def upnp_cmd(host, interval, addr=nil)
|
||||
raise NotAuthError unless @account.authenticated?
|
||||
# FIXME: actually do something with the interval!
|
||||
if addr.nil?
|
||||
addr = Socket.getnameinfo(@io.getpeername).first
|
||||
addr = IPAddr.new(addr)
|
||||
else
|
||||
addr = IPAddr.new(addr)
|
||||
end
|
||||
@commit ||= @domain.update_host(host, addr)
|
||||
rescue HostNotFoundError
|
||||
prot_msg 425, host
|
||||
rescue RecordNotFoundError
|
||||
prot_msg 426, type, host
|
||||
else
|
||||
prot_msg 240, host, addr
|
||||
end
|
||||
def adda_cmd(host, new_alias)
|
||||
raise NotImplementedError
|
||||
end
|
||||
|
|
Reference in New Issue