Changeset 740


Ignore:
Timestamp:
10/15/15 15:15:09 (5 years ago)
Author:
rlacroix
Message:

Fix: disabling a file with read access had no effect.

Location:
XIOS/trunk/src/node
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/context.cpp

    r733 r740  
    483483    for (size_t i = 0; i < allFields.size(); ++i) 
    484484    { 
    485       if (allFields[i]->file && !allFields[i]->file->mode.isEmpty() && allFields[i]->file->mode.getValue() == CFile::mode_attr::read) 
    486         allFields[i]->read_access = true; 
    487       if (!allFields[i]->read_access.isEmpty() && allFields[i]->read_access.getValue()) 
    488         fieldsWithReadAccess.push_back(allFields[i]); 
     485      CField* field = allFields[i]; 
     486 
     487      if (field->file && !field->file->mode.isEmpty() && field->file->mode == CFile::mode_attr::read) 
     488        field->read_access = true; 
     489      else if (!field->read_access.isEmpty() && field->read_access && (field->enabled.isEmpty() || field->enabled)) 
     490        fieldsWithReadAccess.push_back(field); 
    489491    } 
    490492  } 
  • XIOS/trunk/src/node/context.hpp

    r733 r740  
    200200         std::vector<CFile*> enabledReadModeFiles; 
    201201 
    202          // List of all fields whose instant data is accessible from the public API 
     202         // List of all enabled fields whose instant data is accessible from the public API 
     203         // but which are not part of a file 
    203204         std::vector<CField*> fieldsWithReadAccess; 
    204205 
Note: See TracChangeset for help on using the changeset viewer.