|
@@ -197,7 +197,11 @@ bool parse_command(struct videohub_data *d, char *cmd) {
|
197
|
197
|
snprintf(s_port->port[port_num].name, sizeof(s_port->port[port_num].name), "%s", port_data);
|
198
|
198
|
break;
|
199
|
199
|
case PARSE_STATUS:
|
200
|
|
- snprintf(s_port->port[port_num].status, sizeof(s_port->port[port_num].status), "%s", port_data);
|
|
200
|
+ s_port->port[port_num].status = S_UNKNOWN;
|
|
201
|
+ if (streq("BNC", port_data)) s_port->port[port_num].status = S_BNC;
|
|
202
|
+ else if (streq("Optical", port_data)) s_port->port[port_num].status = S_OPTICAL;
|
|
203
|
+ else if (streq("RS422", port_data)) s_port->port[port_num].status = S_RS422;
|
|
204
|
+ else if (streq("None", port_data)) s_port->port[port_num].status = S_NONE;
|
201
|
205
|
break;
|
202
|
206
|
case PARSE_DIR:
|
203
|
207
|
s_port->port[port_num].direction = DIR_AUTO;
|