summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/restore.c b/src/restore.c
index 4d4823f..4b578c2 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -93,7 +93,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t cli
93{ 93{
94 if (!client) 94 if (!client)
95 return RESTORE_E_INVALID_ARG; 95 return RESTORE_E_INVALID_ARG;
96 96
97 restored_error_t ret = RESTORE_E_UNKNOWN_ERROR; 97 restored_error_t ret = RESTORE_E_UNKNOWN_ERROR;
98 98
99 if (client->parent) { 99 if (client->parent) {
@@ -110,7 +110,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_client_free(restored_client_t cli
110 if (client->label) { 110 if (client->label) {
111 free(client->label); 111 free(client->label);
112 } 112 }
113 113
114 if (client->info) { 114 if (client->info) {
115 plist_free(client->info); 115 plist_free(client->info);
116 } 116 }
@@ -133,7 +133,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_receive(restored_client_t client,
133{ 133{
134 if (!client || !plist || (plist && *plist)) 134 if (!client || !plist || (plist && *plist))
135 return RESTORE_E_INVALID_ARG; 135 return RESTORE_E_INVALID_ARG;
136 136
137 restored_error_t ret = RESTORE_E_SUCCESS; 137 restored_error_t ret = RESTORE_E_SUCCESS;
138 property_list_service_error_t err; 138 property_list_service_error_t err;
139 139
@@ -181,7 +181,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_query_type(restored_client_t clie
181 dict = NULL; 181 dict = NULL;
182 182
183 ret = restored_receive(client, &dict); 183 ret = restored_receive(client, &dict);
184 184
185 if (RESTORE_E_SUCCESS != ret) 185 if (RESTORE_E_SUCCESS != ret)
186 return ret; 186 return ret;
187 187
@@ -268,26 +268,26 @@ LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t clien
268{ 268{
269 if (!client || !value || (value && *value)) 269 if (!client || !value || (value && *value))
270 return RESTORE_E_INVALID_ARG; 270 return RESTORE_E_INVALID_ARG;
271 271
272 if (!client->info) 272 if (!client->info)
273 return RESTORE_E_NOT_ENOUGH_DATA; 273 return RESTORE_E_NOT_ENOUGH_DATA;
274 274
275 restored_error_t ret = RESTORE_E_SUCCESS; 275 restored_error_t ret = RESTORE_E_SUCCESS;
276 plist_t item = NULL; 276 plist_t item = NULL;
277 277
278 if (!key) { 278 if (!key) {
279 *value = plist_copy(client->info); 279 *value = plist_copy(client->info);
280 return RESTORE_E_SUCCESS; 280 return RESTORE_E_SUCCESS;
281 } else { 281 } else {
282 item = plist_dict_get_item(client->info, key); 282 item = plist_dict_get_item(client->info, key);
283 } 283 }
284 284
285 if (item) { 285 if (item) {
286 *value = plist_copy(item); 286 *value = plist_copy(item);
287 } else { 287 } else {
288 ret = RESTORE_E_PLIST_ERROR; 288 ret = RESTORE_E_PLIST_ERROR;
289 } 289 }
290 290
291 return ret; 291 return ret;
292} 292}
293 293