Browse Source

Small fix for serial directions.

Georgi Chorbadzhiyski 9 years ago
parent
commit
39bc206641
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cmd.c

+ 2
- 2
cmd.c View File

@@ -201,8 +201,8 @@ bool parse_command(struct videohub_data *d, char *cmd) {
201 201
 			break;
202 202
 		case PARSE_DIR:
203 203
 			s_port->port[port_num].direction = DIR_AUTO;
204
-			if (streq("control", port_data)) s_port->port[port_num].direction = DIR_CONTROL;
205
-			if (streq("slave", port_data))   s_port->port[port_num].direction = DIR_SLAVE;
204
+			if (streq("control", port_data))      s_port->port[port_num].direction = DIR_CONTROL;
205
+			else if (streq("slave", port_data))   s_port->port[port_num].direction = DIR_SLAVE;
206 206
 			break;
207 207
 		case PARSE_ROUTE:
208 208
 			dest_port_num = strtoul(port_data, NULL, 10);

Loading…
Cancel
Save