Browse Source

Use proper locks terminology.

Georgi Chorbadzhiyski 9 years ago
parent
commit
3adee6c91b
4 changed files with 7 additions and 7 deletions
  1. 1
    1
      ChangeLog
  2. 4
    4
      cmd.c
  3. 1
    1
      data.h
  4. 1
    1
      videohubctrl.c

+ 1
- 1
ChangeLog View File

3
  * Fix port routing. Previously it was reversed and incorrect.
3
  * Fix port routing. Previously it was reversed and incorrect.
4
  * Fix command parsing of multiple commands comming in one packet.
4
  * Fix command parsing of multiple commands comming in one packet.
5
  * Add -m / --monitor parameter for live configuration monitoring.
5
  * Add -m / --monitor parameter for live configuration monitoring.
6
- * Add support for reporting exclusive and non-exclusive locks.
6
+ * Add support for reporting own locks and other's locks.
7
 
7
 
8
 2014-11-26 : Version 0.1
8
 2014-11-26 : Version 0.1
9
  * Initial vesion with support for showing Videohub configuration
9
  * Initial vesion with support for showing Videohub configuration

+ 4
- 4
cmd.c View File

258
 
258
 
259
 		case CMD_VIDEO_OUTPUT_LOCKS:
259
 		case CMD_VIDEO_OUTPUT_LOCKS:
260
 			if (valid_slot) {
260
 			if (valid_slot) {
261
-				// L is exclusive lock     - can be set only via USB
262
-				// O is non-exclusive lock - can be set via network
261
+				// L is lock owned by somebody else (set from other IP address)
262
+				// O is lock owned by us (set from our IP address)
263
 				if (slot_data[0] == 'L' || slot_data[0] == 'O') {
263
 				if (slot_data[0] == 'L' || slot_data[0] == 'O') {
264
 					data->outputs[slot_pos].locked = true;
264
 					data->outputs[slot_pos].locked = true;
265
 					if (slot_data[0] == 'L')
265
 					if (slot_data[0] == 'L')
266
-						data->outputs[slot_pos].locked_exclusive = true;
266
+						data->outputs[slot_pos].locked_other = true;
267
 					else
267
 					else
268
-						data->outputs[slot_pos].locked_exclusive = false;
268
+						data->outputs[slot_pos].locked_other = false;
269
 				} else {
269
 				} else {
270
 					data->outputs[slot_pos].locked = false;
270
 					data->outputs[slot_pos].locked = false;
271
 				}
271
 				}

+ 1
- 1
data.h View File

40
 	char			name[MAX_NAME_LEN];
40
 	char			name[MAX_NAME_LEN];
41
 	unsigned int	routed_to;
41
 	unsigned int	routed_to;
42
 	bool			locked;
42
 	bool			locked;
43
-	bool			locked_exclusive;
43
+	bool			locked_other;
44
 };
44
 };
45
 
45
 
46
 struct videohub_data {
46
 struct videohub_data {

+ 1
- 1
videohubctrl.c View File

141
 	for(i = 0; i < d->device.num_video_inputs; i++) {
141
 	for(i = 0; i < d->device.num_video_inputs; i++) {
142
 		printf("| %2d | %c | %-27s | %-27s |\n",
142
 		printf("| %2d | %c | %-27s | %-27s |\n",
143
 			i + 1,
143
 			i + 1,
144
-			d->outputs[i].locked ? (d->outputs[i].locked_exclusive ? 'L' : 'O') : ' ',
144
+			d->outputs[i].locked ? (d->outputs[i].locked_other ? 'L' : 'O') : ' ',
145
 			d->inputs[d->outputs[i].routed_to].name,
145
 			d->inputs[d->outputs[i].routed_to].name,
146
 			d->outputs[i].name
146
 			d->outputs[i].name
147
 		);
147
 		);

Loading…
Cancel
Save