OLD | NEW |
1 /* | 1 /* |
2 * | 2 * |
3 * Connection Manager | 3 * Connection Manager |
4 * | 4 * |
5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. | 5 * Copyright (C) 2007-2009 Intel Corporation. All rights reserved. |
6 * | 6 * |
7 * This program is free software; you can redistribute it and/or modify | 7 * This program is free software; you can redistribute it and/or modify |
8 * it under the terms of the GNU General Public License version 2 as | 8 * it under the terms of the GNU General Public License version 2 as |
9 * published by the Free Software Foundation. | 9 * published by the Free Software Foundation. |
10 * | 10 * |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 if (g_str_equal(name, "OfflineMode") == TRUE) { | 165 if (g_str_equal(name, "OfflineMode") == TRUE) { |
166 connman_bool_t offlinemode; | 166 connman_bool_t offlinemode; |
167 | 167 |
168 if (type != DBUS_TYPE_BOOLEAN) | 168 if (type != DBUS_TYPE_BOOLEAN) |
169 return __connman_error_invalid_arguments(msg); | 169 return __connman_error_invalid_arguments(msg); |
170 | 170 |
171 dbus_message_iter_get_basic(&value, &offlinemode); | 171 dbus_message_iter_get_basic(&value, &offlinemode); |
172 | 172 |
173 __connman_profile_set_offlinemode(offlinemode); | 173 __connman_profile_set_offlinemode(offlinemode); |
174 | |
175 __connman_profile_save_default(); | |
176 } else | 174 } else |
177 return __connman_error_invalid_property(msg); | 175 return __connman_error_invalid_property(msg); |
178 | 176 |
179 return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); | 177 return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); |
180 } | 178 } |
181 | 179 |
182 static DBusMessage *get_state(DBusConnection *conn, | 180 static DBusMessage *get_state(DBusConnection *conn, |
183 DBusMessage *msg, void *data) | 181 DBusMessage *msg, void *data) |
184 { | 182 { |
185 const char *str; | 183 const char *str; |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 | 904 |
907 g_dbus_unregister_interface(connection, CONNMAN_MANAGER_PATH, | 905 g_dbus_unregister_interface(connection, CONNMAN_MANAGER_PATH, |
908 CONNMAN_MANAGER_INTERFACE); | 906 CONNMAN_MANAGER_INTERFACE); |
909 | 907 |
910 dbus_bus_remove_match(connection, powerman_rule, NULL); | 908 dbus_bus_remove_match(connection, powerman_rule, NULL); |
911 dbus_connection_flush(connection); | 909 dbus_connection_flush(connection); |
912 dbus_connection_remove_filter(connection, powerman_filter, NULL); | 910 dbus_connection_remove_filter(connection, powerman_filter, NULL); |
913 | 911 |
914 dbus_connection_unref(connection); | 912 dbus_connection_unref(connection); |
915 } | 913 } |
OLD | NEW |