diff options
Diffstat (limited to 'src/mobilesync.c')
| -rw-r--r-- | src/mobilesync.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/mobilesync.c b/src/mobilesync.c index db437c4..80666d1 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -422,16 +422,22 @@ mobilesync_error_t mobilesync_receive_changes(mobilesync_client_t client, plist_ | |||
| 422 | goto out; | 422 | goto out; |
| 423 | } | 423 | } |
| 424 | 424 | ||
| 425 | *entities = plist_copy(plist_array_get_item(msg, 2)); | 425 | if (entities != NULL) { |
| 426 | *entities = plist_copy(plist_array_get_item(msg, 2)); | ||
| 427 | } | ||
| 426 | 428 | ||
| 427 | plist_get_bool_val(plist_array_get_item(msg, 3), &has_more_changes); | 429 | if (is_last_record != NULL) { |
| 428 | *is_last_record = (has_more_changes > 0 ? 0 : 1); | 430 | plist_get_bool_val(plist_array_get_item(msg, 3), &has_more_changes); |
| 431 | *is_last_record = (has_more_changes > 0 ? 0 : 1); | ||
| 432 | } | ||
| 429 | 433 | ||
| 430 | actions_node = plist_array_get_item(msg, 4); | 434 | if (actions != NULL) { |
| 431 | if (plist_get_node_type(actions) == PLIST_DICT) | 435 | actions_node = plist_array_get_item(msg, 4); |
| 432 | *actions = plist_copy(actions_node); | 436 | if (plist_get_node_type(actions) == PLIST_DICT) |
| 433 | else | 437 | *actions = plist_copy(actions_node); |
| 434 | *actions = NULL; | 438 | else |
| 439 | *actions = NULL; | ||
| 440 | } | ||
| 435 | 441 | ||
| 436 | out: | 442 | out: |
| 437 | if (response_type) { | 443 | if (response_type) { |
