Browse Source

Include common attachment preparation in both core targets

master
evgeny 2 days ago
parent
commit
1b3794e9f9
  1. 4
      src/Makefile.am
  2. 2
      src/media_async/attachment_send.c

4
src/Makefile.am

@ -69,6 +69,8 @@ utun_CORE_SOURCES = \
media_async/attachment.h \
media_async/voice_file.c \
media_async/voice_file.h \
media_async/attachment_send.c \
media_async/attachment_send.h \
video/video.c \
transport_layer/dummynet.c \
ntp_time.c \
@ -185,6 +187,8 @@ libutun_a_SOURCES = \
media_async/attachment.h \
media_async/voice_file.c \
media_async/voice_file.h \
media_async/attachment_send.c \
media_async/attachment_send.h \
video/video.c \
transport_layer/dummynet.c \
ntp_time.c \

2
src/media_async/attachment_send.c

@ -115,7 +115,7 @@ static void attachment_prepare_done(void* arg, int error) {
void attachment_send_trampoline(void* arg) {
struct attachment_send_req* req = arg;
if (!req) return;
if (!req->inst || !req->inst->chat || !req->inst->media_async || !req->target[0] ||
if (!req->inst || !req->inst->chat_core || !req->inst->media_async || !req->target[0] ||
strspn(req->target, "0123456789") != strlen(req->target)) {
DEBUG_ERROR(DEBUG_CATEGORY_MEDIA, "attachment: invalid target/stopped service");
attachment_release_pcm(req); u_free(req); return;

Loading…
Cancel
Save