diff --git a/tests/test_dm_history.c b/tests/test_dm_history.c index b2bc2753..264d6406 100644 --- a/tests/test_dm_history.c +++ b/tests/test_dm_history.c @@ -133,7 +133,7 @@ int main(void) { FILE* source = fopen(path, "wb"); REQUIRE(source); REQUIRE(fwrite("payload", 1, 7, source) == 7 && !fclose(source)); struct attachment_info info = { .kind = ATTACHMENT_FILE, .name = "source.bin" }; - REQUIRE(!dm_send_file(a, conv, path, &info, 0)); + REQUIRE(!dm_send_file(a, conv, path, &info, 0, 0)); for (unsigned i = 0; i < 500 && scalar(a, "SELECT count(*) FROM dm_files") == 0; i++) uasync_poll(ua, 20); REQUIRE(!body(a, 3, file_body, &file_len) && !dm_accept_message(b, file_body, file_len, receipt)); REQUIRE(!dm_history_delete(b, conv, 2)); @@ -143,7 +143,7 @@ int main(void) { REQUIRE(scalar(b, "SELECT count(*) FROM dm_files") == 0); /* Подписанная квитанция загрузки хранится отдельно от квитанции сообщения. */ - REQUIRE(!dm_send_file(a, conv, path, &info, 0)); + REQUIRE(!dm_send_file(a, conv, path, &info, 0, 0)); for (unsigned i = 0; i < 500 && scalar(a, "SELECT count(*) FROM dm_files") < 2; i++) uasync_poll(ua, 20); file_len = sizeof(file_body); REQUIRE(!body(a, 4, file_body, &file_len) && !dm_accept_message(b, file_body, file_len, receipt)); uint8_t file_receipt[DM_MEDIA_RECEIPT_SIZE]; @@ -172,7 +172,7 @@ int main(void) { puts("PASS: media metadata rollback, retained real file receipts and exact validation of late outgoing receipts"); REQUIRE(!peer(b, a, conv)); uint64_t generation = dm_history_generation(b, conv); - REQUIRE(generation == 4 && !dm_send_file(b, conv, path, &info, 0)); + REQUIRE(generation == 4 && !dm_send_file(b, conv, path, &info, 0, 0)); REQUIRE(!dm_history_delete(b, conv, generation) && !peer(b, a, conv)); REQUIRE(dm_history_delete(b, conv, generation) < 0); /* Старый запрос не удаляет новую историю. */ struct dm_send_req* stale = u_calloc(1, sizeof(*stale) + 4); REQUIRE(stale); diff --git a/tests/test_dm_load.c b/tests/test_dm_load.c index 36bc2755..37ec307c 100644 --- a/tests/test_dm_load.c +++ b/tests/test_dm_load.c @@ -176,7 +176,7 @@ static int exercise(struct UTUN_INSTANCE* inst, struct UTUN_INSTANCE* other, con rc = invites == old_invites + 1 && invite_result == DM_INVITE_START_ERROR ? -1 : 0; } else { struct attachment_info info = { .kind = ATTACHMENT_FILE, .name = "input.bin" }; - rc = dm_send_file(inst, conv, path, &info, 0); + rc = dm_send_file(inst, conv, path, &info, 0, 0); } fault = FAULT_NONE; int expected_hits = failure == FAULT_XKEY || failure == FAULT_EDKEY ? 0 : 1; diff --git a/tests/test_dm_media.c b/tests/test_dm_media.c index 1ac1d7d1..a1a6f4c8 100644 --- a/tests/test_dm_media.c +++ b/tests/test_dm_media.c @@ -521,7 +521,7 @@ static int send_fixture(struct media_test* t, enum attachment_kind kind, const c snprintf(info.name, sizeof(info.name), "%s", name); if (kind == ATTACHMENT_VOICE) { info.duration_ms = 3000; memset(info.waveform, 'A', 100); } if (kind == ATTACHMENT_VIDEO) { info.duration_ms = 3000; info.width = 640; info.height = 480; } - return dm_send_file(t->nodes[A], t->conv, t->file, &info, 0); + return dm_send_file(t->nodes[A], t->conv, t->file, &info, 0, 0); } static void tick(void* arg) {