Changeset 2681 for trunk/psLib/src/astronomy/psMetadata.c
- Timestamp:
- Dec 9, 2004, 4:50:16 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/astronomy/psMetadata.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astronomy/psMetadata.c
r2659 r2681 12 12 * @author Ross Harman, MHPCC 13 13 * 14 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $15 * @date $Date: 2004-12- 07 23:27:25$14 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 15 * @date $Date: 2004-12-10 02:50:14 $ 16 16 * 17 17 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 352 352 { 353 353 psList* mdList = NULL; 354 psList* entryList = NULL;355 354 psHash* mdTable = NULL; 356 355 psMetadataItem* entry = NULL; 357 psMetadataItem* entryChild = NULL;358 356 359 357 … … 375 373 } 376 374 377 if (entry->type == PS_META_LIST) {378 379 // Table entry has children. Entry and children must be removed from metadata collection's list380 psListSetIterator(entryList, PS_LIST_HEAD);381 entryChild = psListGetCurrent(entryList);382 while(entryChild != NULL) {383 if (!psListRemove(mdList, PS_LIST_UNKNOWN, entryChild)) {384 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);385 return false;386 }387 entryChild = psListGetNext(entryList);388 }389 } else {390 391 // Table entry has no children. Remove entry from metadata collection's list392 if (!psListRemove(mdList, PS_LIST_UNKNOWN, entry)) {393 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key);394 return false;395 }396 }397 // Remove entry from metadata collection's table398 if (!psHashRemove(mdTable, key)) {399 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key);400 return false;401 }402 375 } else { 403 376 … … 414 387 return false; 415 388 } 416 // Use recursive remove, now that key is known 417 psMetadataRemove(md, PS_LIST_UNKNOWN, key); 389 } 390 391 if (!psListRemoveData(mdList, entry)) { 392 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_LIST_FAILED, key); 393 return false; 394 } 395 396 // Remove entry from metadata collection's table 397 if (!psHashRemove(mdTable, key)) { 398 psError(PS_ERR_UNKNOWN, false, PS_ERRORTEXT_psMetadata_REMOVE_TABLE_FAILED, key); 399 return false; 418 400 } 419 401
Note:
See TracChangeset
for help on using the changeset viewer.
