Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: src/device.c

Issue 6821048: flimflam: Don't crash if LockType/RetriesLeft are not specified. (Closed) Base URL: ssh://gitrw.chromium.org:9222/flimflam.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698