@@ -68,7 +68,6 @@ func main() {
6868// DemoDoConnect creates the tunnel to the remote machine (via guacd)
6969func DemoDoConnect (request * http.Request ) (guac.Tunnel , error ) {
7070 config := guac .NewGuacamoleConfiguration ()
71- info := guac .NewGuacamoleClientInformation ()
7271
7372 query := request .URL .Query ()
7473 config .Protocol = query .Get ("scheme" )
@@ -79,20 +78,20 @@ func DemoDoConnect(request *http.Request) (guac.Tunnel, error) {
7978
8079 var err error
8180 if query .Get ("width" ) != "" {
82- info .OptimalScreenHeight , err = strconv .Atoi (query .Get ("width" ))
83- if err != nil || info .OptimalScreenHeight == 0 {
81+ config .OptimalScreenHeight , err = strconv .Atoi (query .Get ("width" ))
82+ if err != nil || config .OptimalScreenHeight == 0 {
8483 logrus .Error ("Invalid height" )
85- info .OptimalScreenHeight = 600
84+ config .OptimalScreenHeight = 600
8685 }
8786 }
8887 if query .Get ("height" ) != "" {
89- info .OptimalScreenWidth , err = strconv .Atoi (query .Get ("height" ))
90- if err != nil || info .OptimalScreenWidth == 0 {
88+ config .OptimalScreenWidth , err = strconv .Atoi (query .Get ("height" ))
89+ if err != nil || config .OptimalScreenWidth == 0 {
9190 logrus .Error ("Invalid width" )
92- info .OptimalScreenWidth = 800
91+ config .OptimalScreenWidth = 800
9392 }
9493 }
95- info .AudioMimetypes = []string {"audio/L16" , "rate=44100" , "channels=2" }
94+ config .AudioMimetypes = []string {"audio/L16" , "rate=44100" , "channels=2" }
9695
9796 logrus .Debug ("Connecting to guacd" )
9897 addr , err := net .ResolveTCPAddr ("tcp" , "127.0.0.1:4822" )
@@ -109,7 +108,7 @@ func DemoDoConnect(request *http.Request) (guac.Tunnel, error) {
109108 if request .URL .Query ().Get ("uuid" ) != "" {
110109 config .ConnectionID = request .URL .Query ().Get ("uuid" )
111110 }
112- err = stream .Handshake (config , info )
111+ err = stream .Handshake (config )
113112 if err != nil {
114113 return nil , err
115114 }
0 commit comments