Ticket #48406 - Avoid self deadlock by PR_Lock(conn->c_mutex)
Description: Fixing ticket 48338 introduced a self deadlock.
To avoid the self deadlock, tried to remove PR_Lock(conn->c_mutex)
which looked harmless, but it introduced a crash by memory corruption.
This patch replaces PR_Lock/Unlock with PR_EnterMonitor/ExitMonitor,
respectively.
https://fedorahosted.org/389/ticket/48406
Reviewed by rmeggins@redhat.com, lkrispen@redhat.com, and wibrown@redhat.com.
Thank you, Rich, Ludwig and William!
(cherry picked from commit f25f804a8bce83b3790e7045dfc03230d7ece1af)
(cherry picked from commit 84da7d05ddc5a963b0d025df08f38a6ccd7d90d2)