[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-72
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-72-gc1b296f |
Date: |
Mon, 06 Dec 2010 00:24:32 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".
The branch, master has been updated
via c1b296f81d42a44cfb2a4310d5d6e479efd1c8ab (commit)
from 92d71fc30dee958610bc680f436e4083209f5d3d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=c1b296f81d42a44cfb2a4310d5d6e479efd1c8ab
commit c1b296f81d42a44cfb2a4310d5d6e479efd1c8ab
Author: Daniele Forsi <address@hidden>
Date: Mon Dec 6 01:22:48 2010 +0100
Fix reading long frames with phonet driver
diff --git a/common/devices/socketphonet.c b/common/devices/socketphonet.c
index 362f763..ecab4d2 100644
--- a/common/devices/socketphonet.c
+++ b/common/devices/socketphonet.c
@@ -133,13 +133,15 @@ size_t socketphonet_read(int fd, __ptr_t buf, size_t
nbytes, struct gn_statemach
int received;
unsigned char *frame = buf;
- received = recvfrom(fd, buf + 8, sizeof(buf) - 8, 0, NULL, NULL);
+ received = recvfrom(fd, buf + 8, nbytes - 8, 0, NULL, NULL);
if (received == -1) {
perror("recvfrom");
return -1;
}
- /* Hack!!! REbuild header as expected by phonet_rx_statemachine() */
+ /* Hack!!! Rebuild header as expected by phonet_rx_statemachine() */
+ /* FIXME: why we need to add another 2 bytes? */
+ received += 2;
frame[0] = FBUS_PHONET_DKU2_FRAME_ID;
frame[1] = FBUS_PHONET_BLUETOOTH_DEVICE_PC;
frame[2] = FBUS_DEVICE_PHONE;
diff --git a/common/links/fbus-phonet.c b/common/links/fbus-phonet.c
index 37a69b2..2d09a4b 100644
--- a/common/links/fbus-phonet.c
+++ b/common/links/fbus-phonet.c
@@ -210,7 +210,7 @@ static void phonet_rx_statemachine(unsigned char rx_byte,
struct gn_statemachine
static gn_error phonet_loop(struct timeval *timeout, struct gn_statemachine
*state)
{
gn_error error = GN_ERR_INTERNALERROR;
- unsigned char buffer[BUFFER_SIZE];
+ unsigned char buffer[BUFFER_SIZE + 16];
int count, res;
res = device_select(timeout, state);
-----------------------------------------------------------------------
Summary of changes:
common/devices/socketphonet.c | 6 ++++--
common/links/fbus-phonet.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
hooks/post-receive
--
libgnokii and core programs
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-72-gc1b296f,
Daniele Forsi <=