IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 7, 2006, 2:23:33 PM (20 years ago)
Author:
jhoblitt
Message:

fix handling of nested metadata

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/glueforge/templates/psdb/printmetadatasraw.tt

    r8206 r8219  
    44    PS_ASSERT_PTR_NON_NULL(mdname, false);
    55
     6    psMetadata *output = psMetadataAlloc();
    67    for (long i = 0; i < psArrayLength(mds); i++) {
    78        psMetadata *md = mds->data[i];
    8         if (![% pkg_namespace %]PrintMetadataRaw(stream, md, mdcf)) {
    9             psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
     9        if (!psMetadataAddMetadata(output, PS_LIST_TAIL, mdname, PS_META_DUPLICATE_OK, NULL, md)) {
     10            psError(PS_ERR_UNKNOWN, false, "failed to add a metadata item");
     11            psFree(output);
    1012            return false;
    1113        }
    1214    }
    1315
     16    if (![% pkg_namespace %]PrintMetadataRaw(stream, output, mdcf)) {
     17        psError(PS_ERR_UNKNOWN, false, "failed to print metadata");
     18        psFree(output);
     19        return false;
     20    }
     21
     22    psFree(output);
     23
    1424    return true;
    1525}
Note: See TracChangeset for help on using the changeset viewer.