diff options
| -rw-r--r-- | include/libimobiledevice/mobilesync.h | 2 | ||||
| -rw-r--r-- | src/mobilesync.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h index 4943f66..1422399 100644 --- a/include/libimobiledevice/mobilesync.h +++ b/include/libimobiledevice/mobilesync.h | |||
| @@ -71,7 +71,7 @@ mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | |||
| 71 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); | 71 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); |
| 72 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); | 72 | mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); |
| 73 | 73 | ||
| 74 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, mobilesync_sync_type_t *sync_type, uint64_t *data_class_version); | 74 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version); |
| 75 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); | 75 | mobilesync_error_t mobilesync_cancel(mobilesync_client_t client, const char* reason); |
| 76 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client); | 76 | mobilesync_error_t mobilesync_finish(mobilesync_client_t client); |
| 77 | 77 | ||
diff --git a/src/mobilesync.c b/src/mobilesync.c index 80666d1..f0a6a79 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -161,7 +161,7 @@ mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist) | |||
| 161 | return mobilesync_error(device_link_service_send(client->parent, plist)); | 161 | return mobilesync_error(device_link_service_send(client->parent, plist)); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, mobilesync_sync_type_t *sync_type, uint64_t *data_class_version) | 164 | mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data_class, mobilesync_anchors_t anchors, uint64_t computer_data_class_version, mobilesync_sync_type_t *sync_type, uint64_t *device_data_class_version) |
| 165 | { | 165 | { |
| 166 | if (!client || client->data_class || !data_class || | 166 | if (!client || client->data_class || !data_class || |
| 167 | !anchors || !anchors->computer_anchor) { | 167 | !anchors || !anchors->computer_anchor) { |
| @@ -183,7 +183,7 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
| 183 | plist_array_append_item(msg, plist_new_string("---")); | 183 | plist_array_append_item(msg, plist_new_string("---")); |
| 184 | } | 184 | } |
| 185 | plist_array_append_item(msg, plist_new_string(anchors->computer_anchor)); | 185 | plist_array_append_item(msg, plist_new_string(anchors->computer_anchor)); |
| 186 | plist_array_append_item(msg, plist_new_uint(*data_class_version)); | 186 | plist_array_append_item(msg, plist_new_uint(computer_data_class_version)); |
| 187 | plist_array_append_item(msg, plist_new_string(EMPTY_PARAMETER_STRING)); | 187 | plist_array_append_item(msg, plist_new_string(EMPTY_PARAMETER_STRING)); |
| 188 | 188 | ||
| 189 | err = mobilesync_send(client, msg); | 189 | err = mobilesync_send(client, msg); |
| @@ -258,14 +258,14 @@ mobilesync_error_t mobilesync_start(mobilesync_client_t client, const char *data | |||
| 258 | } | 258 | } |
| 259 | } | 259 | } |
| 260 | 260 | ||
| 261 | if (data_class_version != NULL) { | 261 | if (device_data_class_version != NULL) { |
| 262 | plist_t data_class_version_node = plist_array_get_item(msg, 5); | 262 | plist_t device_data_class_version_node = plist_array_get_item(msg, 5); |
| 263 | if (!data_class_version_node) { | 263 | if (!device_data_class_version_node) { |
| 264 | err = MOBILESYNC_E_PLIST_ERROR; | 264 | err = MOBILESYNC_E_PLIST_ERROR; |
| 265 | goto out; | 265 | goto out; |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | plist_get_uint_val(data_class_version_node, data_class_version); | 268 | plist_get_uint_val(device_data_class_version_node, device_data_class_version); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | err = MOBILESYNC_E_SUCCESS; | 271 | err = MOBILESYNC_E_SUCCESS; |
