diff options
| author | 2009-07-03 22:11:01 +0200 | |
|---|---|---|
| committer | 2009-07-07 08:31:25 -0700 | |
| commit | 9990d53ba2ff4e92b1844beb001dcc9c47d30f3e (patch) | |
| tree | 1ac137519294fc2be6eed870811a8047bf8ed1e4 /dev/afccheck.c | |
| parent | 52d1beb6e43cc12ff57e648f1e5bdfadc4d36929 (diff) | |
| download | libimobiledevice-9990d53ba2ff4e92b1844beb001dcc9c47d30f3e.tar.gz libimobiledevice-9990d53ba2ff4e92b1844beb001dcc9c47d30f3e.tar.bz2 | |
AFC cleanup: remove iphone_afc_file_* and use handles instead. Removed afc_get_file_attr because this function has to go into the program (like ifuse); afc_get_file_info has to be used instead. Modified dispatch_AFC_Packet so that the real buffer size has to be specified (instead of length-1).
Diffstat (limited to 'dev/afccheck.c')
| -rw-r--r-- | dev/afccheck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 2f7d92c..965981b 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -50,13 +50,13 @@ void check_afc(gpointer data) | |||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | //now writes buffer on iphone | 52 | //now writes buffer on iphone |
| 53 | iphone_afc_file_t file = NULL; | 53 | uint64_t file = 0; |
| 54 | char path[50]; | 54 | char path[50]; |
| 55 | sprintf(path, "/Buf%i", ((param *) data)->id); | 55 | sprintf(path, "/Buf%i", ((param *) data)->id); |
| 56 | iphone_afc_open_file(((param *) data)->afc, path, AFC_FOPEN_RW, &file); | 56 | iphone_afc_open_file(((param *) data)->afc, path, AFC_FOPEN_RW, &file); |
| 57 | iphone_afc_write_file(((param *) data)->afc, file, (char *) buf, buffersize, &bytes); | 57 | iphone_afc_write_file(((param *) data)->afc, file, (char *) buf, buffersize, &bytes); |
| 58 | iphone_afc_close_file(((param *) data)->afc, file); | 58 | iphone_afc_close_file(((param *) data)->afc, file); |
| 59 | file = NULL; | 59 | file = 0; |
| 60 | if (bytes != buffersize) | 60 | if (bytes != buffersize) |
| 61 | printf("Write operation failed\n"); | 61 | printf("Write operation failed\n"); |
| 62 | 62 | ||
