Shameful bugfix.
This commit is contained in:
		
							parent
							
								
									088980109d
								
							
						
					
					
						commit
						ff29717bbd
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -625,13 +625,13 @@ class DNSManager::Storage::Zone
 | 
			
		|||
 | 
			
		||||
	def get_rr(rrid : UInt32) : ResourceRecord?
 | 
			
		||||
		@resources.each do |rr|
 | 
			
		||||
			return rr if rr.rrid = rrid
 | 
			
		||||
			return rr if rr.rrid == rrid
 | 
			
		||||
		end
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
	def update_rr(rr : ResourceRecord)
 | 
			
		||||
		puts "updating rr #{rr.rrid}"
 | 
			
		||||
		@resources.select! { |x| x.rrid == rr.rrid }
 | 
			
		||||
		@resources.select! { |x| x.rrid != rr.rrid }
 | 
			
		||||
		@resources << rr
 | 
			
		||||
	end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue