<!doctype html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body>What is wrong? It breaks random and possibly unrelated code is what is wrong.<br><br><div class="gmail_quote">Le 24 octobre 2019 12:49:53 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><br></div><div>On Thu, Oct 24, 2019, at 11:38, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="qt"><div>This evidently breaks module probing after kill, which is of course wrong the same way that breaking polling is wrong.<br></div></blockquote><div><br></div><div>Yes, this is exactly when I'm trying to do. Break module probing after a kill. What is wrong with that ? What are the use-case where we would need a module after a kill ?<br></div><div><br></div><blockquote type="cite" id="qt"><div><br></div><div class="qt-gmail_quote"><div>Le 24 octobre 2019 10:17:27 GMT+03:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-color:rgb(204, 204, 204);border-left-style:solid;border-left-width:1px;padding-left:1ex;" class="qt-gmail_quote"><pre class="qt-k9mail"><div>This fixes the following case (it's just an example, it may fix some others).<br></div><div><br></div><div> - a samba module is first probed, it asks for user credentials and show a<br></div><div> dialog. The user cancel the media parsing instead of canceling the dialog<br></div><div> (hit Ctrl-C on Desktop when a dialog is shown)<br></div><div><br></div><div> - A next samba module is probed and will also ask for credential. A dialog<br></div><div> will be shown even though the user asked to terminate VLC.<br></div><div><br></div><div>To fix this issue, this commit prevent the next module to load if the current<br></div><div>thread loading the module is killed.<br></div><div><br></div><div>There is no possible race here, even if the thread is killed just after the<br></div><div>second module is loaded. In that case next dialog, poll and read call will be<br></div><div>interrupted and no dialog will be shown.<hr> src/modules/modules.c | 7 +++++++<br></div><div> 1 file changed, 7 insertions(+)<br></div><div><br></div><div>diff --git a/src/modules/modules.c b/src/modules/modules.c<br></div><div>index 2df5702f840..c3a4228aa22 100644<br></div><div>--- a/src/modules/modules.c<br></div><div>+++ b/src/modules/modules.c<br></div><div>@@ -37,6 +37,7 @@<br></div><div> <br></div><div> #include <vlc_common.h><br></div><div> #include <vlc_modules.h><br></div><div>+#include <vlc_interrupt.h><br></div><div> #include "libvlc.h"<br></div><div> #include "config/configuration.h"<br></div><div> #include "vlc_arrays.h"<br></div><div>@@ -199,6 +200,9 @@ module_t *(vlc_module_load)(struct vlc_logger *log, const char *capability,<br></div><div> /* fall through */<br></div><div> case VLC_ETIMEOUT:<br></div><div> goto done;<br></div><div>+ default:<br></div><div>+ if (vlc_killed())<br></div><div>+ goto done;<br></div><div> }<br></div><div> }<br></div><div> }<br></div><div>@@ -220,6 +224,9 @@ module_t *(vlc_module_load)(struct vlc_logger *log, const char *capability,<br></div><div> /* fall through */<br></div><div> case VLC_ETIMEOUT:<br></div><div> goto done;<br></div><div>+ default:<br></div><div>+ if (vlc_killed())<br></div><div>+ goto done;<br></div><div> }<br></div><div> }<br></div><div> }<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>