Changeset 17506
- Timestamp:
- May 4, 2008, 1:39:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080430/psLib/src/types/psMetadata.c
r17498 r17506 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.168.6. 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2008-05-0 2 00:10:43$14 * @version $Revision: 1.168.6.3 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2008-05-04 23:39:27 $ 16 16 * 17 17 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 423 423 default: 424 424 // Other kinds of pointers 425 psWarning("Copying a pointer in the metadata item: %s (%x)\n", in->name, in->type); 425 // XXX EAM : why was this a warning?? 426 // psWarning("Copying a pointer in the metadata item: %s (%x)\n", in->name, in->type); 426 427 newItem = p_psMetadataItemAlloc(file, lineno, func, in->name, in->type, in->comment, in->data.V); 427 428 break; … … 502 503 // save a list of the MULTI entries which has REPLACE turned off? 503 504 504 psArray *multiItems = psArrayAlloc (128);505 psArray *multiItems = psArrayAllocEmpty (128); 505 506 506 507 psMetadataIterator *iter = psMetadataIteratorAlloc(in, PS_LIST_HEAD, NULL); … … 545 546 psMetadataItem *newItem = psMetadataItemCopy(inItem); // Copied item 546 547 if (!psMetadataAddItem(out, newItem, PS_LIST_TAIL, flag)) { 547 fprintf (stderr, "Error copying %s\n", inItem->name);548 psError(PS_ERR_UNKNOWN, false, "Error copying %s\n", inItem->name); 548 549 result = false; 549 550 } … … 692 693 693 694 // special block for items which are METADATA folders 694 if (item->type == PS_DATA_METADATA) { 695 if (existingEntry && (item->type == PS_DATA_METADATA)) { 696 // REPLACE and UPDATE must be mutually exclusive 697 psAssert ((!((flags & PS_META_REPLACE) && (flags & PS_META_UPDATE_FOLDER))), "cannot have both REPLACE and UPDATE"); 698 699 # if (0) 700 // handle the case of replace below 695 701 if (flags & PS_META_REPLACE) { 696 702 // drop the existing entry (skip if we are replacing with same pointer) 697 703 // XXX what if existingEntry is a MULTI? drop all? 704 // XXX this segment does not check for matched types 698 705 if (item != existingEntry) { 699 706 psMetadataRemoveKey(md, key); 700 707 } 708 existingEntry = NULL; 701 709 } 710 # endif 711 702 712 if (flags & PS_META_UPDATE_FOLDER) { 703 713 if (existingEntry->type != PS_DATA_METADATA) { … … 1246 1256 *status = false; 1247 1257 } else { 1248 psLogMsg(__func__, PS_LOG_ WARN, "%s isn't of type PS_DATA_META, as expected.\n", key);1258 psLogMsg(__func__, PS_LOG_DETAIL, "%s isn't of type PS_DATA_META, as expected.\n", key); 1249 1259 } 1250 1260 // value = NULL; … … 1281 1291 *status = false; 1282 1292 } else { 1283 psLogMsg(__func__, PS_LOG_ WARN, "%s isn't of type PS_DATA_TIME, as expected.\n", key);1293 psLogMsg(__func__, PS_LOG_DETAIL, "%s isn't of type PS_DATA_TIME, as expected.\n", key); 1284 1294 } 1285 1295 return NULL; … … 1316 1326 *status = false; 1317 1327 } else { 1318 psLogMsg(__func__, PS_LOG_ WARN, "%s isn't of type PS_DATA_STRING, as expected.\n", key);1328 psLogMsg(__func__, PS_LOG_DETAIL, "%s isn't of type PS_DATA_STRING, as expected.\n", key); 1319 1329 } 1320 1330 // value = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.
