Exemplo n.º 1
0
/* Rotate SRV value by freeing the previous value, assigning the current
 * value to the previous one and nullifying the current one. */
STATIC void
state_rotate_srv(void)
{
  /* First delete previous SRV from the state. Object will be freed. */
  state_del_previous_srv();
  /* Set previous SRV with the current one. */
  sr_state_set_previous_srv(sr_state_get_current_srv());
  /* Nullify the current srv. */
  sr_state_set_current_srv(NULL);
}
Exemplo n.º 2
0
/* Rotate SRV value by setting the previous SRV to the current SRV, and
 * clearing the current SRV. */
STATIC void
state_rotate_srv(void)
{
  /* First delete previous SRV from the state. Object will be freed. */
  state_del_previous_srv();
  /* Set previous SRV to a copy of the current one. */
  sr_state_set_previous_srv(sr_srv_dup(sr_state_get_current_srv()));
  /* Free and NULL the current srv. */
  sr_state_set_current_srv(NULL);
}