fix byte referencing

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
This commit is contained in:
Василий Толстов 2017-06-29 15:19:04 +03:00
parent d98d2dfc52
commit 3153ecf43a
2 changed files with 5 additions and 2 deletions

View File

@ -86,6 +86,9 @@ func (c *ClientConn) Close() error {
close(c.quit)
c.quit = nil
}
if c.quitCh != nil {
close(c.quitCh)
}
return c.c.Close()
}
@ -111,7 +114,7 @@ func (c *ClientConn) PixelFormat() *PixelFormat {
return c.pixelFormat
}
func (c *ClientConn) SetDesktopName(name []byte) {
c.desktopName = name
copy(c.desktopName, name)
}
func (c *ClientConn) SetPixelFormat(pf *PixelFormat) error {
c.pixelFormat = pf

View File

@ -94,7 +94,7 @@ func (c *ServerConn) PixelFormat() *PixelFormat {
return c.pixelFormat
}
func (c *ServerConn) SetDesktopName(name []byte) {
c.desktopName = name
copy(c.desktopName, name)
}
func (c *ServerConn) SetPixelFormat(pf *PixelFormat) error {
c.pixelFormat = pf