diff options
| author | 2010-03-25 23:16:03 +0100 | |
|---|---|---|
| committer | 2010-03-25 23:53:02 +0100 | |
| commit | ecd90b60ef62ac80db1a131dd0cf32e28e223b95 (patch) | |
| tree | a2362b63b3f6886d6fcc75540bc5cff1d1e9ce01 /src/installation_proxy.c | |
| parent | 6f07a0bb701d6236dda7b19bd04df6414708dc78 (diff) | |
| download | libimobiledevice-ecd90b60ef62ac80db1a131dd0cf32e28e223b95.tar.gz libimobiledevice-ecd90b60ef62ac80db1a131dd0cf32e28e223b95.tar.bz2 | |
Use insert_item instead of set_item to make adding client options work
Diffstat (limited to 'src/installation_proxy.c')
| -rw-r--r-- | src/installation_proxy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index c26318a..3ffbb6a 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -739,21 +739,21 @@ void instproxy_client_options_add(plist_t client_options, ...) | |||
| 739 | char *key = strdup(arg); | 739 | char *key = strdup(arg); |
| 740 | if (!strcmp(key, "SkipUninstall")) { | 740 | if (!strcmp(key, "SkipUninstall")) { |
| 741 | int intval = va_arg(args, int); | 741 | int intval = va_arg(args, int); |
| 742 | plist_dict_set_item(client_options, key, plist_new_bool(intval)); | 742 | plist_dict_insert_item(client_options, key, plist_new_bool(intval)); |
| 743 | } else if (!strcmp(key, "ApplicationSINF") || !strcmp(key, "iTunesMetadata")) { | 743 | } else if (!strcmp(key, "ApplicationSINF") || !strcmp(key, "iTunesMetadata")) { |
| 744 | plist_t plistval = va_arg(args, plist_t); | 744 | plist_t plistval = va_arg(args, plist_t); |
| 745 | if (!plistval) { | 745 | if (!plistval) { |
| 746 | free(key); | 746 | free(key); |
| 747 | break; | 747 | break; |
| 748 | } | 748 | } |
| 749 | plist_dict_set_item(client_options, key, plist_copy(plistval)); | 749 | plist_dict_insert_item(client_options, key, plist_copy(plistval)); |
| 750 | } else { | 750 | } else { |
| 751 | char *strval = va_arg(args, char*); | 751 | char *strval = va_arg(args, char*); |
| 752 | if (!strval) { | 752 | if (!strval) { |
| 753 | free(key); | 753 | free(key); |
| 754 | break; | 754 | break; |
| 755 | } | 755 | } |
| 756 | plist_dict_set_item(client_options, key, plist_new_string(strval)); | 756 | plist_dict_insert_item(client_options, key, plist_new_string(strval)); |
| 757 | } | 757 | } |
| 758 | free(key); | 758 | free(key); |
| 759 | arg = va_arg(args, char*); | 759 | arg = va_arg(args, char*); |
