diff options
Diffstat (limited to 'dev/afccheck.c')
| -rw-r--r-- | dev/afccheck.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 067dd5b..d06a147 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -55,18 +55,18 @@ void check_afc(gpointer data) | |||
| 55 | uint64_t file = 0; | 55 | uint64_t file = 0; |
| 56 | char path[50]; | 56 | char path[50]; |
| 57 | sprintf(path, "/Buf%i", ((param *) data)->id); | 57 | sprintf(path, "/Buf%i", ((param *) data)->id); |
| 58 | afc_open_file(((param *) data)->afc, path, AFC_FOPEN_RW, &file); | 58 | afc_file_open(((param *) data)->afc, path, AFC_FOPEN_RW, &file); |
| 59 | afc_write_file(((param *) data)->afc, file, (char *) buf, buffersize, &bytes); | 59 | afc_file_write(((param *) data)->afc, file, (char *) buf, buffersize, &bytes); |
| 60 | afc_close_file(((param *) data)->afc, file); | 60 | afc_file_close(((param *) data)->afc, file); |
| 61 | file = 0; | 61 | file = 0; |
| 62 | if (bytes != buffersize) | 62 | if (bytes != buffersize) |
| 63 | printf("Write operation failed\n"); | 63 | printf("Write operation failed\n"); |
| 64 | 64 | ||
| 65 | //now read it | 65 | //now read it |
| 66 | bytes = 0; | 66 | bytes = 0; |
| 67 | afc_open_file(((param *) data)->afc, path, AFC_FOPEN_RDONLY, &file); | 67 | afc_file_open(((param *) data)->afc, path, AFC_FOPEN_RDONLY, &file); |
| 68 | afc_read_file(((param *) data)->afc, file, (char *) buf2, buffersize, &bytes); | 68 | afc_file_read(((param *) data)->afc, file, (char *) buf2, buffersize, &bytes); |
| 69 | afc_close_file(((param *) data)->afc, file); | 69 | afc_file_close(((param *) data)->afc, file); |
| 70 | if (bytes != buffersize) | 70 | if (bytes != buffersize) |
| 71 | printf("Read operation failed\n"); | 71 | printf("Read operation failed\n"); |
| 72 | 72 | ||
| @@ -79,7 +79,7 @@ void check_afc(gpointer data) | |||
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | //cleanup | 81 | //cleanup |
| 82 | afc_delete_file(((param *) data)->afc, path); | 82 | afc_remove_path(((param *) data)->afc, path); |
| 83 | g_thread_exit(0); | 83 | g_thread_exit(0); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) | |||
| 116 | return 1; | 116 | return 1; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | afc_new_client(phone, port, &afc); | 119 | afc_client_new(phone, port, &afc); |
| 120 | 120 | ||
| 121 | //makes sure thread environment is available | 121 | //makes sure thread environment is available |
| 122 | if (!g_thread_supported()) | 122 | if (!g_thread_supported()) |
