From b2aaec58195f8ce135ba7debcef148998b8a3e71 Mon Sep 17 00:00:00 2001 From: Paul Kocialkowski Date: Sun, 26 Jan 2014 10:54:45 +0100 Subject: device: Buffer has length and tail is footer Signed-off-by: Paul Kocialkowski --- samsung-ipc/device/aries/aries_ipc.c | 12 ++++++------ samsung-ipc/device/aries/aries_ipc.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'samsung-ipc/device/aries') diff --git a/samsung-ipc/device/aries/aries_ipc.c b/samsung-ipc/device/aries/aries_ipc.c index 3db1d4d..97df116 100644 --- a/samsung-ipc/device/aries/aries_ipc.c +++ b/samsung-ipc/device/aries/aries_ipc.c @@ -268,7 +268,7 @@ int aries_ipc_fmt_send(struct ipc_client *client, struct ipc_message_info *reque p = (unsigned char *) buffer; while (count < length) { - chunk = length - count < ARIES_DATA_SIZE ? length - count : ARIES_DATA_SIZE; + chunk = length - count < ARIES_BUFFER_LENGTH ? length - count : ARIES_BUFFER_LENGTH; rc = client->handlers->write(client->handlers->transport_data, p, chunk); if (rc < 0) { @@ -306,7 +306,7 @@ int aries_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *respo if (client == NULL || client->handlers == NULL || client->handlers->read == NULL || response == NULL) return -1; - length = ARIES_DATA_SIZE; + length = ARIES_BUFFER_LENGTH; buffer = malloc(length); rc = client->handlers->read(client->handlers->transport_data, buffer, length); @@ -334,7 +334,7 @@ int aries_ipc_fmt_recv(struct ipc_client *client, struct ipc_message_info *respo p = (unsigned char *) response->data + count; while (count < length) { - chunk = length - count < ARIES_DATA_SIZE ? length - count : ARIES_DATA_SIZE; + chunk = length - count < ARIES_BUFFER_LENGTH ? length - count : ARIES_BUFFER_LENGTH; rc = client->handlers->read(client->handlers->transport_data, p, chunk); if (rc < 0) { @@ -390,7 +390,7 @@ int aries_ipc_rfs_send(struct ipc_client *client, struct ipc_message_info *reque p = (unsigned char *) buffer; while (count < length) { - chunk = length - count < ARIES_DATA_SIZE ? length - count : ARIES_DATA_SIZE; + chunk = length - count < ARIES_BUFFER_LENGTH ? length - count : ARIES_BUFFER_LENGTH; rc = client->handlers->write(client->handlers->transport_data, p, chunk); if (rc < 0) { @@ -428,7 +428,7 @@ int aries_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *respo if (client == NULL || client->handlers == NULL || client->handlers->read == NULL || response == NULL) return -1; - length = ARIES_DATA_SIZE; + length = ARIES_BUFFER_LENGTH; buffer = malloc(length); rc = client->handlers->read(client->handlers->transport_data, buffer, length); @@ -456,7 +456,7 @@ int aries_ipc_rfs_recv(struct ipc_client *client, struct ipc_message_info *respo p = (unsigned char *) response->data + count; while (count < length) { - chunk = length - count < ARIES_DATA_SIZE ? length - count : ARIES_DATA_SIZE; + chunk = length - count < ARIES_BUFFER_LENGTH ? length - count : ARIES_BUFFER_LENGTH; rc = client->handlers->read(client->handlers->transport_data, p, chunk); if (rc < 0) { diff --git a/samsung-ipc/device/aries/aries_ipc.h b/samsung-ipc/device/aries/aries_ipc.h index 93efda6..e410dd2 100644 --- a/samsung-ipc/device/aries/aries_ipc.h +++ b/samsung-ipc/device/aries/aries_ipc.h @@ -31,7 +31,7 @@ #define ARIES_ONEDRAM_MAGIC 0x45674567 #define ARIES_ONEDRAM_DEINIT 0xABCDABCD #define ARIES_SOCKET_RFS_MAGIC 0x80000 -#define ARIES_DATA_SIZE 4032 +#define ARIES_BUFFER_LENGTH 4032 #define SO_IPC_RFS 0x21 #define ARIES_MODEM_FMT_SPN 0x01 -- cgit v1.1