summaryrefslogtreecommitdiffstats
path: root/src/mobilebackup2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mobilebackup2.c')
-rw-r--r--src/mobilebackup2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c
index 350fa3e..09b156d 100644
--- a/src/mobilebackup2.c
+++ b/src/mobilebackup2.c
@@ -173,7 +173,7 @@ mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client,
} else {
dict = plist_new_dict();
}
- plist_dict_insert_item(dict, "MessageName", plist_new_string(message));
+ plist_dict_set_item(dict, "MessageName", plist_new_string(message));
/* send it as DLMessageProcessMessage */
err = mobilebackup2_error(device_link_service_send_process_message(client->parent, dict));
@@ -386,7 +386,7 @@ mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t clie
for (i = 0; i < count; i++) {
plist_array_append_item(array, plist_new_real(local_versions[i]));
}
- plist_dict_insert_item(dict, "SupportedProtocolVersions", array);
+ plist_dict_set_item(dict, "SupportedProtocolVersions", array);
mobilebackup2_error_t err = mobilebackup2_send_message(client, "Hello", dict);
plist_free(dict);
@@ -451,23 +451,23 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client,
return MOBILEBACKUP2_E_INVALID_ARG;
plist_t dict = plist_new_dict();
- plist_dict_insert_item(dict, "TargetIdentifier", plist_new_string(target_identifier));
+ plist_dict_set_item(dict, "TargetIdentifier", plist_new_string(target_identifier));
if (source_identifier) {
- plist_dict_insert_item(dict, "SourceIdentifier", plist_new_string(source_identifier));
+ plist_dict_set_item(dict, "SourceIdentifier", plist_new_string(source_identifier));
}
if (options) {
- plist_dict_insert_item(dict, "Options", plist_copy(options));
+ plist_dict_set_item(dict, "Options", plist_copy(options));
}
if (!strcmp(request, "Unback") && options) {
plist_t node = plist_dict_get_item(options, "Password");
if (node) {
- plist_dict_insert_item(dict, "Password", plist_copy(node));
+ plist_dict_set_item(dict, "Password", plist_copy(node));
}
}
if (!strcmp(request, "EnableCloudBackup") && options) {
plist_t node = plist_dict_get_item(options, "CloudBackupState");
if (node) {
- plist_dict_insert_item(dict, "CloudBackupState", plist_copy(node));
+ plist_dict_set_item(dict, "CloudBackupState", plist_copy(node));
}
}
mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict);