From 28d736f068abd03771d72e5cb221c79603f4909b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=92=D0=BB=D0=B0?= =?UTF-8?q?=D0=B4=D0=B8=D0=BC=D0=B8=D1=80=D0=BE=D0=B2=D0=B8=D1=87?= Date: Wed, 9 Mar 2016 16:00:04 +0300 Subject: [PATCH] add some bugs --- src/tox.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tox.py b/src/tox.py index 80523e6..e0c87af 100644 --- a/src/tox.py +++ b/src/tox.py @@ -478,7 +478,7 @@ class Tox(object): :return: the friend number on success, UINT32_MAX on failure. """ tox_err_friend_add = c_int() - result = Tox.libtoxcore.tox_friend_add(self._tox_pointer, c_char_p(address), c_char_p(message), + result = Tox.libtoxcore.tox_friend_add(self._tox_pointer, string_to_bin(address), c_char_p(message), c_size_t(len(message)), addressof(tox_err_friend_add)) tox_err_friend_add = tox_err_friend_add.value if tox_err_friend_add == TOX_ERR_FRIEND_ADD['OK']: @@ -518,7 +518,8 @@ class Tox(object): :return: the friend number on success, UINT32_MAX on failure. """ tox_err_friend_add = c_int() - result = Tox.libtoxcore.tox_friend_add(self._tox_pointer, c_char_p(public_key), addressof(tox_err_friend_add)) + result = Tox.libtoxcore.tox_friend_add_norequest(self._tox_pointer, string_to_bin(public_key), + addressof(tox_err_friend_add)) tox_err_friend_add = tox_err_friend_add.value if tox_err_friend_add == TOX_ERR_FRIEND_ADD['OK']: return result