diff options
author | irungentoo <irungentoo@gmail.com> | 2015-03-17 13:44:48 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2015-03-17 13:44:48 -0400 |
commit | 24c70c9e8479a528e02afefa4afc5c3219f9afd7 (patch) | |
tree | 8cef607ff7afc7cad003665c4a3da0d7d85eb807 /testing/nTox.c | |
parent | 2757b254fef9354feff7527d9209232654d58126 (diff) |
Added and implemented file_id parameter to file tranfers.
file_id is a 32byte identifier that can be used by users to identify
file tranfers across core/client restarts in order to resume broken
file tranfers.
In avatar tranfers it corresponds to the hash of the avatar.
Added tox_file_get_file_id() function to api to obtain the file_id
of an ongoing file transfer.
If not set, core will generate a random one.
Diffstat (limited to 'testing/nTox.c')
-rw-r--r-- | testing/nTox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/nTox.c b/testing/nTox.c index d60d57f4..a0101b6b 100644 --- a/testing/nTox.c +++ b/testing/nTox.c | |||
@@ -158,8 +158,8 @@ uint32_t add_filesender(Tox *m, uint16_t friendnum, char *filename) | |||
158 | fseek(tempfile, 0, SEEK_END); | 158 | fseek(tempfile, 0, SEEK_END); |
159 | uint64_t filesize = ftell(tempfile); | 159 | uint64_t filesize = ftell(tempfile); |
160 | fseek(tempfile, 0, SEEK_SET); | 160 | fseek(tempfile, 0, SEEK_SET); |
161 | uint32_t filenum = tox_file_send(m, friendnum, TOX_FILE_KIND_DATA, filesize, (uint8_t *)filename, strlen(filename) + 1, | 161 | uint32_t filenum = tox_file_send(m, friendnum, TOX_FILE_KIND_DATA, filesize, 0, (uint8_t *)filename, |
162 | 0); | 162 | strlen(filename), 0); |
163 | 163 | ||
164 | if (filenum == -1) | 164 | if (filenum == -1) |
165 | return -1; | 165 | return -1; |