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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 } else | 394 } else |
395 return __connman_error_invalid_property(msg); | 395 return __connman_error_invalid_property(msg); |
396 | 396 |
397 return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); | 397 return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); |
398 } | 398 } |
399 | 399 |
400 static DBusMessage *get_entry(DBusConnection *conn, | 400 static DBusMessage *get_entry(DBusConnection *conn, |
401 DBusMessage *msg, void *data) | 401 DBusMessage *msg, void *data) |
402 { | 402 { |
403 #define ADD_STR(name, val) do { \ | 403 #define ADD_STR(name, val) do { \ |
404 » connman_dbus_dict_append_variant(&dict, #name, DBUS_TYPE_STRING, val); \ | 404 » connman_dbus_dict_append_variant(&dict, name, DBUS_TYPE_STRING, val); \ |
405 } while (0) | 405 } while (0) |
406 #define VAL_STR(name) do { \ | 406 #define VAL_STR(name) do { \ |
407 val = g_key_file_get_string(keyfile, ident, name, NULL); \ | 407 val = g_key_file_get_string(keyfile, ident, name, NULL); \ |
408 if (val != NULL) \ | 408 if (val != NULL) \ |
409 ADD_STR(name, &val); \ | 409 ADD_STR(name, &val); \ |
410 } while (0) | 410 } while (0) |
411 struct connman_profile *profile = data; | 411 struct connman_profile *profile = data; |
412 GKeyFile *keyfile; | 412 GKeyFile *keyfile; |
413 const char *ident, *val; | 413 const char *ident, *val; |
414 gchar **tokens; | 414 gchar **tokens; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 if (connection == NULL) | 830 if (connection == NULL) |
831 return; | 831 return; |
832 | 832 |
833 g_hash_table_destroy(profile_hash); | 833 g_hash_table_destroy(profile_hash); |
834 profile_hash = NULL; | 834 profile_hash = NULL; |
835 | 835 |
836 connman_storage_unregister(&profile_storage); | 836 connman_storage_unregister(&profile_storage); |
837 | 837 |
838 dbus_connection_unref(connection); | 838 dbus_connection_unref(connection); |
839 } | 839 } |
OLD | NEW |