~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/servermanager.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-04-10 21:53:31 UTC
  • mfrom: (1.1.112)
  • Revision ID: package-import@ubuntu.com-20140410215331-4skq50lp0ru1pdxo
Tags: 4:4.13.0-0ubuntu1
New upstream KDE Software Compilation release

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
      delete instance;
67
67
    }
68
68
 
69
 
    void serviceOwnerChanged( const QString&, const QString&, const QString& )
 
69
    void serviceOwnerChanged( const QString &name, const QString &oldOwner, const QString &newOwner )
70
70
    {
 
71
      if ( name == ServerManager::serviceName( ServerManager::ControlLock ) && !oldOwner.isEmpty() && newOwner.isEmpty() ) {
 
72
        // Control.Lock has disappeared during startup, which means that akonadi_control
 
73
        // has terminated, most probably because it was not able to start akonadiserver
 
74
        // process. Don't wait 30 seconds for sefetyTimeout, but go into Broken state
 
75
        // immediately.
 
76
        if ( mState == ServerManager::Starting ) {
 
77
          setState( ServerManager::Broken );
 
78
          return;
 
79
        }
 
80
      }
 
81
 
71
82
      serverProtocolVersion = -1,
72
83
      checkStatusChanged();
73
84
    }
129
140
                                                          DBusConnectionPool::threadConnection(),
130
141
                                                          QDBusServiceWatcher::WatchForOwnerChange, this );
131
142
  watcher->addWatchedService( ServerManager::serviceName( ServerManager::Control ) );
 
143
  watcher->addWatchedService( ServerManager::serviceName( ServerManager::ControlLock ) );
132
144
  watcher->addWatchedService( ServerManager::serviceName( ServerManager::UpgradeIndicator ) );
133
145
 
134
146
  // this (and also the two connects below) are queued so that they trigger after AgentManager is done loading