Skip to content
  • Beniamino Galvani's avatar
    checkpoint: preserve in-memory state of connections · ebf25794
    Beniamino Galvani authored
    If a connection is in-memory (i.e. has flag "unsaved"), after a
    checkpoint and rollback it can be wrongly persisted to disk:
    
     - if the connection was modified and written to disk after the
       rollback, during the rollback we update it again with persist mode
       "keep", which keeps it on disk;
    
     - if the connection was deleted after the rollback, during the
       rollback we add it again with persist mode "to-disk".
    
    Instead, remember whether the connection had the "unsaved" flag set
    and try to restore the previous state.
    
    However, this is not straightforward as there are 4 different possible
    states for the settings connection: persistent; in-memory only;
    in-memory shadowing a persistent file; in-memory shadowing a detached
    persistent file (i.e. the deletion of the connection doesn't delete
    the persistent file). Handle all those cases.
    
    Fixes: 3e09aed2 ('checkpoint: add create, rollback and destroy D-Bus API')
    (cherry picked from commit c979bfeb)
    ebf25794
To find the state of this project's repository at the time of any of these versions, check out the tags.