Skip to content

Commit

Permalink
Updating toxcore to 0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dvor committed Mar 12, 2018
1 parent 6a0ae9c commit 24b8400
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion toxcore-git
2 changes: 1 addition & 1 deletion toxcore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

Pod::Spec.new do |s|
s.name = "toxcore"
s.version = "0.2.0"
s.version = "0.2.1"
s.summary = "Cocoapods wrapper for toxcore"
s.homepage = "https://github.com/Antidote-for-Tox/toxcore"
s.license = 'GPLv3'
Expand Down
7 changes: 5 additions & 2 deletions toxcore/toxav/rtp.m
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ static int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t
return -1;
}

if (header.offset_full >= header.data_length_full) {
if (header.offset_full >= header.data_length_full
&& (header.offset_full != 0 || header.data_length_full != 0)) {
LOGGER_ERROR(m->log, "Invalid video packet: frame offset (%u) >= full frame length (%u)",
(unsigned)header.offset_full, (unsigned)header.data_length_full);
return -1;
Expand Down Expand Up @@ -769,7 +770,9 @@ int rtp_send_data(RTPSession *session, const uint8_t *data, uint32_t length,
// here the highest bits gets stripped anyway, no need to do keyframe bit magic here!
header.data_length_lower = length;

header.flags = RTP_LARGE_FRAME;
if (session->payload_type == rtp_TypeVideo) {
header.flags = RTP_LARGE_FRAME;
}

uint16_t length_safe = (uint16_t)length;

Expand Down
2 changes: 1 addition & 1 deletion toxcore/toxcore/Messenger.m
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ static void do_reqchunk_filecb(Messenger *m, int32_t friendnumber, void *userdat
//
// TODO(zoff99): Fix this to exit the loop properly when we're done
// requesting all chunks for all file transfers.
const uint32_t MAX_FT_LOOPS = 4;
const uint32_t MAX_FT_LOOPS = 16;

while (((free_slots > 0) || loop_counter == 0) && any_active_fts && (loop_counter < MAX_FT_LOOPS)) {
any_active_fts = do_all_filetransfers(m, friendnumber, userdata, &free_slots);
Expand Down
2 changes: 1 addition & 1 deletion toxcore/toxcore/tox.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ uint32_t tox_version_minor(void);
* The patch or revision number. Incremented when bugfixes are applied without
* changing any functionality or API or ABI.
*/
#define TOX_VERSION_PATCH 0
#define TOX_VERSION_PATCH 1

uint32_t tox_version_patch(void);

Expand Down
1 change: 1 addition & 0 deletions toxcore/toxcore/tox_api.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
CONST_FUNCTION(version_patch, VERSION_PATCH)
CONST_FUNCTION(public_key_size, PUBLIC_KEY_SIZE)
CONST_FUNCTION(secret_key_size, SECRET_KEY_SIZE)
CONST_FUNCTION(nospam_size, NOSPAM_SIZE)
CONST_FUNCTION(address_size, ADDRESS_SIZE)
CONST_FUNCTION(max_name_length, MAX_NAME_LENGTH)
CONST_FUNCTION(max_status_message_length, MAX_STATUS_MESSAGE_LENGTH)
Expand Down

0 comments on commit 24b8400

Please sign in to comment.