Changeset 27061
- Timestamp:
- Feb 24, 2010, 2:25:34 PM (16 years ago)
- Location:
- trunk/ppSub/src
- Files:
-
- 2 edited
-
ppSub.c (modified) (1 diff)
-
ppSubData.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSub.c
r26982 r27061 66 66 psTimerStop(); 67 67 68 if (data && data->stats && data->statsFile) { 69 psString stats = psMetadataConfigFormat(data->stats); // Statistics to output 70 if (!stats || strlen(stats) == 0) { 71 psError(PPSUB_ERR_IO, false, "Unable to format statistics file"); 72 } else if (fprintf(data->statsFile, "%s", stats) != strlen(stats)) { 73 psError(PPSUB_ERR_IO, true, "Unable to write statistics file"); 74 } 75 psFree(stats); 76 if (fclose(data->statsFile) == EOF) { 77 psError(PPSUB_ERR_IO, true, "Unable to close statistics file"); 78 } 79 data->statsFile = NULL; 80 pmConfigRunFilenameAddWrite(data->config, "STATS", data->statsName); 81 } 82 68 83 if (data) { 69 84 psString dump_file = psMetadataLookupStr(NULL, data->config->arguments, "-dumpconfig"); -
trunk/ppSub/src/ppSubData.c
r25847 r27061 13 13 static void subDataFree(ppSubData *data) 14 14 { 15 if (data->statsFile) { 16 psString stats = psMetadataConfigFormat(data->stats); // Statistics to output 17 if (!stats || strlen(stats) == 0) { 18 psWarning("Unable to generate statistics file."); 19 } else { 20 fprintf(data->statsFile, "%s", stats); 21 } 22 psFree(stats); 23 fclose(data->statsFile); 24 pmConfigRunFilenameAddWrite(data->config, "STATS", data->statsName); 25 } 15 psAssert(!data->statsFile, "Statistics file still open."); 26 16 psFree(data->statsName); 27 17 psFree(data->stamps);
Note:
See TracChangeset
for help on using the changeset viewer.
