Changeset 29935 for trunk/psModules/src/camera/pmFPAfileIO.c
- Timestamp:
- Dec 5, 2010, 9:33:17 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAfileIO.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAfileIO.c
r29833 r29935 135 135 PS_ASSERT_PTR_NON_NULL(view, false); 136 136 137 // an internal file should not be sent here (should not be left on config->files)138 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);139 140 137 // skip the following states 141 138 if (file->state & PM_FPA_STATE_INACTIVE) { … … 143 140 return true; 144 141 } 142 143 // an active internal file should not be sent here (should not be left on config->files) 144 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false); 145 145 146 if (file->mode != PM_FPA_MODE_READ) { 146 147 psTrace("psModules.camera", 6, "skip read for %s, mode is not READ", file->name); … … 258 259 return true; 259 260 } 261 262 // an active internal file should not be returned to here 263 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false); 264 260 265 if (file->mode != PM_FPA_MODE_WRITE) { 261 266 psTrace("psModules.camera", 6, "skip create for non-write file %s", file->name); 262 267 return true; 263 268 } 264 265 // an internal file should not be returned to here266 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);267 269 268 270 // get the current level … … 335 337 } 336 338 339 // an ACTIVE internal file should not be sent here 340 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false); 341 337 342 if (file->mode != PM_FPA_MODE_WRITE) { 338 343 psTrace("psModules.camera", 6, "skip write for %s, mode is not WRITE", file->name); 339 344 return true; 340 }341 342 // an internal file should not be returned to here343 if (file->mode == PM_FPA_MODE_INTERNAL) {344 psError(PS_ERR_IO, true, "File is mode PM_FPA_MODE_INTERNAL");345 return false;346 345 } 347 346 … … 523 522 PS_ASSERT_PTR_NON_NULL(view, false); 524 523 525 // an internal file should not be sent here (should not be left on config->files)526 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);527 528 524 // skip the following states 529 525 if (file->state & PM_FPA_STATE_INACTIVE) { … … 531 527 return true; 532 528 } 529 533 530 if (file->state == PM_FPA_STATE_CLOSED) { 534 531 psTrace("psModules.camera", 6, "skip close for %s, files is closed", file->name); 535 532 return true; 536 533 } 534 535 // an active internal file should not be sent here (should not be left on config->files) 536 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false); 537 537 538 538 // is current level == open level? … … 596 596 PS_ASSERT_PTR_NON_NULL(view, false); 597 597 598 // an internal file should not be sent here (should not be left on config->files)599 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);600 601 598 if (file->state & PM_FPA_STATE_INACTIVE) { 602 599 psTrace("psModules.camera", 6, "skip free for %s, files is inactive", file->name); 603 600 return true; 604 601 } 602 603 // an active internal file should not be sent here (should not be left on config->files) 604 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false); 605 605 606 606 // get the current level … … 746 746 } 747 747 748 // these are programming errors748 // an ACTIVE internal file should not be sent here 749 749 PS_ASSERT(file->mode != PM_FPA_MODE_NONE, false); 750 750 PS_ASSERT(file->mode != PM_FPA_MODE_INTERNAL, false);
Note:
See TracChangeset
for help on using the changeset viewer.
