s3:pylibsmb: .get_oplock_break API is dependent on multi_threaded=True
commitaaf7aaa6e26c62c62650dc01fff902d3a949a315
authorTim Beale <timbeale@catalyst.net.nz>
Mon, 3 Dec 2018 23:32:58 +0000 (4 12:32 +1300)
committerStefan Metzmacher <metze@samba.org>
Thu, 13 Dec 2018 07:52:23 +0000 (13 08:52 +0100)
tree9e8687a5212e530e52235b1a95cda7c9f1815614
parentfdc62b03ca5eac3f98f0e1f2db45a7df0b29095e
s3:pylibsmb: .get_oplock_break API is dependent on multi_threaded=True

The .get_oplock_break is dependent on the pthread code, which is only
used when creating a SMB connection with multi_threaded=True.

Add an explicit error to the .get_oplock_break() if someone tries to use
it in non-multithreaded mode.

Initializing self->oplock_waiter in non-multithreaded mode is similarly
redundant if the API can never be used.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libsmb/pylibsmb.c