summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
authorzugz (tox) <mbays+tox@sdf.org>2019-02-17 00:00:00 +0000
committerzugz (tox) <mbays+tox@sdf.org>2019-05-19 18:51:28 +0200
commit306dd1f21f25d65ffd1c289d28e4450695c83745 (patch)
tree89d91af3ef10a29ae8a8a9ead0d5d7ea15619389 /toxcore/tox.c
parentd26b11d0c263bd796762374154edc7386dd601d4 (diff)
add configurable limit on number of stored frozen peers
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index d59094af..0a575dbf 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -1742,6 +1742,22 @@ uint64_t tox_conference_offline_peer_get_last_active(const Tox *tox, uint32_t co
1742 return last_active; 1742 return last_active;
1743} 1743}
1744 1744
1745bool tox_conference_set_max_offline(Tox *tox, uint32_t conference_number,
1746 uint32_t max_offline_peers,
1747 Tox_Err_Conference_Set_Max_Offline *error)
1748{
1749 const Messenger *m = tox->m;
1750 const int ret = group_set_max_frozen(m->conferences_object, conference_number, max_offline_peers);
1751
1752 if (ret == -1) {
1753 SET_ERROR_PARAMETER(error, TOX_ERR_CONFERENCE_SET_MAX_OFFLINE_CONFERENCE_NOT_FOUND);
1754 return false;
1755 }
1756
1757 SET_ERROR_PARAMETER(error, TOX_ERR_CONFERENCE_SET_MAX_OFFLINE_OK);
1758 return true;
1759}
1760
1745bool tox_conference_invite(Tox *tox, uint32_t friend_number, uint32_t conference_number, 1761bool tox_conference_invite(Tox *tox, uint32_t friend_number, uint32_t conference_number,
1746 Tox_Err_Conference_Invite *error) 1762 Tox_Err_Conference_Invite *error)
1747{ 1763{