[svn-commits] dvossel: trunk r292597 - in /trunk: ./ main/manager.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Oct 21 11:46:18 CDT 2010


Author: dvossel
Date: Thu Oct 21 11:46:15 2010
New Revision: 292597

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=292597
Log:
Merged revisions 292595 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r292595 | dvossel | 2010-10-21 11:14:33 -0500 (Thu, 21 Oct 2010) | 14 lines
  
  Fixes recursive lock problem in manager.c
  
  It is possible for a AMI session to freeze because of invalid
  use of recursive locks during the EVENT processing.  This
  patch removes the unnecessary locks.
  
  (closes issue #18167)
  Reported by: sustav
  Patches:
        manager_locking_v1.diff uploaded by dvossel (license 671)
  Tested by: sustav
........

Modified:
    trunk/   (props changed)
    trunk/main/manager.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.

Modified: trunk/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/manager.c?view=diff&rev=292597&r1=292596&r2=292597
==============================================================================
--- trunk/main/manager.c (original)
+++ trunk/main/manager.c Thu Oct 21 11:46:15 2010
@@ -2828,7 +2828,6 @@
 	if (s->session->waiting_thread == pthread_self()) {
 		struct eventqent *eqe = s->session->last_ev;
 		astman_send_response(s, m, "Success", "Waiting for Event completed.");
-		AST_RWLIST_RDLOCK(&all_events);
 		while ((eqe = advance_event(eqe))) {
 			if (((s->session->readperm & eqe->category) == eqe->category) &&
 			    ((s->session->send_events & eqe->category) == eqe->category)) {
@@ -2836,7 +2835,6 @@
 			}
 			s->session->last_ev = eqe;
 		}
-		AST_RWLIST_UNLOCK(&all_events);
 		astman_append(s,
 			"Event: WaitEventComplete\r\n"
 			"%s"
@@ -4101,7 +4099,7 @@
 	ao2_lock(s->session);
 	if (s->session->f != NULL) {
 		struct eventqent *eqe = s->session->last_ev;
-		AST_RWLIST_RDLOCK(&all_events);
+
 		while ((eqe = advance_event(eqe))) {
 			if (!ret && s->session->authenticated &&
 			    (s->session->readperm & eqe->category) == eqe->category &&
@@ -4113,7 +4111,6 @@
 			}
 			s->session->last_ev = eqe;
 		}
-		AST_RWLIST_UNLOCK(&all_events);
 	}
 	ao2_unlock(s->session);
 	return ret;




More information about the svn-commits mailing list