Browse Source

Build poll modules and adapt media insertion callbacks

master
evgeny 5 days ago
parent
commit
48d7f2b21b
  1. 6
      src/Makefile.am
  2. 4
      tests/test_media_delivery_chat.c

6
src/Makefile.am

@ -110,6 +110,9 @@ utun_CORE_SOURCES = \
chat/chat_msg.c \ chat/chat_msg.c \
chat/chat_feedback.c \ chat/chat_feedback.c \
chat/chat_feedback.h \ chat/chat_feedback.h \
chat/chat_poll.c \
chat/chat_poll_codec.c \
chat/chat_poll.h \
chat/chat_whisper.c \ chat/chat_whisper.c \
chat/chat_channel.c \ chat/chat_channel.c \
chat/chat_profile.c \ chat/chat_profile.c \
@ -246,6 +249,9 @@ libutun_a_SOURCES = \
chat/chat_msg.c \ chat/chat_msg.c \
chat/chat_feedback.c \ chat/chat_feedback.c \
chat/chat_feedback.h \ chat/chat_feedback.h \
chat/chat_poll.c \
chat/chat_poll_codec.c \
chat/chat_poll.h \
chat/chat_channel.c \ chat/chat_channel.c \
chat/chat_profile.c \ chat/chat_profile.c \
chat/group_avatar.c \ chat/group_avatar.c \

4
tests/test_media_delivery_chat.c

@ -282,9 +282,9 @@ static int parse_media_body(const char* body, struct media_index_result* out) {
/* ── insert-callback: storage-узлы запускают auto-download ── */ /* ── insert-callback: storage-узлы запускают auto-download ── */
static void storage_on_insert(struct DB_SYNC_INSTANCE* si, uint64_t ts, static void storage_on_insert(struct DB_SYNC_INSTANCE* si, const uint8_t message_id[32], uint64_t ts,
const char* data, size_t len, uint64_t author, int initial_sync, void* arg) { const char* data, size_t len, uint64_t author, int initial_sync, void* arg) {
(void)si; (void)ts; (void)initial_sync; (void)si; (void)message_id; (void)ts; (void)initial_sync;
int idx = (int)(intptr_t)arg; int idx = (int)(intptr_t)arg;
struct UTUN_INSTANCE* inst = g_inst[idx]; struct UTUN_INSTANCE* inst = g_inst[idx];
if (author == inst->node_id) return; if (author == inst->node_id) return;

Loading…
Cancel
Save