Fix OS information in server info dialog fixme.

This commit is contained in:
Mikkel Krautz 2011-11-12 22:18:55 +01:00
parent 2751c1824e
commit 1baecfdbec

View file

@ -16,6 +16,7 @@ import (
"log" "log"
"net" "net"
"packetdatastream" "packetdatastream"
"runtime"
"time" "time"
) )
@ -446,12 +447,15 @@ func (client *Client) receiver() {
// information we must send it our version information so it knows // information we must send it our version information so it knows
// what version of the protocol it should speak. // what version of the protocol it should speak.
if client.state == StateClientConnected { if client.state == StateClientConnected {
client.sendMessage(&mumbleproto.Version{ version := &mumbleproto.Version{
Version: proto.Uint32(0x10203), Version: proto.Uint32(0x10203),
Release: proto.String("Grumble"), Release: proto.String("Grumble"),
}) }
// fixme(mkrautz): Re-add OS information... Does it break anything? It seems like if client.server.cfg.BoolValue("SendOSInfo") {
// the client discards the version message if there is no OS information in it. version.Os = proto.String(runtime.GOOS)
version.OsVersion = proto.String("(Unknown version)")
}
client.sendMessage(version)
client.state = StateServerSentVersion client.state = StateServerSentVersion
continue continue
} else if client.state == StateServerSentVersion { } else if client.state == StateServerSentVersion {