]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_voicemail: that shouldve been wrlock, and its missing an unlock
authorMathieu Rene <mrene@avgs.ca>
Mon, 15 Feb 2010 20:34:11 +0000 (20:34 +0000)
committerMathieu Rene <mrene@avgs.ca>
Mon, 15 Feb 2010 20:34:11 +0000 (20:34 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16647 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_voicemail/mod_voicemail.c

index e46ca39a577ed7e45b896d5eae4e801375c09461..5fb68cdc54668897c48266ba2045e9457d274323 100644 (file)
@@ -738,7 +738,8 @@ static void profile_rwunlock(vm_profile_t *profile)
 {
        switch_thread_rwlock_unlock(profile->rwlock);
        if (switch_test_flag(profile, PFLAG_DESTROY)) {
-               if (switch_thread_rwlock_tryrdlock(profile->rwlock) == SWITCH_STATUS_SUCCESS) {
+               if (switch_thread_rwlock_trywrlock(profile->rwlock) == SWITCH_STATUS_SUCCESS) {
+                       switch_thread_rwlock_unlock(profile->rwlock);
                        free_profile(profile);
                }
        }