<html><head></head><body>This evidently breaks module probing after kill, which is of course wrong the same way that breaking polling is wrong.<br><br><div class="gmail_quote">Le 24 octobre 2019 10:17:27 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;">
<pre class="k9mail">This fixes the following case (it's just an example, it may fix some others).<br><br> - a samba module is first probed, it asks for user credentials and show a<br>   dialog. The user cancel the media parsing instead of canceling the dialog<br>   (hit Ctrl-C on Desktop when a dialog is shown)<br><br> - A next samba module is probed and will also ask for credential. A dialog<br>   will be shown even though the user asked to terminate VLC.<br><br>To fix this issue, this commit prevent the next module to load if the current<br>thread loading the module is killed.<br><br>There is no possible race here, even if the thread is killed just after the<br>second module is loaded. In that case next dialog, poll and read call will be<br>interrupted and no dialog will be shown.<hr> src/modules/modules.c | 7 +++++++<br> 1 file changed, 7 insertions(+)<br><br>diff --git a/src/modules/modules.c b/src/modules/modules.c<br>index 2df5702f840..c3a4228aa22 100644<br>--- a/src/modules/modules.c<br>+++ b/src/modules/modules.c<br>@@ -37,6 +37,7 @@<br> <br> #include <vlc_common.h><br> #include <vlc_modules.h><br>+#include <vlc_interrupt.h><br> #include "libvlc.h"<br> #include "config/configuration.h"<br> #include "vlc_arrays.h"<br>@@ -199,6 +200,9 @@ module_t *(vlc_module_load)(struct vlc_logger *log, const char *capability,<br>                     /* fall through */<br>                 case VLC_ETIMEOUT:<br>                     goto done;<br>+                default:<br>+                    if (vlc_killed())<br>+                        goto done;<br>             }<br>         }<br>     }<br>@@ -220,6 +224,9 @@ module_t *(vlc_module_load)(struct vlc_logger *log, const char *capability,<br>                     /* fall through */<br>                 case VLC_ETIMEOUT:<br>                     goto done;<br>+                default:<br>+                    if (vlc_killed())<br>+                        goto done;<br>             }<br>         }<br>     }</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>