| 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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 static void append_ipconfig(DBusMessageIter *dict, void *arg) | 424 static void append_ipconfig(DBusMessageIter *dict, void *arg) |
| 425 { | 425 { |
| 426 struct connman_device *device = arg; | 426 struct connman_device *device = arg; |
| 427 | 427 |
| 428 __connman_ipconfig_foreach(device, append_ipconfig_path, dict); | 428 __connman_ipconfig_foreach(device, append_ipconfig_path, dict); |
| 429 } | 429 } |
| 430 | 430 |
| 431 static void append_unlock_status(DBusMessageIter *dict, void *arg) | 431 static void append_unlock_status(DBusMessageIter *dict, void *arg) |
| 432 { | 432 { |
| 433 struct connman_device *device = arg; | 433 struct connman_device *device = arg; |
| 434 » connman_dbus_dict_append_basic(dict, "LockType", | 434 » if (device->cellular.unlock_required) |
| 435 » » » » DBUS_TYPE_STRING, | 435 » » connman_dbus_dict_append_basic(dict, "LockType", |
| 436 » » » » &device->cellular.unlock_required); | 436 » » » » » DBUS_TYPE_STRING, |
| 437 » connman_dbus_dict_append_basic(dict, "RetriesLeft", | 437 » » » » » &device->cellular.unlock_required
); |
| 438 » » » » DBUS_TYPE_UINT32, | 438 » if (device->cellular.unlock_retries) |
| 439 » » » » &device->cellular.unlock_retries); | 439 » » connman_dbus_dict_append_basic(dict, "RetriesLeft", |
| 440 » » » » » DBUS_TYPE_UINT32, |
| 441 » » » » » &device->cellular.unlock_retries)
; |
| 440 } | 442 } |
| 441 | 443 |
| 442 static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg, | 444 static DBusMessage *get_properties(DBusConnection *conn, DBusMessage *msg, |
| 443 void *data) | 445 void *data) |
| 444 { | 446 { |
| 445 struct connman_device *device = data; | 447 struct connman_device *device = data; |
| 446 DBusMessage *reply; | 448 DBusMessage *reply; |
| 447 DBusMessageIter array, dict; | 449 DBusMessageIter array, dict; |
| 448 const char *str; | 450 const char *str; |
| 449 int val; | 451 int val; |
| (...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2606 connman_error("%s: failed to register storage", __func__); | 2608 connman_error("%s: failed to register storage", __func__); |
| 2607 return connman_driver_register(&device_driver); | 2609 return connman_driver_register(&device_driver); |
| 2608 } | 2610 } |
| 2609 | 2611 |
| 2610 void __connman_device_cleanup(void) | 2612 void __connman_device_cleanup(void) |
| 2611 { | 2613 { |
| 2612 connman_driver_unregister(&device_driver); | 2614 connman_driver_unregister(&device_driver); |
| 2613 connman_storage_unregister(&device_storage); | 2615 connman_storage_unregister(&device_storage); |
| 2614 dbus_connection_unref(connection); | 2616 dbus_connection_unref(connection); |
| 2615 } | 2617 } |
| OLD | NEW |