Squashed 'external/toxcore/c-toxcore/' changes from da438763d5b..671b1f92332
671b1f92332 fix: toxav rtp temp buffer allocation size was too large and cast from 32bit to 16bit, causing a overflow and making the allocated size too small 258148bd4e1 chore(ci): new minimum for all android versions is 21 d369c93c489 chore: Fix Emscripten build failing with no host specified 51b24d1c239 chore: Run CompCert on the stable branch of libsodium cab1f7d522b chore: Update WineHQ's apt key hash 102a1fa9b82 chore: Fix -Werror=maybe-uninitialized in a test cc9515da9c7 chore: Fix cpplint failing to install 3485b5feef3 chore: Disable -Wswitch-default and -Wunsafe-buffer-usage 719041e04b6 chore: Fix Circle CI failing on a missing clang lib 5344d7f84d0 fix: Memory leak in the bootstrap daemon fa201681e18 cleanup: Remove useless if clause 7572888a218 chore: Fix GitHub actions deprecation warnings git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 671b1f92332a8314dccf76d5df93c0b6c1230636
This commit is contained in:
@ -2468,14 +2468,12 @@ static void do_friends(Messenger *m, void *userdata)
|
||||
}
|
||||
}
|
||||
|
||||
if (m->friendlist[i].status == FRIEND_REQUESTED
|
||||
|| m->friendlist[i].status == FRIEND_CONFIRMED) { /* friend is not online. */
|
||||
if (m->friendlist[i].status == FRIEND_REQUESTED) {
|
||||
/* If we didn't connect to friend after successfully sending him a friend request the request is deemed
|
||||
* unsuccessful so we set the status back to FRIEND_ADDED and try again.
|
||||
*/
|
||||
check_friend_request_timed_out(m, i, temp_time, userdata);
|
||||
}
|
||||
if (m->friendlist[i].status == FRIEND_REQUESTED) {
|
||||
/* If we didn't connect to friend after successfully sending him a friend
|
||||
* request the request is deemed unsuccessful so we set the status back to
|
||||
* FRIEND_ADDED and try again.
|
||||
*/
|
||||
check_friend_request_timed_out(m, i, temp_time, userdata);
|
||||
}
|
||||
|
||||
if (m->friendlist[i].status == FRIEND_ONLINE) { /* friend is online. */
|
||||
|
@ -32,7 +32,7 @@ TEST(BinPack, PackedUint64CanBeUnpacked)
|
||||
},
|
||||
&orig, nullptr, buf.data(), buf.size()));
|
||||
|
||||
uint64_t unpacked;
|
||||
uint64_t unpacked = 0;
|
||||
EXPECT_TRUE(bin_unpack_obj(
|
||||
[](void *obj, Bin_Unpack *bu) {
|
||||
return bin_unpack_u64_b(bu, static_cast<uint64_t *>(obj));
|
||||
@ -51,7 +51,7 @@ TEST(BinPack, MsgPackedUint8CanBeUnpackedAsUint32)
|
||||
},
|
||||
&orig, nullptr, buf.data(), buf.size()));
|
||||
|
||||
uint32_t unpacked;
|
||||
uint32_t unpacked = 0;
|
||||
EXPECT_TRUE(bin_unpack_obj(
|
||||
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u32(bu, static_cast<uint32_t *>(obj)); },
|
||||
&unpacked, buf.data(), buf.size()));
|
||||
@ -68,7 +68,7 @@ TEST(BinPack, MsgPackedUint32CanBeUnpackedAsUint8IfSmallEnough)
|
||||
},
|
||||
&orig, nullptr, buf.data(), buf.size()));
|
||||
|
||||
uint8_t unpacked;
|
||||
uint8_t unpacked = 0;
|
||||
EXPECT_TRUE(bin_unpack_obj(
|
||||
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); },
|
||||
&unpacked, buf.data(), buf.size()));
|
||||
@ -86,7 +86,7 @@ TEST(BinPack, LargeMsgPackedUint32CannotBeUnpackedAsUint8)
|
||||
},
|
||||
&orig, nullptr, buf.data(), buf.size()));
|
||||
|
||||
uint8_t unpacked;
|
||||
uint8_t unpacked = 0;
|
||||
EXPECT_FALSE(bin_unpack_obj(
|
||||
[](void *obj, Bin_Unpack *bu) { return bin_unpack_u08(bu, static_cast<uint8_t *>(obj)); },
|
||||
&unpacked, buf.data(), buf.size()));
|
||||
|
Reference in New Issue
Block a user