Commit graph

25 commits

Author SHA1 Message Date
cketti
2408fbe92d curlsmtpsink: Use correct email date format
See https://www.rfc-editor.org/rfc/rfc5322.html#section-3.3

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1317>
2020-06-05 08:22:34 +00:00
Thibault Saunier
7fe3f36ac8 Minor documentation fixes 2019-05-13 11:36:27 -04:00
Thibault Saunier
78022a6e0c docs: Port all docstring to gtk-doc markdown 2017-04-12 12:57:57 -03:00
Sebastian Rasmussen
c7e4217121 curlsmtpsink: Lock and don't send final boundary upon error
Previously GstCurlSmtpSink could cause the pipeline thread to end up
waiting for a stopped thread to perform work.

The scenario was that the sink could be rendering a buffer and waiting
for the curl transfer thread to have sent the data. As soon as the
transfer thread has copied all data to curl's data buffer in
gst_curl_base_sink_transfer_read_cb() then the render call would stop
waiting and return GST_FLOW_OK. While this takes place the transfer
thread may suffer from an error e.g. due gst_poll_wait() timing out.
This causes the transfer thread to record the error, claim (it is not
really true since there was an error) that the data has been sent and
that a response has been received by trying to signal the pipeline
thread (but this has already stopped waiting). Finally the transfer
thread stops itself. A short while later the pipeline thread may attempt
to push an EOS event into GstCurlSmtpSink. Since there is no check in
gst_curl_smtp_sink_event() to check if the sink has suffered from any
error it may attempt to add a final boundary and ask the, now deceased,
transfer thread to transfer the new data. Next the sink element would
have waited for the transfer to complete (using a different mechanism
than normal transfers through GstCurlBaseSink). In this case there was
an error check to avoid waiting if an error had already been seen.
Finally GstCurlSmtpSink would chain up to GstCurlBaseSink which would
then block waiting for a response (normally this would be prevented by
the transfer thread suffering the error claiming that it had been
received, but GstCurlSmtpSink clobbered this flag after the fact).

Now GstCurlSmtpSink avoids this by locking over the entire event handing
(preventing simultaneous changes to flags by the two threads) and also
by avoiding to initiate transfer of final boundary if an error has
already been seen.

Also add GST_FIXME() for remaining similar issue where the pipeline
thread may block indefinitely waiting for transfer thread to transfer
data but the transfer thread errors out and fails to notify the pipeline
thread that the transfer failed.

https://bugzilla.gnome.org/show_bug.cgi?id=767501
2016-06-11 11:25:13 +01:00
Vineeth TM
7c42ba97d7 plugins-bad: Fix example pipelines
rename gst-launch --> gst-launch-1.0
replace old elements with new elements(ffmpegcolorspace -> videoconvert, ffenc_** -> avenc_**)
fix caps in examples

https://bugzilla.gnome.org/show_bug.cgi?id=759432
2015-12-15 10:30:49 +00:00
Branko Subasic
f00d21aec5 curlsmtpsink: add final boundary to all multipart emails
Corrected the final boundary mechanism so that a final boundary is
added to each mail with multipart content that is sent,
not just to the last one.

https://bugzilla.gnome.org/show_bug.cgi?id=741553
2014-12-19 13:16:43 +00:00
Vivia Nikolaidou
778b1814a8 curlsmtpsink: Set CURLOPT_UPLOAD to 1 to not use VRFY and other unneeded commands
Fixes the sink with SMTP servers that disable VRFY for spam protection.

http://sourceforge.net/p/curl/bugs/1389/
2014-10-06 21:28:45 +03:00
Lihua Liu
47abcb9a6b 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
2014-10-06 15:42:53 +03:00
Lihua Liu
22e09f19ed 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
2014-09-25 11:16:30 +03:00
Sebastian Rasmussen
241c3acad5 curl*sink: report errors from curl when setting options
https://bugzilla.gnome.org/show_bug.cgi?id=728960
2014-04-26 10:24:24 +02:00
Sebastian Rasmussen
c75c7a9a53 curl*sink: post error on bus in element, not transfer thread
https://bugzilla.gnome.org/show_bug.cgi?id=728960
2014-04-26 10:23:24 +02:00
Sebastian Rasmussen
bdd2676a67 curl*sink: fix some gst-indent problems
https://bugzilla.gnome.org/show_bug.cgi?id=728960
2014-04-26 10:20:11 +02:00
Vincent Penquerc'h
bbda6a1ab9 curl: remove unneeded NULL check
We just checked for NULL and allocated if it was. And glib aborts
if it can't allocate, I'm told.

Coverity 1139841
2014-04-10 17:37:22 +01:00
Lihua Liu
f3464e01bb curlsmtpsink: Include timezone information in mail header
https://bugzilla.gnome.org/show_bug.cgi?id=724125
2014-02-11 21:03:18 +01:00
Sebastian Dröge
d111f37f74 curl: Fix indention 2013-12-17 12:18:16 +01:00
Patricia Muscalu
0d6fc0215c curlsmtpsink: removed an incorrect assert
https://bugzilla.gnome.org/show_bug.cgi?id=702036
2013-06-11 21:08:28 +02:00
Patricia Muscalu
8303561bd9 curlsmtpsink: terminate transfer thread properly
If no EOS has been sent, the curl readfunc callback will
return ABORT. The media file in that case will not be properly
finalized.

https://bugzilla.gnome.org/show_bug.cgi?id=700886
2013-05-24 23:47:50 +01:00
Tim-Philipp Müller
9e1b75fda3 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:09:59 +00:00
Sebastian Rasmussen
1c71fd351a curlsmtpsink: add comment describing function
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686774
2012-10-24 11:29:47 +01:00
Tim-Philipp Müller
32ba17cd0f Use gst_element_class_set_static_metadata()
where possible. Avoids some string copies. Also re-indent
some stuff. Also some indent fixes here and there.
2012-10-17 17:46:34 +01:00
Руслан Ижбулатов
75dba03688 curl: fix build on win32
https://bugzilla.gnome.org/show_bug.cgi?id=684847
2012-09-28 09:57:53 +01:00
Mark Nauwelaerts
578861abea replace gst_element_class_set_details_simple with gst_element_class_set_metadata 2012-09-14 17:27:49 +02:00
Patricia Muscalu
a7037cd0e3 curl: fixed some memory leaks in the plugin and the unit tests
https://bugzilla.gnome.org/show_bug.cgi?id=681117
https://bugzilla.gnome.org/show_bug.cgi?id=681115
2012-08-03 20:28:40 +01:00
Wim Taymans
f710f1250b curl: fix compilation
Don't use deprecated thread API
2012-05-14 09:15:55 +02:00
Sebastian Rasmussen
3f20bbdcf4 curl: new curlsmtpsink element
https://bugzilla.gnome.org/show_bug.cgi?id=653741
2012-05-12 11:59:01 +01:00