diff --git a/actioncam.go b/actioncam.go index 2987169..6260582 100644 --- a/actioncam.go +++ b/actioncam.go @@ -163,7 +163,7 @@ func main() { bufio.NewReader(os.Stdin).ReadBytes('\n') }, PreRun: func(cmd *cobra.Command, args []string) { - camera = connectAndLogin(net.ParseIP(args[0]), int(port), username, password, verbose) + camera = connectAndLogin(net.ParseIP(args[1]), int(port), username, password, verbose) }, PostRun: func(cmd *cobra.Command, args []string) { camera.Disconnect() diff --git a/libipcamera/protocol.go b/libipcamera/protocol.go index 1eafdff..5d467f7 100644 --- a/libipcamera/protocol.go +++ b/libipcamera/protocol.go @@ -26,7 +26,7 @@ type Message struct { } func (m *Message) String() string { - return fmt.Sprintf("{ Message Header=%s, Payload=\n%s\n }", m.Header.String(), hex.Dump(m.Payload)) + return fmt.Sprintf("{ Message\n\tHeader=%s,\n\tPayload=\n%s\n}", m.Header.String(), hex.Dump(m.Payload)) } // StreamHeader is a live preview message header