Print this page
7281 mdnsd needs to try harder to send goodbye requests

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/svc/startd/transition.c
          +++ new/usr/src/cmd/svc/startd/transition.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2016 RackTop Systems.
  24   26   */
  25   27  
  26   28  
  27   29  /*
  28   30   * transition.c - Graph State Machine
  29   31   *
  30   32   * The graph state machine is implemented here, with a typical approach
  31   33   * of a function per state.  Separating the implementation allows more
  32   34   * clarity into the actions taken on notification of state change, as well
  33   35   * as a place for future expansion including hooks for configurable actions.
↓ open down ↓ 96 lines elided ↑ open up ↑
 130  132                          log_framework(LOG_DEBUG, "%s removed from subtree\n",
 131  133                              v->gv_name);
 132  134  
 133  135                          graph_offline_subtree_leaves(v, (void *)h);
 134  136                  }
 135  137  
 136  138                  log_framework(LOG_DEBUG, "Propagating maintenance (stop) of "
 137  139                      "%s.\n", v->gv_name);
 138  140  
 139  141                  graph_transition_propagate(v, PROPAGATE_STOP, rerr);
      142 +
      143 +                /*
      144 +                 * The maintenance transition may satisfy optional_all/restart
      145 +                 * dependencies and should be propagated to determine
      146 +                 * whether new dependents are satisfiable.
      147 +                 */
      148 +                graph_transition_propagate(v, PROPAGATE_SAT, rerr);
 140  149          } else {
 141  150                  log_framework(LOG_DEBUG, "Propagating maintenance of %s.\n",
 142  151                      v->gv_name);
 143  152  
 144  153                  graph_transition_propagate(v, PROPAGATE_SAT, rerr);
 145  154          }
 146  155  
 147  156          graph_transition_sulogin(RESTARTER_STATE_MAINT, old_state);
 148  157          return (0);
 149  158  }
↓ open down ↓ 110 lines elided ↑ open up ↑
 260  269                           */
 261  270                          graph_offline_subtree_leaves(v, (void *)h);
 262  271                  }
 263  272  
 264  273  
 265  274                  log_framework(LOG_DEBUG, "Propagating stop of %s.\n",
 266  275                      v->gv_name);
 267  276  
 268  277                  graph_transition_propagate(v, PROPAGATE_STOP, rerr);
 269  278  
      279 +                /*
      280 +                 * The disable transition may satisfy optional_all/restart
      281 +                 * dependencies and should be propagated to determine
      282 +                 * whether new dependents are satisfiable.
      283 +                 */
      284 +                graph_transition_propagate(v, PROPAGATE_SAT, rerr);
 270  285          } else {
 271  286                  log_framework(LOG_DEBUG, "Propagating disable of %s.\n",
 272  287                      v->gv_name);
 273  288  
 274  289                  graph_transition_propagate(v, PROPAGATE_SAT, rerr);
 275  290          }
 276  291  
 277  292          graph_transition_sulogin(RESTARTER_STATE_DISABLED, old_state);
 278  293          return (0);
 279  294  }
↓ open down ↓ 190 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX