Skip to content

Commit

Permalink
Updating toxcore to 0.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
dvor committed Aug 22, 2017
1 parent f8035ef commit ffcc11e
Show file tree
Hide file tree
Showing 16 changed files with 580 additions and 615 deletions.
2 changes: 1 addition & 1 deletion toxcore-git
Submodule toxcore-git updated 72 files
+39 −45 .travis.yml
+324 −293 CHANGELOG.md
+54 −91 CMakeLists.txt
+19 −4 appveyor.yml
+17 −0 auto_tests/Makefile.inc
+2 −1 auto_tests/TCP_test.c
+8 −0 auto_tests/check_compat.h
+2 −1 auto_tests/conference_test.c
+3 −2 auto_tests/crypto_test.c
+5 −3 auto_tests/dht_test.c
+2 −1 auto_tests/encryptsave_test.c
+23 −22 auto_tests/file_saving_test.c
+7 −7 auto_tests/helpers.h
+2 −1 auto_tests/messenger_test.c
+16 −0 auto_tests/monolith_test.c
+2 −1 auto_tests/network_test.c
+2 −1 auto_tests/onion_test.c
+3 −3 auto_tests/resource_leak_test.c
+84 −0 auto_tests/self_conference_title_change_test.c
+94 −0 auto_tests/selfname_change_conference_test.c
+2 −4 auto_tests/skeleton_test.c
+2 −1 auto_tests/tox_many_tcp_test.c
+2 −1 auto_tests/tox_many_test.c
+2 −1 auto_tests/tox_one_test.c
+2 −1 auto_tests/tox_strncasecmp_test.c
+2 −1 auto_tests/tox_test.c
+2 −1 auto_tests/toxav_basic_test.c
+3 −1 auto_tests/toxav_many_test.c
+46 −0 cmake/AddCompilerFlag.cmake
+56 −21 cmake/Dependencies.cmake
+38 −0 cmake/StrictAbi.cmake
+1 −1 configure.ac
+6 −1 other/bootstrap_daemon/src/Makefile.inc
+7 −7 other/bootstrap_daemon/src/command_line_arguments.c
+51 −51 other/bootstrap_daemon/src/config.c
+30 −76 other/bootstrap_daemon/src/log.c
+5 −5 other/bootstrap_daemon/src/log.h
+47 −0 other/bootstrap_daemon/src/log_backend_stdout.c
+34 −0 other/bootstrap_daemon/src/log_backend_stdout.h
+79 −0 other/bootstrap_daemon/src/log_backend_syslog.c
+36 −0 other/bootstrap_daemon/src/log_backend_syslog.h
+30 −31 other/bootstrap_daemon/src/tox-bootstrapd.c
+36 −0 other/monolith.h
+3 −0 other/travis/env-linux.sh
+0 −19 other/travis/hstox-install
+0 −3 other/travis/hstox-script
+37 −0 other/travis/toxcore-linux-install
+14 −14 other/version-sync
+2 −2 so.version
+30 −12 testing/hstox/binary_decode.c
+7 −0 testing/hstox/binary_encode.c
+2 −0 testing/hstox/byteswap.h
+22 −6 testing/hstox/driver.c
+2 −0 testing/hstox/driver.h
+1 −1 testing/hstox/fuzz_main.c
+1 −1 testing/hstox/test_main.c
+1 −0 testing/hstox/util.h
+2 −0 testing/misc_tools.c
+3 −3 toxav/toxav_old.c
+454 −502 toxcore/DHT.c
+11 −8 toxcore/DHT.h
+22 −22 toxcore/Messenger.c
+32 −32 toxcore/TCP_client.c
+7 −7 toxcore/TCP_connection.c
+24 −24 toxcore/TCP_server.c
+2 −2 toxcore/TCP_server.h
+4 −4 toxcore/group.c
+8 −0 toxcore/net_crypto.c
+7 −7 toxcore/onion_client.c
+1 −1 toxcore/tox.api.h
+2 −0 toxcore/tox.c
+1 −1 toxcore/tox.h
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.1.8"
s.version = "0.1.9"
s.summary = "Cocoapods wrapper for toxcore"
s.homepage = "https://github.com/Antidote-for-Tox/toxcore"
s.license = 'GPLv3'
Expand Down
6 changes: 3 additions & 3 deletions toxcore/toxav/toxav_old.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
*/
int toxav_add_av_groupchat(struct Tox *tox, void (*audio_callback)(void *, int, int, const int16_t *, unsigned int,
int toxav_add_av_groupchat(Tox *tox, void (*audio_callback)(void *, int, int, const int16_t *, unsigned int,
uint8_t, unsigned int, void *), void *userdata)
{
Messenger *m = (Messenger *)tox;
Expand All @@ -54,7 +54,7 @@ int toxav_add_av_groupchat(struct Tox *tox, void (*audio_callback)(void *, int,
*
* Note that total size of pcm in bytes is equal to (samples * channels * sizeof(int16_t)).
*/
int toxav_join_av_groupchat(struct Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length,
int toxav_join_av_groupchat(Tox *tox, int32_t friendnumber, const uint8_t *data, uint16_t length,
void (*audio_callback)(void *, int, int, const int16_t *, unsigned int, uint8_t, unsigned int, void *),
void *userdata)
{
Expand All @@ -77,7 +77,7 @@ int toxav_join_av_groupchat(struct Tox *tox, int32_t friendnumber, const uint8_t
*
* Recommended values are: samples = 960, channels = 1, sample_rate = 48000
*/
int toxav_group_send_audio(struct Tox *tox, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
int toxav_group_send_audio(Tox *tox, int groupnumber, const int16_t *pcm, unsigned int samples, uint8_t channels,
unsigned int sample_rate)
{
Messenger *m = (Messenger *)tox;
Expand Down
19 changes: 11 additions & 8 deletions toxcore/toxcore/DHT.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,17 @@ int unpack_nodes(Node_format *nodes, uint16_t max_num_nodes, uint16_t *processed
/* struct to store some shared keys so we don't have to regenerate them for each request. */
#define MAX_KEYS_PER_SLOT 4
#define KEYS_TIMEOUT 600

typedef struct {
struct {
uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE];
uint32_t times_requested;
uint8_t stored; /* 0 if not, 1 if is */
uint64_t time_last_requested;
} keys[256 * MAX_KEYS_PER_SLOT];
uint8_t public_key[CRYPTO_PUBLIC_KEY_SIZE];
uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE];
uint32_t times_requested;
uint8_t stored; /* 0 if not, 1 if is */
uint64_t time_last_requested;
} Shared_Key;

typedef struct {
Shared_Key keys[256 * MAX_KEYS_PER_SLOT];
} Shared_Keys;

/*----------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -452,6 +455,6 @@ int DHT_isconnected(const DHT *dht);
int DHT_non_lan_connected(const DHT *dht);


int addto_lists(DHT *dht, IP_Port ip_port, const uint8_t *public_key);
uint32_t addto_lists(DHT *dht, IP_Port ip_port, const uint8_t *public_key);

#endif
Loading

0 comments on commit ffcc11e

Please sign in to comment.