From 8329c56e3a2017399f465aeca06ffa0039e2141a Mon Sep 17 00:00:00 2001 From: Guannan Ren Date: Thu, 4 Aug 2011 21:27:52 +0800 Subject: [PATCH] rpc:fix sasl session relocking intead of unlocking it When trying to use any SASL authentication for TCP sockets by setting auth_tls = "sasl" in libvirtd.conf on server side, the client will hang because of the sasl session relocking other than dropping the lock when exiting virNetSASLSessionExtKeySize() * src/rpc/virnetsaslcontext.c: virNetSASLSessionExtKeySize drop the lock on exit --- src/rpc/virnetsaslcontext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/virnetsaslcontext.c b/src/rpc/virnetsaslcontext.c index ef36e2c325..d4e7bf231b 100644 --- a/src/rpc/virnetsaslcontext.c +++ b/src/rpc/virnetsaslcontext.c @@ -298,7 +298,7 @@ int virNetSASLSessionExtKeySize(virNetSASLSessionPtr sasl, ret = 0; cleanup: - virMutexLock(&sasl->lock); + virMutexUnlock(&sasl->lock); return ret; }