diff options
author | irungentoo <irungentoo@gmail.com> | 2015-03-12 15:17:34 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-03-12 15:17:34 -0400 |
commit | 8dc2db2025815ed6924c0fc4a7d83377e209f6f8 (patch) | |
tree | 50faaf4299318fe0eebf261e80ba53ce64429c82 /auto_tests | |
parent | 28d707662b11c120e21697c3f1b208cdf7c6d0b2 (diff) |
Added position parameter to tox_file_send_chunk().
This is done so that the function now has the same parameters as the
request chunk callback.
Diffstat (limited to 'auto_tests')
-rw-r--r-- | auto_tests/tox_test.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/auto_tests/tox_test.c b/auto_tests/tox_test.c index 7069c4b7..b5c0fd14 100644 --- a/auto_tests/tox_test.c +++ b/auto_tests/tox_test.c | |||
@@ -169,7 +169,7 @@ void tox_file_request_chunk(Tox *tox, uint32_t friend_number, uint32_t file_numb | |||
169 | uint8_t f_data[length]; | 169 | uint8_t f_data[length]; |
170 | memset(f_data, sending_num, length); | 170 | memset(f_data, sending_num, length); |
171 | 171 | ||
172 | if (tox_file_send_chunk(tox, friend_number, file_number, f_data, length, &error)) { | 172 | if (tox_file_send_chunk(tox, friend_number, file_number, position, f_data, length, &error)) { |
173 | ++sending_num; | 173 | ++sending_num; |
174 | sending_pos += length; | 174 | sending_pos += length; |
175 | } else { | 175 | } else { |
@@ -296,9 +296,14 @@ END_TEST | |||
296 | START_TEST(test_few_clients) | 296 | START_TEST(test_few_clients) |
297 | { | 297 | { |
298 | long long unsigned int con_time, cur_time = time(NULL); | 298 | long long unsigned int con_time, cur_time = time(NULL); |
299 | Tox *tox1 = tox_new(0, 0, 0, 0); | 299 | TOX_ERR_NEW t_n_error; |
300 | Tox *tox2 = tox_new(0, 0, 0, 0); | 300 | Tox *tox1 = tox_new(0, 0, 0, &t_n_error); |
301 | Tox *tox3 = tox_new(0, 0, 0, 0); | 301 | ck_assert_msg(t_n_error == TOX_ERR_NEW_OK, "wrong error"); |
302 | Tox *tox2 = tox_new(0, 0, 0, &t_n_error); | ||
303 | ck_assert_msg(t_n_error == TOX_ERR_NEW_OK, "wrong error"); | ||
304 | Tox *tox3 = tox_new(0, 0, 0, &t_n_error); | ||
305 | ck_assert_msg(t_n_error == TOX_ERR_NEW_OK, "wrong error"); | ||
306 | |||
302 | ck_assert_msg(tox1 || tox2 || tox3, "Failed to create 3 tox instances"); | 307 | ck_assert_msg(tox1 || tox2 || tox3, "Failed to create 3 tox instances"); |
303 | 308 | ||
304 | { | 309 | { |