mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	fix 0 port number on links to unknown nodes in the admin dot graph
This commit is contained in:
		
							parent
							
								
									f2345a9a63
								
							
						
					
					
						commit
						25661ebcad
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -656,6 +656,16 @@ func (a *admin) getResponse_dot() []byte {
 | 
			
		|||
			newInfo.name = "?"
 | 
			
		||||
			newInfo.key = key
 | 
			
		||||
			newInfo.options = "fontname=\"sans serif\" style=dashed color=\"#999999\" fontcolor=\"#999999\""
 | 
			
		||||
 | 
			
		||||
			coordsSplit := coordSlice(newInfo.key)
 | 
			
		||||
			if len(coordsSplit) != 0 {
 | 
			
		||||
				portStr := coordsSplit[len(coordsSplit)-1]
 | 
			
		||||
				portUint, err := strconv.ParseUint(portStr, 10, 64)
 | 
			
		||||
				if err == nil {
 | 
			
		||||
					newInfo.port = switchPort(portUint)
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			infos[key] = newInfo
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue