Changeset 11041
- Timestamp:
- Jan 11, 2007, 12:55:36 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.c
r10993 r11041 4 4 * @author EAM (IfA) 5 5 * 6 * @version $Revision: 1.7 1$ $Name: not supported by cvs2svn $7 * @date $Date: 2007-01- 09 03:57:58$6 * @version $Revision: 1.72 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-01-11 22:55:36 $ 8 8 * 9 9 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 1047 1047 1048 1048 // convert the supplied name, create a new output psString 1049 psString pmConfigConvertFilename (char *filename, pmConfig *config) 1050 { 1049 psString pmConfigConvertFilename(const char *filename, const pmConfig *config) 1050 { 1051 PS_ASSERT_STRING_NON_EMPTY(filename, NULL); 1052 PS_ASSERT_PTR_NON_NULL(config, NULL); 1051 1053 1052 1054 psString newName = psStringCopy (filename); … … 1065 1067 // replace path://PATH with matched datapath 1066 1068 if (!strncasecmp (newName, "path://", strlen("path://"))) { 1069 PS_ASSERT_METADATA_NON_NULL(config->site, NULL); 1070 1067 1071 // filename should be of the form: path://PATH/rest/of/file 1068 1072 // replace PATH with matching name from config->site:DATAPATH … … 1085 1089 char *realpath = psMetadataLookupStr (NULL, datapath, path); 1086 1090 if (realpath == NULL) { 1087 psError(PS_ERR_UNKNOWN, true, "path (%s) not defined in config.site:DATAPATH for PATH-style name %s", path, newName); 1088 psFree (newName); 1089 psFree (path); 1091 psError(PS_ERR_UNKNOWN, true, 1092 "path (%s) not defined in config.site:DATAPATH for PATH-style name %s", 1093 path, newName); 1094 psFree(newName); 1095 psFree(path); 1090 1096 return false; 1091 1097 } 1092 psFree (path);1098 psFree(path); 1093 1099 1094 1100 char *tmpName = NULL; 1095 psStringAppend (&tmpName, "%s/%s", realpath, mark + 1);1096 psFree (newName);1101 psStringAppend(&tmpName, "%s/%s", realpath, mark + 1); 1102 psFree(newName); 1097 1103 newName = tmpName; 1098 1104 }
Note:
See TracChangeset
for help on using the changeset viewer.
