diff options
| author | 2014-10-02 03:52:05 +0200 | |
|---|---|---|
| committer | 2014-10-02 03:52:05 +0200 | |
| commit | 4540d0ed1dde2ed7ea69f4abb911359db675c038 (patch) | |
| tree | 8ee1bb694d60d1c838aa97892a303460d691848c /src/afc.c | |
| parent | 52708cbb04b5b00aeff68e731abb5ced8fe09afb (diff) | |
| download | libimobiledevice-4540d0ed1dde2ed7ea69f4abb911359db675c038.tar.gz libimobiledevice-4540d0ed1dde2ed7ea69f4abb911359db675c038.tar.bz2 | |
afc: Update all currently known AFC operations in enum
Diffstat (limited to 'src/afc.c')
| -rw-r--r-- | src/afc.c | 7 |
1 files changed, 4 insertions, 3 deletions
| @@ -2,6 +2,7 @@ | |||
| 2 | * afc.c | 2 | * afc.c |
| 3 | * Contains functions for the built-in AFC client. | 3 | * Contains functions for the built-in AFC client. |
| 4 | * | 4 | * |
| 5 | * Copyright (c) 2014 Martin Szulecki All Rights Reserved. | ||
| 5 | * Copyright (c) 2009-2014 Nikias Bassen. All Rights Reserved. | 6 | * Copyright (c) 2009-2014 Nikias Bassen. All Rights Reserved. |
| 6 | * Copyright (c) 2008 Zach C. All Rights Reserved. | 7 | * Copyright (c) 2008 Zach C. All Rights Reserved. |
| 7 | * | 8 | * |
| @@ -679,7 +680,7 @@ afc_error_t afc_file_read(afc_client_t client, uint64_t handle, char *data, uint | |||
| 679 | } readinfo; | 680 | } readinfo; |
| 680 | readinfo.handle = handle; | 681 | readinfo.handle = handle; |
| 681 | readinfo.size = htole64(length); | 682 | readinfo.size = htole64(length); |
| 682 | ret = afc_dispatch_packet(client, AFC_OP_READ, (const char*)&readinfo, sizeof(readinfo), NULL, 0, &bytes_loc); | 683 | ret = afc_dispatch_packet(client, AFC_OP_FILE_READ, (const char*)&readinfo, sizeof(readinfo), NULL, 0, &bytes_loc); |
| 683 | 684 | ||
| 684 | if (ret != AFC_E_SUCCESS) { | 685 | if (ret != AFC_E_SUCCESS) { |
| 685 | afc_unlock(client); | 686 | afc_unlock(client); |
| @@ -726,7 +727,7 @@ afc_error_t afc_file_write(afc_client_t client, uint64_t handle, const char *dat | |||
| 726 | 727 | ||
| 727 | debug_info("Write length: %i", length); | 728 | debug_info("Write length: %i", length); |
| 728 | 729 | ||
| 729 | ret = afc_dispatch_packet(client, AFC_OP_WRITE, (const char*)&handle, 8, data, length, &bytes_loc); | 730 | ret = afc_dispatch_packet(client, AFC_OP_FILE_WRITE, (const char*)&handle, 8, data, length, &bytes_loc); |
| 730 | 731 | ||
| 731 | current_count += bytes_loc - (sizeof(AFCPacket) + 8); | 732 | current_count += bytes_loc - (sizeof(AFCPacket) + 8); |
| 732 | 733 | ||
| @@ -983,7 +984,7 @@ afc_error_t afc_set_file_time(afc_client_t client, const char *path, uint64_t mt | |||
| 983 | /* Send command */ | 984 | /* Send command */ |
| 984 | memcpy(buffer, &mtime_loc, 8); | 985 | memcpy(buffer, &mtime_loc, 8); |
| 985 | memcpy(buffer + 8, path, strlen(path) + 1); | 986 | memcpy(buffer + 8, path, strlen(path) + 1); |
| 986 | ret = afc_dispatch_packet(client, AFC_OP_SET_FILE_TIME, buffer, 8 + strlen(path) + 1, NULL, 0, &bytes); | 987 | ret = afc_dispatch_packet(client, AFC_OP_SET_FILE_MOD_TIME, buffer, 8 + strlen(path) + 1, NULL, 0, &bytes); |
| 987 | free(buffer); | 988 | free(buffer); |
| 988 | if (ret != AFC_E_SUCCESS) { | 989 | if (ret != AFC_E_SUCCESS) { |
| 989 | afc_unlock(client); | 990 | afc_unlock(client); |
