Code review comment for lp:~jamesodhunt/upstart/bug-1199778

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

1) My comment, no longer makes sense, so should be removed
2) Instead of asserting, we should probably (?!) be going to the error, to perform stateless re-exec.

=== modified file 'init/state.c'
--- init/state.c 2013-07-15 14:27:17 +0000
+++ init/state.c 2013-07-15 14:48:54 +0000
@@ -1249,12 +1249,11 @@
   /* lookup class associated with JSON class index */
   class = job_class_get_registered (class_name, session);

- /* Whoops, unaccounted gap in the 1-1 mapping between
- * job_classes and json_objects */
   if (! class)
    goto error;

- nih_assert (! class->session);
+ if (! class->session)
+ goto error;

   if (! state_get_json_var_full (json_class, "jobs", array, json_jobs))
    goto error;

« Back to merge proposal