Browse Source

Ignore END PRELUDE command

It doesn't seem to do anything and just spams that logs. Thanks to
Jean-Francois Panisset for the report.
Georgi Chorbadzhiyski 6 years ago
parent
commit
c9ac382c5e
4 changed files with 5 additions and 13 deletions
  1. 1
    0
      ChangeLog
  2. 2
    0
      cmd.c
  3. 2
    1
      cmd.h
  4. 0
    12
      test/test-17.ok

+ 1
- 0
ChangeLog View File

@@ -1,6 +1,7 @@
1 1
 |-----------------------------------------------------------------------|
2 2
 xxxx-xx-xx : Version -dev
3 3
  * Add parsing support for CONFIGURATION command
4
+ * Ignore 'END PRELUDE' command
4 5
 
5 6
 2014-12-08 : Version 2.0
6 7
  * Add support for --list-proc-units and --list-frames.

+ 2
- 0
cmd.c View File

@@ -23,6 +23,7 @@ const char *videohub_commands_text[NUM_COMMANDS] = {
23 23
 	[CMD_PROTOCOL_PREAMBLE]    = "PROTOCOL PREAMBLE",
24 24
 	[CMD_VIDEOHUB_DEVICE]      = "VIDEOHUB DEVICE",
25 25
 	[CMD_CONFIGURATION]        = "CONFIGURATION",
26
+	[CMD_END_PRELUDE]          = "END PRELUDE",
26 27
 	[CMD_INPUT_LABELS]         = "INPUT LABELS",
27 28
 	[CMD_OUTPUT_LABELS]        = "OUTPUT LABELS",
28 29
 	[CMD_VIDEO_OUTPUT_LOCKS]   = "VIDEO OUTPUT LOCKS",
@@ -161,6 +162,7 @@ struct videohub_commands videohub_commands[NUM_COMMANDS] = {
161 162
 		.port_id1 = "frame",
162 163
 		.opt_prefix = "fr",
163 164
 	},
165
+	[CMD_END_PRELUDE]          = { .cmd = CMD_END_PRELUDE         , .type = PARSE_NONE },
164 166
 	[CMD_PING]                 = { .cmd = CMD_PING                , .type = PARSE_NONE },
165 167
 	[CMD_ACK]                  = { .cmd = CMD_ACK                 , .type = PARSE_NONE },
166 168
 	[CMD_NAK]                  = { .cmd = CMD_NAK                 , .type = PARSE_NONE },

+ 2
- 1
cmd.h View File

@@ -15,12 +15,13 @@
15 15
 
16 16
 #include <stdbool.h>
17 17
 
18
-#define NUM_COMMANDS 25
18
+#define NUM_COMMANDS 26
19 19
 
20 20
 enum vcmd {
21 21
 	CMD_PROTOCOL_PREAMBLE,
22 22
 	CMD_VIDEOHUB_DEVICE,
23 23
 	CMD_CONFIGURATION,
24
+	CMD_END_PRELUDE,
24 25
 	CMD_INPUT_LABELS,
25 26
 	CMD_OUTPUT_LABELS,
26 27
 	CMD_VIDEO_OUTPUT_LOCKS,

+ 0
- 12
test/test-17.ok View File

@@ -15,12 +15,6 @@ WARNING: Videohub sent unknown command!
15 15
          Please report this command to author's email: georgi@unixsol.org
16 16
          You may use -q or --quiet to suppress the message.
17 17
 ---------8<-----------8<----------- cut here ---------8<------------8<---------
18
-END PRELUDE:
19
----------8<-----------8<----------- cut here ---------8<------------8<---------
20
-WARNING: Videohub sent unknown command!
21
-         Please report this command to author's email: georgi@unixsol.org
22
-         You may use -q or --quiet to suppress the message.
23
----------8<-----------8<----------- cut here ---------8<------------8<---------
24 18
 ENGINEERING:
25 19
 0 Hack
26 20
 1 Hack
@@ -36,12 +30,6 @@ WARNING: Videohub sent unknown command!
36 30
          Please report this command to author's email: georgi@unixsol.org
37 31
          You may use -q or --quiet to suppress the message.
38 32
 ---------8<-----------8<----------- cut here ---------8<------------8<---------
39
-END PRELUDE:
40
----------8<-----------8<----------- cut here ---------8<------------8<---------
41
-WARNING: Videohub sent unknown command!
42
-         Please report this command to author's email: georgi@unixsol.org
43
-         You may use -q or --quiet to suppress the message.
44
----------8<-----------8<----------- cut here ---------8<------------8<---------
45 33
 ENGINEERING:
46 34
 0 Debug
47 35
 ---------8<-----------8<----------- cut here ---------8<------------8<---------

Loading…
Cancel
Save