summaryrefslogtreecommitdiffstats
path: root/src/userpref.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2009-01-04 22:21:15 +0100
committerGravatar Jonathan Beck2009-01-04 22:21:15 +0100
commit5514a3b2a9734d311e4f6014585f922e0b748cab (patch)
treeca88a32519d6a07da72d15632de7af04461f7ba8 /src/userpref.c
parent4301ef9bb8e9d06ffa4e9172191d58ede5e16f5d (diff)
parent5cde55426112a8cb79d809dae5f61e347c007212 (diff)
downloadlibimobiledevice-5514a3b2a9734d311e4f6014585f922e0b748cab.tar.gz
libimobiledevice-5514a3b2a9734d311e4f6014585f922e0b748cab.tar.bz2
Merge branch 'master' into plist
Conflicts: src/AFC.c src/lockdown.c src/lockdown.h src/plist.c src/plist.h
Diffstat (limited to 'src/userpref.c')
-rw-r--r--src/userpref.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/userpref.c b/src/userpref.c
index b707957..3e5eb06 100644
--- a/src/userpref.c
+++ b/src/userpref.c
@@ -39,7 +39,7 @@
39 39
40/** Creates a freedesktop compatible configuration directory for libiphone. 40/** Creates a freedesktop compatible configuration directory for libiphone.
41 */ 41 */
42inline void create_config_dir() 42static void create_config_dir(void)
43{ 43{
44 gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL); 44 gchar *config_dir = g_build_path(G_DIR_SEPARATOR_S, g_get_user_config_dir(), LIBIPHONE_CONF_DIR, NULL);
45 45
@@ -56,7 +56,7 @@ inline void create_config_dir()
56 * 56 *
57 * @return The string containing the HostID or NULL 57 * @return The string containing the HostID or NULL
58 */ 58 */
59char *get_host_id() 59char *get_host_id(void)
60{ 60{
61 char *host_id = NULL; 61 char *host_id = NULL;
62 gchar *config_file; 62 gchar *config_file;
@@ -92,9 +92,6 @@ int is_device_known(char *uid)
92{ 92{
93 int ret = 0; 93 int ret = 0;
94 gchar *config_file; 94 gchar *config_file;
95 GKeyFile *key_file;
96 gchar **devices_list, **pcur, *keyfilepath, *stored_key;
97 GIOChannel *keyfile;
98 95
99 /* first get config file */ 96 /* first get config file */
100 gchar *device_file = g_strconcat(uid, ".pem", NULL); 97 gchar *device_file = g_strconcat(uid, ".pem", NULL);
@@ -143,7 +140,7 @@ int store_device_public_key(char *uid, gnutls_datum_t public_key)
143 * 140 *
144 * @return 1 if the file contents where read successfully and 0 otherwise. 141 * @return 1 if the file contents where read successfully and 0 otherwise.
145 */ 142 */
146int read_file_in_confdir(char *file, gnutls_datum_t * data) 143static int read_file_in_confdir(const char *file, gnutls_datum_t * data)
147{ 144{
148 gboolean success; 145 gboolean success;
149 gsize size; 146 gsize size;