1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-11-15 05:23:02 +01:00

group invite API change

This commit is contained in:
Jfreegman 2015-01-27 18:00:25 -05:00
parent ff69cdd253
commit 5c98c1c51e
No known key found for this signature in database
GPG Key ID: 3627F3144076AE63
2 changed files with 4 additions and 3 deletions

View File

@ -567,9 +567,10 @@ static void chat_onGroupInvite(ToxWindow *self, Tox *m, int32_t friendnumber, co
if (self->num != friendnumber)
return;
if (length != TOX_GROUP_INVITE_DATA_SIZE)
return;
if (Friends.list[friendnumber].group_invite.data)
free(Friends.list[friendnumber].group_invite.data);
Friends.list[friendnumber].group_invite.data = malloc(length * sizeof(uint8_t));
memcpy(Friends.list[friendnumber].group_invite.data, invite_data, length);
Friends.list[friendnumber].group_invite.length = length;

View File

@ -49,7 +49,7 @@ struct LastOnline {
};
struct GroupInvite {
uint8_t data[TOX_GROUP_INVITE_DATA_SIZE];
uint8_t *data;
uint16_t length;
};