summaryrefslogtreecommitdiff
path: root/ext/curl
diff options
context:
space:
mode:
authorLihua Liu <lihual@axis.com>2014-09-24 12:42:23 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-09-25 11:16:30 +0300
commit22e09f19edd45596b3bf9d7c22d156644f278f33 (patch)
tree61048fbd89b4bf4f5fd005aba6ea3f2387b82aba /ext/curl
parentf8f2cca0e4a2415971df1b2af78f2bd3c5e0969f (diff)
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
Diffstat (limited to 'ext/curl')
-rw-r--r--ext/curl/gstcurlsmtpsink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/curl/gstcurlsmtpsink.c b/ext/curl/gstcurlsmtpsink.c
index 4409ceb3e..6dbc11746 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);