summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/conf.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 9b8b038..baf98ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ LT_INIT
21 21
22# Checks for libraries. 22# Checks for libraries.
23PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.9) 23PKG_CHECK_MODULES(libusb, libusb-1.0 >= 1.0.9)
24PKG_CHECK_MODULES(libplist, libplist-2.0 >= 2.2.0) 24PKG_CHECK_MODULES(libplist, libplist-2.0 >= 2.3.0)
25PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.3.0, have_limd=yes, have_limd=no) 25PKG_CHECK_MODULES(libimobiledevice, libimobiledevice-1.0 >= 1.3.0, have_limd=yes, have_limd=no)
26PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= 1.0.0) 26PKG_CHECK_MODULES(limd_glue, libimobiledevice-glue-1.0 >= 1.0.0)
27 27
diff --git a/src/conf.c b/src/conf.c
index 84f4326..3f4507a 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -40,6 +40,7 @@
40#endif 40#endif
41 41
42#include <libimobiledevice-glue/utils.h> 42#include <libimobiledevice-glue/utils.h>
43#include <plist/plist.h>
43 44
44#include "conf.h" 45#include "conf.h"
45#include "utils.h" 46#include "utils.h"
@@ -232,7 +233,7 @@ static int internal_set_value(const char *config_file, const char *key, plist_t
232 /* read file into plist */ 233 /* read file into plist */
233 plist_t config = NULL; 234 plist_t config = NULL;
234 235
235 plist_read_from_filename(&config, config_file); 236 plist_read_from_file(config_file, &config, NULL);
236 if (!config) { 237 if (!config) {
237 config = plist_new_dict(); 238 config = plist_new_dict();
238 plist_dict_set_item(config, key, value); 239 plist_dict_set_item(config, key, value);
@@ -256,7 +257,7 @@ static int internal_set_value(const char *config_file, const char *key, plist_t
256 usbmuxd_log(LL_DEBUG, "Setting key %s in config file %s", key, config_file); 257 usbmuxd_log(LL_DEBUG, "Setting key %s in config file %s", key, config_file);
257 } 258 }
258 259
259 int res = plist_write_to_filename(config, config_file, PLIST_FORMAT_XML); 260 int res = plist_write_to_file(config, config_file, PLIST_FORMAT_XML, 0);
260 261
261 plist_free(config); 262 plist_free(config);
262 263
@@ -290,7 +291,7 @@ static int internal_get_value(const char* config_file, const char *key, plist_t
290 291
291 /* now parse file to get the SystemBUID */ 292 /* now parse file to get the SystemBUID */
292 plist_t config = NULL; 293 plist_t config = NULL;
293 if (plist_read_from_filename(&config, config_file)) { 294 if (plist_read_from_file(config_file, &config, NULL)) {
294 usbmuxd_log(LL_DEBUG, "Reading key %s from config file %s", key, config_file); 295 usbmuxd_log(LL_DEBUG, "Reading key %s from config file %s", key, config_file);
295 plist_t n = plist_dict_get_item(config, key); 296 plist_t n = plist_dict_get_item(config, key);
296 if (n) { 297 if (n) {
@@ -430,7 +431,7 @@ int config_set_device_record(const char *udid, char* record_data, uint64_t recor
430 remove(device_record_file); 431 remove(device_record_file);
431 432
432 /* store file */ 433 /* store file */
433 if (!plist_write_to_filename(plist, device_record_file, PLIST_FORMAT_XML)) { 434 if (!plist_write_to_file(plist, device_record_file, PLIST_FORMAT_XML, 0)) {
434 usbmuxd_log(LL_DEBUG, "Could not open '%s' for writing: %s", device_record_file, strerror(errno)); 435 usbmuxd_log(LL_DEBUG, "Could not open '%s' for writing: %s", device_record_file, strerror(errno));
435 res = -ENOENT; 436 res = -ENOENT;
436 } 437 }