lib/smbclient/Init: throw std::runtime_error on error

This commit is contained in:
Max Kellermann
2016-09-05 11:32:20 +02:00
parent a69c3c1848
commit 135662d6b0
5 changed files with 18 additions and 21 deletions

View File

@@ -189,8 +189,7 @@ CreateSmbclientStorageURI(gcc_unused EventLoop &event_loop, const char *base,
if (memcmp(base, "smb://", 6) != 0)
return nullptr;
if (!SmbclientInit(error))
return nullptr;
SmbclientInit();
const ScopeLock protect(smbclient_mutex);
SMBCCTX *ctx = smbc_new_context();