Changeset 18908 for trunk/psModules/src/camera/pmFPAfileDefine.c
- Timestamp:
- Aug 4, 2008, 5:45:56 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileDefine.c (modified) (15 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileDefine.c
r18567 r18908 24 24 25 25 # define FPA_TEST_ASSERT(A){ \ 26 assert(A->format == NULL); \27 assert(A->formatName == NULL); \28 assert(A->filerule == NULL); \29 assert(A->filesrc == NULL); }26 assert(A->format == NULL); \ 27 assert(A->formatName == NULL); \ 28 assert(A->filerule == NULL); \ 29 assert(A->filesrc == NULL); } 30 30 31 31 // Parse an option from a metadata, returning the appropriate integer value … … 164 164 } else { 165 165 bool mdok; // Status of MD lookup 166 psMetadata *cameras = psMetadataLookupMetadata(&mdok, config-> complete, "CAMERAS"); // Known cameras166 psMetadata *cameras = psMetadataLookupMetadata(&mdok, config->system, "CAMERAS"); // Known cameras 167 167 if (!mdok || !cameras) { 168 168 psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n"); … … 486 486 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName); 487 487 psFree(phu); 488 psFree(camera);489 psFree(formatName);488 psFree(camera); 489 psFree(formatName); 490 490 psFree(realName); 491 491 return NULL; … … 498 498 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", realName); 499 499 psFree(phu); 500 psFree(camera);501 psFree(formatName);500 psFree(camera); 501 psFree(formatName); 502 502 psFree(realName); 503 503 psFree(format); … … 513 513 psError(PS_ERR_IO, false, "file %s not defined\n", filename); 514 514 psFree(phu); 515 psFree(formatName);515 psFree(formatName); 516 516 psFree(format); 517 517 psFree(fpa); 518 518 return NULL; 519 519 } 520 psFree (file->filerule); // this is set in pmFPAfileDefineInput 520 psFree (file->filerule); // this is set in pmFPAfileDefineInput 521 521 file->format = format; 522 522 file->formatName = formatName; … … 534 534 535 535 if (file->type == PM_FPA_FILE_MASK) { 536 if (!pmConfigMaskReadHeader (config, phu)) {537 psError(PS_ERR_IO, false, "error in mask bits");538 return NULL;539 }536 if (!pmConfigMaskReadHeader (config, phu)) { 537 psError(PS_ERR_IO, false, "error in mask bits"); 538 return NULL; 539 } 540 540 } 541 541 … … 549 549 if (!realName) { 550 550 psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]); 551 psFree(phu);552 psFree(fpa);551 psFree(phu); 552 psFree(fpa); 553 553 return NULL; 554 554 } … … 558 558 psError(PS_ERR_IO, false, "Failed to open file %s\n", realName); 559 559 psFree(realName); 560 psFree(phu);561 psFree(fpa);560 psFree(phu); 561 psFree(fpa); 562 562 return NULL; 563 563 } … … 567 567 psFree(realName); 568 568 psFitsClose(fits); 569 psFree(phu);570 psFree(fpa);569 psFree(phu); 570 psFree(fpa); 571 571 return NULL; 572 572 } … … 576 576 psFree(realName); 577 577 psFitsClose(fits); 578 psFree(phu);579 psFree(fpa);578 psFree(phu); 579 psFree(fpa); 580 580 return NULL; 581 581 } … … 584 584 psFree(realName); 585 585 psFitsClose(fits); 586 psFree(phu);587 psFree(fpa);586 psFree(phu); 587 psFree(fpa); 588 588 return NULL; 589 589 } … … 744 744 psMetadataAddStr (file->names, PS_LIST_TAIL, name, 0, "", infiles->data[i]); 745 745 746 if ((i == 0) && (file->type == PM_FPA_FILE_MASK)) {747 if (!pmConfigMaskReadHeader (config, phu)) {748 psError(PS_ERR_IO, false, "error in mask bits");749 return NULL;750 }751 }746 if ((i == 0) && (file->type == PM_FPA_FILE_MASK)) { 747 if (!pmConfigMaskReadHeader (config, phu)) { 748 psError(PS_ERR_IO, false, "error in mask bits"); 749 return NULL; 750 } 751 } 752 752 753 753 psFree(view); … … 819 819 psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]); 820 820 psFree(phu); 821 psFree(camera);822 psFree(formatName);821 psFree(camera); 822 psFree(formatName); 823 823 return NULL; 824 824 } … … 829 829 psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]); 830 830 psFree(phu); 831 psFree(camera);832 psFree(formatName);831 psFree(camera); 832 psFree(formatName); 833 833 psFree(format); 834 834 return NULL; … … 863 863 864 864 if (file->type == PM_FPA_FILE_MASK) { 865 if (!pmConfigMaskReadHeader (config, phu)) {866 psError(PS_ERR_IO, false, "error in mask bits");867 return NULL;868 }865 if (!pmConfigMaskReadHeader (config, phu)) { 866 psError(PS_ERR_IO, false, "error in mask bits"); 867 return NULL; 868 } 869 869 } 870 870
Note:
See TracChangeset
for help on using the changeset viewer.
