[asterisk-commits] mmichelson: branch group/CCSS_Monitor_Restructure r242502 - /team/group/CCSS_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jan 22 16:32:43 CST 2010


Author: mmichelson
Date: Fri Jan 22 16:32:39 2010
New Revision: 242502

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=242502
Log:
Add appropriate calls to destroy the monitor when we remove it from the list.


Modified:
    team/group/CCSS_Monitor_Restructure/main/ccss.c

Modified: team/group/CCSS_Monitor_Restructure/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS_Monitor_Restructure/main/ccss.c?view=diff&rev=242502&r1=242501&r2=242502
==============================================================================
--- team/group/CCSS_Monitor_Restructure/main/ccss.c (original)
+++ team/group/CCSS_Monitor_Restructure/main/ccss.c Fri Jan 22 16:32:39 2010
@@ -2297,6 +2297,7 @@
 		if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
 			if (monitor_iter->callbacks->request_cc(monitor_iter, &monitor_iter->available_timer_id)) {
 				AST_DLLIST_REMOVE_CURRENT(next);
+				cc_monitor_destroy(monitor_iter);
 			} else {
 				manager_event(EVENT_FLAG_CC, "CCRequestSent",
 					"CoreID: %d\r\n"
@@ -2306,6 +2307,7 @@
 			}
 		} else if (!has_children(monitor_iter)) {
 			AST_DLLIST_REMOVE_CURRENT(next);
+			cc_monitor_destroy(monitor_iter);
 		}
 	}
 	AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END;
@@ -2341,9 +2343,11 @@
 		if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
 			if (monitor_iter->callbacks->unsuspend(monitor_iter)) {
 				AST_DLLIST_REMOVE_CURRENT(next);
+				cc_monitor_destroy(monitor_iter);
 			}
 		} else if (!has_children(monitor_iter)) {
 			AST_DLLIST_REMOVE_CURRENT(next);
+			cc_monitor_destroy(monitor_iter);
 		}
 	}
 	AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END;
@@ -2390,11 +2394,13 @@
 		if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
 			if (monitor_iter->callbacks->suspend(monitor_iter)) {
 				AST_DLLIST_REMOVE_CURRENT(next);
+				cc_monitor_destroy(monitor_iter);
 			} else {
 				monitor_iter->is_suspended = 1;
 			}
 		} else if (!has_children(monitor_iter)) {
 			AST_DLLIST_REMOVE_CURRENT(next);
+			cc_monitor_destroy(monitor_iter);
 		}
 	}
 	AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END;
@@ -2427,9 +2433,11 @@
 		if (monitor_iter->interface->monitor_class == AST_CC_DEVICE_MONITOR) {
 			if (monitor_iter->callbacks->cancel_available_timer(monitor_iter, &monitor_iter->available_timer_id)) {
 				AST_DLLIST_REMOVE_CURRENT(next);
+				cc_monitor_destroy(monitor_iter);
 			}
 		} else if (!has_children(monitor_iter)) {
 			AST_DLLIST_REMOVE_CURRENT(next);
+			cc_monitor_destroy(monitor_iter);
 		}
 	}
 	AST_DLLIST_TRAVERSE_BACKWARDS_SAFE_END;




More information about the asterisk-commits mailing list