diff options
Diffstat (limited to 'src/afc.c')
| -rw-r--r-- | src/afc.c | 16 |
1 files changed, 8 insertions, 8 deletions
| @@ -169,7 +169,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui | |||
| 169 | /* send AFC packet header */ | 169 | /* send AFC packet header */ |
| 170 | AFCPacket_to_LE(client->afc_packet); | 170 | AFCPacket_to_LE(client->afc_packet); |
| 171 | sent = 0; | 171 | sent = 0; |
| 172 | iphone_device_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent); | 172 | iphone_connection_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent); |
| 173 | if (sent == 0) { | 173 | if (sent == 0) { |
| 174 | /* FIXME: should this be handled as success?! */ | 174 | /* FIXME: should this be handled as success?! */ |
| 175 | return AFC_E_SUCCESS; | 175 | return AFC_E_SUCCESS; |
| @@ -178,7 +178,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui | |||
| 178 | 178 | ||
| 179 | /* send AFC packet data */ | 179 | /* send AFC packet data */ |
| 180 | sent = 0; | 180 | sent = 0; |
| 181 | iphone_device_send(client->connection, data, offset, &sent); | 181 | iphone_connection_send(client->connection, data, offset, &sent); |
| 182 | if (sent == 0) { | 182 | if (sent == 0) { |
| 183 | return AFC_E_SUCCESS; | 183 | return AFC_E_SUCCESS; |
| 184 | } | 184 | } |
| @@ -190,7 +190,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui | |||
| 190 | debug_buffer(data + offset, length - offset); | 190 | debug_buffer(data + offset, length - offset); |
| 191 | 191 | ||
| 192 | sent = 0; | 192 | sent = 0; |
| 193 | iphone_device_send(client->connection, data + offset, length - offset, &sent); | 193 | iphone_connection_send(client->connection, data + offset, length - offset, &sent); |
| 194 | 194 | ||
| 195 | *bytes_sent = sent; | 195 | *bytes_sent = sent; |
| 196 | return AFC_E_SUCCESS; | 196 | return AFC_E_SUCCESS; |
| @@ -203,7 +203,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui | |||
| 203 | /* send AFC packet header */ | 203 | /* send AFC packet header */ |
| 204 | AFCPacket_to_LE(client->afc_packet); | 204 | AFCPacket_to_LE(client->afc_packet); |
| 205 | sent = 0; | 205 | sent = 0; |
| 206 | iphone_device_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent); | 206 | iphone_connection_send(client->connection, (void*)client->afc_packet, sizeof(AFCPacket), &sent); |
| 207 | if (sent == 0) { | 207 | if (sent == 0) { |
| 208 | return AFC_E_SUCCESS; | 208 | return AFC_E_SUCCESS; |
| 209 | } | 209 | } |
| @@ -213,7 +213,7 @@ static afc_error_t afc_dispatch_packet(afc_client_t client, const char *data, ui | |||
| 213 | debug_info("packet data follows"); | 213 | debug_info("packet data follows"); |
| 214 | 214 | ||
| 215 | debug_buffer(data, length); | 215 | debug_buffer(data, length); |
| 216 | iphone_device_send(client->connection, data, length, &sent); | 216 | iphone_connection_send(client->connection, data, length, &sent); |
| 217 | *bytes_sent += sent; | 217 | *bytes_sent += sent; |
| 218 | } | 218 | } |
| 219 | return AFC_E_SUCCESS; | 219 | return AFC_E_SUCCESS; |
| @@ -241,7 +241,7 @@ static afc_error_t afc_receive_data(afc_client_t client, char **dump_here, uint3 | |||
| 241 | *bytes_recv = 0; | 241 | *bytes_recv = 0; |
| 242 | 242 | ||
| 243 | /* first, read the AFC header */ | 243 | /* first, read the AFC header */ |
| 244 | iphone_device_recv(client->connection, (char*)&header, sizeof(AFCPacket), bytes_recv); | 244 | iphone_connection_receive(client->connection, (char*)&header, sizeof(AFCPacket), bytes_recv); |
| 245 | AFCPacket_from_LE(&header); | 245 | AFCPacket_from_LE(&header); |
| 246 | if (*bytes_recv == 0) { | 246 | if (*bytes_recv == 0) { |
| 247 | debug_info("Just didn't get enough."); | 247 | debug_info("Just didn't get enough."); |
| @@ -295,7 +295,7 @@ static afc_error_t afc_receive_data(afc_client_t client, char **dump_here, uint3 | |||
| 295 | 295 | ||
| 296 | *dump_here = (char*)malloc(entire_len); | 296 | *dump_here = (char*)malloc(entire_len); |
| 297 | if (this_len > 0) { | 297 | if (this_len > 0) { |
| 298 | iphone_device_recv(client->connection, *dump_here, this_len, bytes_recv); | 298 | iphone_connection_receive(client->connection, *dump_here, this_len, bytes_recv); |
| 299 | if (*bytes_recv <= 0) { | 299 | if (*bytes_recv <= 0) { |
| 300 | free(*dump_here); | 300 | free(*dump_here); |
| 301 | *dump_here = NULL; | 301 | *dump_here = NULL; |
| @@ -313,7 +313,7 @@ static afc_error_t afc_receive_data(afc_client_t client, char **dump_here, uint3 | |||
| 313 | 313 | ||
| 314 | if (entire_len > this_len) { | 314 | if (entire_len > this_len) { |
| 315 | while (current_count < entire_len) { | 315 | while (current_count < entire_len) { |
| 316 | iphone_device_recv(client->connection, (*dump_here)+current_count, entire_len - current_count, bytes_recv); | 316 | iphone_connection_receive(client->connection, (*dump_here)+current_count, entire_len - current_count, bytes_recv); |
| 317 | if (*bytes_recv <= 0) { | 317 | if (*bytes_recv <= 0) { |
| 318 | debug_info("Error receiving data (recv returned %d)", *bytes_recv); | 318 | debug_info("Error receiving data (recv returned %d)", *bytes_recv); |
| 319 | break; | 319 | break; |
