Changeset 8993
- Timestamp:
- 10/24/13 09:03:21 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/module-dvbapi.c
r8990 r8993 439 439 return 1; 440 440 #else 441 int32_t i , devnum = -1, dmx_fd = 0, boxnum = sizeof(devices) / sizeof(struct box_devices);441 int32_t i = 0, n = 0, devnum = -1, dmx_fd = 0, boxnum = sizeof(devices) / sizeof(struct box_devices); 442 442 char device_path[128], device_path2[128]; 443 443 444 for(i = 0; i < boxnum; i++)444 while (i < boxnum) 445 445 { 446 446 snprintf(device_path2, sizeof(device_path2), devices[i].demux_device, 0); 447 snprintf(device_path, sizeof(device_path), devices[i].path, 0);447 snprintf(device_path, sizeof(device_path), devices[i].path, n); 448 448 strncat(device_path, device_path2, sizeof(device_path) - strlen(device_path) - 1); 449 449 if((dmx_fd = open(device_path, O_RDWR | O_NONBLOCK)) > 0) … … 454 454 break; 455 455 } 456 /* try at least 8 adapters */ 457 if (strchr(devices[i].path, '%') != NULL) n++; else { n = 0; i++; } 456 458 } 457 459
Note:
See TracChangeset
for help on using the changeset viewer.