initialize pointers, todo error handling ENGINE-524
authorClaudio Luck <claudio.luck@pep.foundation>
Thu, 30 May 2019 02:29:23 +0200
branchENGINE-524
changeset 129e9685e51de81
parent 128 1d8c67dd7933
initialize pointers, todo error handling
Adapter.cc
     1.1 --- a/Adapter.cc	Thu May 30 02:19:48 2019 +0200
     1.2 +++ b/Adapter.cc	Thu May 30 02:29:23 2019 +0200
     1.3 @@ -36,8 +36,8 @@
     1.4          notifyHandshake_t _notifyHandshake = nullptr;
     1.5          std::thread *_sync_thread = nullptr;
     1.6  
     1.7 -        thread_local const char * _user_directory;
     1.8 -        thread_local const char * _machine_directory;
     1.9 +        thread_local const char * _user_directory = nullptr;
    1.10 +        thread_local const char * _machine_directory = nullptr;
    1.11  
    1.12          ::utility::locked_queue< SYNC_EVENT > q;
    1.13          std::mutex m;
    1.14 @@ -125,7 +125,7 @@
    1.15          void shutdown()
    1.16          {
    1.17              if (_sync_thread) {
    1.18 -                _inject_sync_event(nullptr, nullptr);
    1.19 +                _inject_sync_event(nullptr, nullptr);       // XXX: error handling
    1.20                  _sync_thread->join();
    1.21                  delete _sync_thread;
    1.22                  _sync_thread = nullptr;