1
0
Fork 0
forked from External/grumble

Grumble gofmt run.

This commit is contained in:
Mikkel Krautz 2011-04-28 20:49:01 +02:00
parent f8d511a8c3
commit 2e0a825bc0
4 changed files with 18 additions and 18 deletions

View file

@ -176,7 +176,7 @@ func (client *Client) RejectAuth(kind, reason string) {
func (client *Client) readProtoMessage() (msg *Message, err os.Error) {
var (
length uint32
kind uint16
kind uint16
)
// Read the message type (16-bit big-endian unsigned integer)
@ -522,8 +522,8 @@ func (client *Client) sendChannelList() {
func (client *Client) sendChannelTree(channel *Channel) {
chanstate := &mumbleproto.ChannelState{
ChannelId: proto.Uint32(uint32(channel.Id)),
Name: proto.String(channel.Name),
ChannelId: proto.Uint32(uint32(channel.Id)),
Name: proto.String(channel.Name),
}
if channel.parent != nil {
chanstate.Parent = proto.Uint32(uint32(channel.parent.Id))

View file

@ -14,10 +14,10 @@ import (
)
type frozenServer struct {
Id int "id"
MaxUsers int "max_user"
Channels []frozenChannel "channels"
Users []frozenUser "users"
Id int "id"
MaxUsers int "max_user"
Channels []frozenChannel "channels"
Users []frozenUser "users"
}
type frozenUser struct {

View file

@ -953,7 +953,7 @@ func (server *Server) handleAclMessage(client *Client, msg *Message) {
reply.Groups = []*mumbleproto.ACL_ChanGroup{}
for name, _ := range allnames {
var (
group *Group
group *Group
pgroup *Group
)
group = channel.Groups[name]
@ -1242,7 +1242,7 @@ func (server *Server) handleUserList(client *Client, msg *Message) {
client.Panic(err.String())
return
}
// Rename, registration removal
// Rename, registration removal
} else {
for _, listUser := range userlist.Users {
uid := *listUser.UserId
@ -1252,7 +1252,7 @@ func (server *Server) handleUserList(client *Client, msg *Message) {
// De-register a user
if listUser.Name == nil {
server.RemoveRegistration(uid)
// Rename user
// Rename user
} else {
// todo(mkrautz): Validate name.
user, ok := server.Users[uid]

View file

@ -83,18 +83,18 @@ type Server struct {
Channels map[int]*Channel
// Users
Users map[uint32]*User
UserCertMap map[string]*User
UserNameMap map[string]*User
nextUserId uint32
Users map[uint32]*User
UserCertMap map[string]*User
UserNameMap map[string]*User
nextUserId uint32
// ACL cache
aclcache ACLCache
}
type freezeRequest struct {
done chan bool
readCloser io.ReadCloser
done chan bool
readCloser io.ReadCloser
}
// Allocate a new Murmur instance
@ -992,13 +992,13 @@ func (s *Server) FreezeServer() io.ReadCloser {
if err != nil {
log.Panicf("Unable to freeze the server")
}
fr := &freezeRequest{done:make(chan bool)}
fr := &freezeRequest{done: make(chan bool)}
go s.handleFreezeRequest(fr, &fs)
<-fr.done
return fr.readCloser
}
fr := &freezeRequest{done:make(chan bool)}
fr := &freezeRequest{done: make(chan bool)}
s.freezeRequest <- fr
<-fr.done
return fr.readCloser