Changeset 10993
- Timestamp:
- Jan 8, 2007, 5:57:58 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r10965 r10993 4 4 * @author EAM (IfA) 5 5 * 6 * @version $Revision: 1.7 0$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-01-0 8 22:26:06$6 * @version $Revision: 1.71 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-01-09 03:57:58 $ 8 8 * 9 9 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 783 783 PS_ASSERT_PTR_NON_NULL(header, NULL); 784 784 785 786 785 psMetadata *format = NULL; // The winning format 787 786 psString name = NULL; // Name of the winning format … … 814 813 config->cameraName = psStringCopy(camerasItem->name); 815 814 config->formatName = name; 816 config->format = psMemIncrRefCounter(format);815 config->format = format; 817 816 } else { 818 817 psErr *error = psErrorLast(); … … 833 832 // Now we have the camera, we can read the recipes 834 833 pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL); 835 return format;834 return psMemIncrRefCounter(format); 836 835 } 837 836 … … 842 841 return NULL; 843 842 } 843 844 // Free the format and name just in case they've already been allocated 845 if (config->format || config->formatName) { 846 if (config->format != format || strcmp(config->formatName, name) != 0) { 847 psWarning("Default camera format configuration has changed!\n"); 848 } 849 psFree(config->format); 850 psFree(config->formatName); 851 } 844 852 config->formatName = name; 845 config->format = psMemIncrRefCounter(format);846 return format;853 config->format = format; 854 return psMemIncrRefCounter(format); 847 855 } 848 856
Note:
See TracChangeset
for help on using the changeset viewer.
