bugfix
authorVolker Birk <vb@pep-project.org>
Wed, 11 May 2016 20:14:44 +0200
changeset 76cb4430fb48f8
parent 75 65a253e12538
child 77 aac0bf974fbf
bugfix
CpEpEngine.cpp
CpEpEngine.h
     1.1 --- a/CpEpEngine.cpp	Wed May 11 20:03:20 2016 +0200
     1.2 +++ b/CpEpEngine.cpp	Wed May 11 20:14:44 2016 +0200
     1.3 @@ -984,11 +984,11 @@
     1.4      return PEP_STATUS_OK;
     1.5  }
     1.6  
     1.7 -sync_handshake_result_s CpEpEngine::showHandshake(void * obj, const pEp_identity *self, const pEp_identity *partner)
     1.8 +sync_handshake_result CpEpEngine::showHandshake(void * obj, const pEp_identity *self, const pEp_identity *partner)
     1.9  {
    1.10      assert(self && partner);
    1.11      if (!(self && partner))
    1.12 -        return SYNC_HANDSHAKE_CANCEL_S;
    1.13 +        return SYNC_HANDSHAKE_CANCEL;
    1.14  
    1.15      pEp_identity_s _self;
    1.16      copy_identity(&_self, self);
    1.17 @@ -999,9 +999,9 @@
    1.18      HRESULT r = me->Fire_ShowHandshake(&_self, &_partner, &result);
    1.19      assert(r == S_OK);
    1.20      if (r != S_OK)
    1.21 -        return SYNC_HANDSHAKE_CANCEL_S;
    1.22 +        return SYNC_HANDSHAKE_CANCEL;
    1.23  
    1.24 -    return result;
    1.25 +    return (sync_handshake_result) (int) result;
    1.26  }
    1.27  
    1.28  STDMETHODIMP CpEpEngine::blacklist_add(BSTR fpr)
     2.1 --- a/CpEpEngine.h	Wed May 11 20:03:20 2016 +0200
     2.2 +++ b/CpEpEngine.h	Wed May 11 20:14:44 2016 +0200
     2.3 @@ -37,6 +37,7 @@
     2.4          PEP_STATUS status = ::init(&m_session);
     2.5          assert(status == PEP_STATUS_OK);
     2.6          ::register_examine_function(m_session, CpEpEngine::examine_identity, (void *)this);
     2.7 +        ::register_sync_callbacks(m_session, (void*)this, messageToSend, showHandshake);
     2.8          ::log_event(m_session, "Startup", "pEp COM Adapter", NULL, NULL);
     2.9      }
    2.10  
    2.11 @@ -108,7 +109,7 @@
    2.12      typedef locked_queue<pEp_identity_cpp> identity_queue_t;
    2.13      static ::pEp_identity * retrieve_next_identity(void *management);
    2.14      static PEP_STATUS messageToSend(void *obj, const message *msg);
    2.15 -    static sync_handshake_result_s showHandshake(void * obj, const pEp_identity *self, const pEp_identity *partner);
    2.16 +    static sync_handshake_result showHandshake(void * obj, const pEp_identity *self, const pEp_identity *partner);
    2.17  
    2.18      HRESULT error(_bstr_t msg);
    2.19