diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2014-01-26 10:54:45 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2014-01-26 10:54:45 +0100 |
commit | b2aaec58195f8ce135ba7debcef148998b8a3e71 (patch) | |
tree | 2a0329ef9dfe4a0c65548049c63871222078927d /samsung-ipc/device/aries | |
parent | da3242767a2fa5b0143569db9063504386b6381a (diff) | |
download | external_libsamsung-ipc-b2aaec58195f8ce135ba7debcef148998b8a3e71.zip external_libsamsung-ipc-b2aaec58195f8ce135ba7debcef148998b8a3e71.tar.gz external_libsamsung-ipc-b2aaec58195f8ce135ba7debcef148998b8a3e71.tar.bz2 |
device: Buffer has length and tail is footer
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'samsung-ipc/device/aries')
-rw-r--r-- | samsung-ipc/device/aries/aries_ipc.c | 12 | ||||
-rw-r--r-- | samsung-ipc/device/aries/aries_ipc.h | 2 |
2 files changed, 7 insertions, 7 deletions
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 |