smb2: fix teardown when interrupted
commit2dbee7d17bc40104781ca1737f6b709fa367ffe8
authorThomas Guillem <thomas@gllm.fr>
Thu, 8 Aug 2019 12:55:34 +0000 (8 14:55 +0200)
committerThomas Guillem <thomas@gllm.fr>
Mon, 12 Aug 2019 07:00:23 +0000 (12 09:00 +0200)
tree161f2ad7d54c5e71001ce2db034114038dc3d633
parent342b765e29f8efdf2cd62c7e7abbb4b691e2be72
smb2: fix teardown when interrupted

When the input is stopped by the user, there are lot of chances that this
access is waiting for the read command completion (smb2_read_async()).

If the read command is not fully processed (since interrupted by VLC), any
future commands will fail, like smb2_close_async() when the access is finally
closed.

To fix this issue, we switch back to the posix poll() when interrupted to let a
chance to finish the current command in order to be able to close the smb2
session nicely.
modules/access/smb2.c