~ubuntu-branches/ubuntu/utopic/urfkill/utopic

« back to all changes in this revision

Viewing changes to src/urf-arbitrator.c

  • Committer: Package Import Robot
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2014-07-09 14:53:13 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140709145313-zuv5yok9yvu1zd1w
Tags: 0.6.0~20140708.110711.a0581f3-0ubuntu1
* New release snapshot:
  + always write out persistence state changes to disk.
  + arbitrator: save wanted state to persistence, and not the current device
    state on shutdown.
  + Fixes to signals from devices on state changes.
  + Saved desired state when adaptor is not present
  + Allow logging to stdout for debug.

Show diffs side-by-side

added added

removed removed

Lines of Context:
165
165
 
166
166
        g_message("set_flight_mode: %d:", (int) block);
167
167
 
168
 
        urf_config_set_persist_state (priv->config, RFKILL_TYPE_ALL, block);
169
 
 
170
168
        for (i = RFKILL_TYPE_ALL + 1; i < NUM_RFKILL_TYPES; i++) {
171
169
                state = urf_killswitch_get_state (priv->killswitch[i]);
172
170
 
190
188
                                 want_state ? "TRUE" : "FALSE");
191
189
 
192
190
                        ret = urf_arbitrator_set_block (arbitrator, i, want_state);
 
191
                } else {
 
192
                        urf_config_set_persist_state(priv->config, i, block);
193
193
                }
 
194
 
 
195
                if (!ret)
 
196
                        break;
194
197
        }
195
198
 
196
199
        return ret;
646
649
        KillswitchState state;
647
650
        int i;
648
651
 
649
 
        if (priv->persist) {
650
 
                for (i = RFKILL_TYPE_ALL + 1; i < NUM_RFKILL_TYPES; i++) {
651
 
                        state = urf_killswitch_get_state (priv->killswitch[i]);
652
 
                        g_debug("dispose arbitrator: state for %d is %d", i, state);
653
 
                        urf_config_set_persist_state (priv->config, i, state);
654
 
                }
655
 
        }
656
 
 
657
652
        for (i = 0; i < NUM_RFKILL_TYPES; i++) {
658
653
                if (priv->killswitch[i]) {
659
654
                        g_object_unref (priv->killswitch[i]);