[ardour-dev] diff for control_protocol manager bug fixes

John Anderson ardour at semiosix.com
Thu Feb 15 00:13:18 PST 2007


This fixes two problems I found, but I'm not sure if it fits in with the
intentions of the "requested" member. I'll commit from here if y'all are
happy with it.

Index: libs/ardour/control_protocol_manager.cc
===================================================================
--- libs/ardour/control_protocol_manager.cc	(revision 1461)
+++ libs/ardour/control_protocol_manager.cc	(working copy)
@@ -75,12 +75,11 @@
 			delete *p;
 		}
 		control_protocols.clear ();
-
+		
 		for (list<ControlProtocolInfo*>::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) {
-			delete *p;
+			// otherwise the ControlProtocol instances are not recreated in set_session
+			(*p)->requested = true;
 		}
-
-		control_protocol_info.clear();
 	}
 }
 
@@ -106,10 +105,6 @@
 	Glib::Mutex::Lock lm (protocols_lock);
 	control_protocols.push_back (cpi.protocol);
 
-	if (cpi.state) {
-		cpi.protocol->set_state (*cpi.state);
-	}
-
 	return cpi.protocol;
 }
 
@@ -297,7 +292,6 @@
 				if ((prop = (*citer)->property (X_("name"))) != 0) {
 					ControlProtocolInfo* cpi = cpi_by_name (prop->value());
 					if (cpi) {
-
 						if (!(*citer)->children().empty()) {
 							cpi->state = (*citer)->children().front ();
 						} else {
Index: libs/surfaces/mackie/TODO
===================================================================
--- libs/surfaces/mackie/TODO	(revision 1461)
+++ libs/surfaces/mackie/TODO	(working copy)
@@ -19,6 +19,7 @@
 * power-cycling of surface. fd_midiport doesn't close.
 * remove couts
 * jog with transport rolling doesn't work properly
+* docs in manual
 
 Later
 -----
@@ -36,8 +37,6 @@
 ----
 
 * get_state isn't called on deactivate
-* close existing and load other session doesn't start control surface
-* set_state is called twice from the control_manager
 * routes "forget" their remote_id between session save and the next session load
 * definitely something wrong with remote_id assignment on session create
   (master strip assigned 0).





More information about the Ardour-Dev mailing list