fix: giving an alias precedence over hostname in events view.

This commit is contained in:
evilsocket 2018-02-10 17:44:58 +01:00
commit 7ae63ed409

View file

@ -28,9 +28,9 @@ func (s EventsStream) viewEndpointEvent(e session.Event) {
vend = fmt.Sprintf(" (%s)", t.Vendor) vend = fmt.Sprintf(" (%s)", t.Vendor)
} }
if t.Hostname != "" { if t.Alias != "" {
name = fmt.Sprintf(" (%s)", t.Hostname) name = fmt.Sprintf(" (%s)", t.Hostname)
} else if t.Alias != "" { } else if t.Hostname != "" {
name = fmt.Sprintf(" (%s)", t.Alias) name = fmt.Sprintf(" (%s)", t.Alias)
} }