diff --git a/src/pEpmodule.cc b/src/pEpmodule.cc index 2321c15..c7b11fd 100644 --- a/src/pEpmodule.cc +++ b/src/pEpmodule.cc @@ -405,9 +405,8 @@ BOOST_PYTHON_MODULE(pEp) "\n" "overwrite this method with an implementation of a handshake dialog") .def("deliverHandshakeResult", &UserInterface::deliverHandshakeResult, - "deliverHandshakeResult(self, partber, result)\n" + "deliverHandshakeResult(self, result)\n" "\n" - " partner identity of communication partner\n" " result -1: cancel, 0: accepted, 1: rejected\n" "\n" "call to deliver the handshake result of the handshake dialog") diff --git a/src/user_interface.cc b/src/user_interface.cc index 47a9b54..75d30fa 100644 --- a/src/user_interface.cc +++ b/src/user_interface.cc @@ -51,11 +51,10 @@ namespace pEp { return PEP_STATUS_OK; } - void UserInterface::deliverHandshakeResult(Identity partner, - int result) + void UserInterface::deliverHandshakeResult(int result) { PEP_STATUS status = ::deliverHandshakeResult(adapter.session(), - partner, (sync_handshake_result) result); + (sync_handshake_result) result); _throw_status(status); } diff --git a/src/user_interface.hh b/src/user_interface.hh index 73df428..260d855 100644 --- a/src/user_interface.hh +++ b/src/user_interface.hh @@ -24,8 +24,7 @@ namespace pEp { throw runtime_error("override this method"); } - virtual void deliverHandshakeResult( - pEp::PythonAdapter::Identity partner, int result); + virtual void deliverHandshakeResult(int result); PEP_rating get_key_rating_for_user(string user_id, string fpr); diff --git a/test/sync_handshake.py b/test/sync_handshake.py index f28a9f5..b1f8e2b 100644 --- a/test/sync_handshake.py +++ b/test/sync_handshake.py @@ -37,6 +37,7 @@ device_name = "" output = print DONT_TRIGGER_SYNC = 0x200 +SYNC_HANDSHAKE_ACCEPTED = 0 def print_msg(p): @@ -71,6 +72,8 @@ class UserInterface(pEp.UserInterface): output("on " + device_name + " signal " + str(signal) + " for identities " + str(me.fpr) + " " + str(partner.fpr)) + self.deliverHandshakeResult(SYNC_HANDSHAKE_ACCEPTED) + def run(name, color=None): global device_name