summaryrefslogtreecommitdiffstats
path: root/src/userpref.c
diff options
context:
space:
mode:
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;