[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-55
From: |
Daniele Forsi |
Subject: |
[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-552-g1de251a |
Date: |
Wed, 08 Jan 2014 21:23:15 +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 1de251a0fe70d885d26a47c257a3d7112a64f0ec (commit)
from b4046e6c512c64059ad35aa6087d3b1f71f4b15c (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=1de251a0fe70d885d26a47c257a3d7112a64f0ec
commit 1de251a0fe70d885d26a47c257a3d7112a64f0ec
Author: Daniele Forsi <address@hidden>
Date: Wed Jan 8 22:18:13 2014 +0100
Some frames only get back an ack instead of a response frame
One such frame is NK6510_MSG_SUBSCRIBE.
The incoming functions can be called only if there is a response
from which to read the frame type.
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index fad38fe..e8366fa 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -6511,15 +6511,18 @@ static gn_error NK6510_Passthrough(gn_data *data,
struct gn_statemachine *state)
{0, NULL}
};
- incoming_functions = state->driver.incoming_functions;
- state->driver.incoming_functions = passthrough_functions;
-
- if (sm_message_send(data->write_buffer->length,
data->write_buffer->type, data->write_buffer->buffer, state))
+ if (sm_message_send(data->write_buffer->length,
data->write_buffer->type, data->write_buffer->buffer, state)) {
error = GN_ERR_NOTREADY;
- else
+ } else if (data->read_buffer) {
+ /* If there is a read buffer it means that we expect a response
*/
+ incoming_functions = state->driver.incoming_functions;
+ state->driver.incoming_functions = passthrough_functions;
error = sm_block(data->write_buffer->type, data, state);
-
- state->driver.incoming_functions = incoming_functions;
+ state->driver.incoming_functions = incoming_functions;
+ } else {
+ /* If there isn't a read buffer it means that we expect an ack
*/
+ error = sm_block_ack(state);
+ }
return error;
}
-----------------------------------------------------------------------
Summary of changes:
common/phones/nk6510.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 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-552-g1de251a,
Daniele Forsi <=