diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mobilebackup2.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index 577901e..350fa3e 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c @@ -459,9 +459,15 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, plist_dict_insert_item(dict, "Options", plist_copy(options)); } if (!strcmp(request, "Unback") && options) { - plist_t password = plist_dict_get_item(options, "Password"); - if (password) { - plist_dict_insert_item(dict, "Password", plist_copy(password)); + plist_t node = plist_dict_get_item(options, "Password"); + if (node) { + plist_dict_insert_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)); } } mobilebackup2_error_t err = mobilebackup2_send_message(client, request, dict); |