added check for recorder cmdline flags

This commit is contained in:
amit bezalel 2017-08-05 02:18:29 +03:00
parent 39d74c9762
commit 594e7393ca

View File

@ -3,6 +3,7 @@ package main
import (
"flag"
"net"
"os"
"time"
"vncproxy/client"
"vncproxy/common"
@ -21,6 +22,19 @@ func main() {
flag.Parse()
if *targetVncPort == "" {
logger.Error("no target vnc server port defined")
flag.Usage()
os.Exit(1)
}
if *targetVncPass == "" {
logger.Warn("no password defined, trying to connect with null authentication")
}
if *recordDir == "" {
logger.Warn("FBS recording is turned off")
}
//nc, err := net.Dial("tcp", "192.168.1.101:5903")
nc, err := net.Dial("tcp", "localhost:"+*targetVncPort)