Shameful bugfix.

This commit is contained in:
Philippe Pittoli 2024-03-13 03:00:52 +01:00
parent 088980109d
commit ff29717bbd

View File

@ -625,13 +625,13 @@ class DNSManager::Storage::Zone
def get_rr(rrid : UInt32) : ResourceRecord? def get_rr(rrid : UInt32) : ResourceRecord?
@resources.each do |rr| @resources.each do |rr|
return rr if rr.rrid = rrid return rr if rr.rrid == rrid
end end
end end
def update_rr(rr : ResourceRecord) def update_rr(rr : ResourceRecord)
puts "updating rr #{rr.rrid}" puts "updating rr #{rr.rrid}"
@resources.select! { |x| x.rrid == rr.rrid } @resources.select! { |x| x.rrid != rr.rrid }
@resources << rr @resources << rr
end end