- Timestamp:
- Mar 17, 2009, 12:07:42 PM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090301/psModules
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/config/pmConfigDump.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090301/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psModules merged eligible /trunk/psModules merged eligible /branches/cnb_branch_20090215/psModules 21495-22685 /branches/eam_branches/eam_branch_20090303/psModules 23158-23228
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/cnb_branches/cnb_branch_20090301/psModules/src/config/pmConfigDump.c
r19399 r23351 54 54 psArray *keep = psStringSplitArray(save, " ,;", false); // List of items to keep 55 55 56 bool result = configCull(config->recipes, keep); // Result of culling 56 if (!configCull(config->recipes, keep)) { 57 psError(PS_ERR_UNKNOWN, false, "Unable to cull system recipes."); 58 psFree(keep); 59 return false; 60 } 57 61 psFree(keep); 58 62 59 return result; 63 // Need to cull recipes from all cameras as well 64 psMetadata *cameras = psMetadataLookupMetadata(NULL, config->system, "CAMERAS"); // Known cameras 65 if (!cameras) { 66 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find CAMERAS in the system configuration.\n"); 67 return false; 68 } 69 70 psMetadataIterator *iter = psMetadataIteratorAlloc(cameras, PS_LIST_HEAD, NULL); // Iterator for cameras 71 psMetadataItem *item; // Item from iteration 72 keep = psArrayAllocEmpty(1); 73 while ((item = psMetadataGetAndIncrement(iter))) { 74 psAssert(item->type == PS_DATA_METADATA, "Should only be metadata types on the camera list."); 75 psMetadata *camera = item->data.md; // Camera configuration 76 bool mdok; // Status of MD lookup 77 psMetadata *recipes = psMetadataLookupMetadata(&mdok, camera, "RECIPES"); // Recipe overrides 78 if (!recipes) { 79 continue; 80 } 81 if (!configCull(recipes, keep)) { 82 psError(PS_ERR_UNKNOWN, false, "Unable to cull recipes for camera %s", item->name); 83 psFree(iter); 84 psFree(keep); 85 return false; 86 } 87 } 88 psFree(iter); 89 psFree(keep); 90 91 return true; 60 92 } 61 93
Note:
See TracChangeset
for help on using the changeset viewer.
