James Hunt has proposed merging lp:~jamesodhunt/upstart/bug-1199778 into 
lp:upstart.

Requested reviews:
  Dmitrijs Ledkovs (xnox)

For more details, see:
https://code.launchpad.net/~jamesodhunt/upstart/bug-1199778/+merge/174138

* init/conf.c: conf_source_deserialise_all(): Assert that any
  existing ConfSources relate to chroot sessions, created as
  part of the earlier Session deserialisation. (LP: #1199778)
* init/state.c: Formatting.
-- 
https://code.launchpad.net/~jamesodhunt/upstart/bug-1199778/+merge/174138
Your team Upstart Reviewers is subscribed to branch lp:upstart.
=== modified file 'ChangeLog'
--- ChangeLog	2013-07-04 14:49:10 +0000
+++ ChangeLog	2013-07-11 09:00:41 +0000
@@ -1,3 +1,10 @@
+2013-07-11  James Hunt  <[email protected]>
+
+	* init/conf.c: conf_source_deserialise_all(): Assert that any
+	  existing ConfSources relate to chroot sessions, created as
+	  part of the earlier Session deserialisation. (LP: #1199778)
+	* init/state.c: Formatting.
+
 2013-07-04  James Hunt  <[email protected]>
 
 	* NEWS: Release 1.9.1

=== modified file 'init/conf.c'
--- init/conf.c	2013-05-08 16:21:08 +0000
+++ init/conf.c	2013-07-11 09:00:41 +0000
@@ -1507,7 +1507,15 @@
 
 	conf_init ();
 
-	nih_assert (NIH_LIST_EMPTY (conf_sources));
+	/* The only ConfSources that should exist at this stage are
+	 * those associated with a (chroot) session since these were
+	 * created as part of session deserialisation.
+	 */
+	NIH_LIST_FOREACH (conf_sources, iter) {
+		ConfSource *source  = (ConfSource *)iter;
+
+		nih_assert (source->session);
+	}
 
 	json_conf_sources = json_object_object_get (json, "conf_sources");
 

=== modified file 'init/state.c'
--- init/state.c	2013-06-25 10:13:12 +0000
+++ init/state.c	2013-07-11 09:00:41 +0000
@@ -459,7 +459,7 @@
 			goto out;
 		}
 	} else {
-			nih_warn ("%s", _("No ConfSources present in state data"));
+		nih_warn ("%s", _("No ConfSources present in state data"));
 	}
 
 	if (job_class_deserialise_all (json) < 0) {

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to