]> xenbits.xensource.com Git - libvirt.git/commitdiff
rpc:fix sasl session relocking intead of unlocking it
authorGuannan Ren <gren@redhat.com>
Thu, 4 Aug 2011 13:27:52 +0000 (21:27 +0800)
committerDaniel Veillard <veillard@redhat.com>
Thu, 4 Aug 2011 13:27:52 +0000 (21:27 +0800)
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

index ef36e2c325d00c325ce6cc8c16f64ed61b59dd0a..d4e7bf231b36c3797f5db5107bc03eac3d1b2f90 100644 (file)
@@ -298,7 +298,7 @@ int virNetSASLSessionExtKeySize(virNetSASLSessionPtr sasl,
     ret = 0;
 
 cleanup:
-    virMutexLock(&sasl->lock);
+    virMutexUnlock(&sasl->lock);
     return ret;
 }