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

Side by Side Diff: files/src/profile.c

Issue 1600025: Fix bug causing some properties on entry to be saved with quotes in the name. (Closed)
Patch Set: Created 10 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
« 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
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