From 22e09f19edd45596b3bf9d7c22d156644f278f33 Mon Sep 17 00:00:00 2001 From: Lihua Liu Date: Wed, 24 Sep 2014 12:42:23 +0200 Subject: [PATCH] curlsmtpsink: Email with multipart content-type should end with a final boundary Add final boundary for each of the sending out emails from smtpsink. https://bugzilla.gnome.org/show_bug.cgi?id=736134 --- ext/curl/gstcurlsmtpsink.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/curl/gstcurlsmtpsink.c b/ext/curl/gstcurlsmtpsink.c index 4409ceb3ed..6dbc117469 100644 --- a/ext/curl/gstcurlsmtpsink.c +++ b/ext/curl/gstcurlsmtpsink.c @@ -918,6 +918,10 @@ gst_curl_smtp_sink_transfer_data_buffer (GstCurlBaseSink * bcsink, } if (sink->base64_chunk != NULL) { + if (sink->nbr_attachments_left == sink->nbr_attachments && + bcsink->transfer_buf->len == 0) { + add_final_boundary_unlocked (sink); + } bytes_to_send = transfer_chunk (curl_ptr, bcsink->transfer_buf, sink->base64_chunk, block_size, last_chunk);