Skip to contentSkip to conversation

stkutil.c: Send at least the data currently available

PATCH In review Philippe Nunes 2 participants 3 messages Apr 8, 2011 – Apr 13, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 4/6 stkutil.c: Send at least the data currently available

---
 src/stkutil.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
src/stkutil.c +2 -1
index 7299fb5..ee59841 100644
@@ -5655,7 +5655,8 @@ static gboolean build_receive_data(struct stk_tlv_builder *builder,
 	const struct stk_response_receive_data *receive_data =
 		&response->receive_data;
 
-	if (response->result.type != STK_RESULT_TYPE_SUCCESS)
+	if (response->result.type != STK_RESULT_TYPE_SUCCESS &&
+			response->result.type != STK_RESULT_TYPE_MISSING_INFO)
 		return TRUE;
 
 	if (receive_data->rx_data.len) {
Signature · 1 line
1.7.1
#1 lore raw

Hi Philippe,

Quoted 9 lines · Philippe Nunes
---
 src/stkutil.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
src/stkutil.c +0 -0
index 7299fb5..ee59841 100644

src/stkutil.c static gboolean build_receive_data(struct stk_tlv_builder *builder, · line 5662

Quoted 9 lines
src/stkutil.c +2 -1
@@ -5655,7 +5655,8 @@ static gboolean build_receive_data(struct stk_tlv_builder *builder,
 	const struct stk_response_receive_data *receive_data =
 		&response->receive_data;
 
-	if (response->result.type != STK_RESULT_TYPE_SUCCESS)
+	if (response->result.type != STK_RESULT_TYPE_SUCCESS &&
+			response->result.type != STK_RESULT_TYPE_MISSING_INFO)
 		return TRUE;
 
 	if (receive_data->rx_data.len) {

Does this check also belong on other data object builders?

Regards,
-Denis

#2 lore raw

Hi Denis,

Quoted 20 lines · Denis Kenzior

Hi Philippe,

Quoted 17 lines · Philippe Nunes
---
  src/stkutil.c |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)
src/stkutil.c +2 -1
index 7299fb5..ee59841 100644
@@ -5655,7 +5655,8 @@ static gboolean build_receive_data(struct stk_tlv_builder *builder,
  	const struct stk_response_receive_data *receive_data =
  		&response->receive_data;
 
-	if (response->result.type != STK_RESULT_TYPE_SUCCESS)
+	if (response->result.type != STK_RESULT_TYPE_SUCCESS&&
+			response->result.type != STK_RESULT_TYPE_MISSING_INFO)
  		return TRUE;
 
Quoted 7 lines

src/stkutil.c static gboolean build_receive_data(struct stk_tlv_builder *builder, · line 5662

Quoted 1 line
src/stkutil.c +0 -0
  	if (receive_data->rx_data.len) {

Does this check also belong on other data object builders?

Regards,
-Denis

Here the purpose of this check is to allow to return the data currently available in the channel buffer even if the terminal response is "Command performed with missing information".
Indeed, this status shall be set when the requested number of bytes is not yet available in the Rx buffer.

Now, the general result could also be set to "command performed, with missing information" when the terminal received at least the minimum set of component parts, but did not receive all of the parts that it believed mandatory for the UICC to send;
But, currently, we are always returning "Error, required values are missing" when this case occurs.
So far, only the terminal response for the proactive command 'Receive data' is therefore concerned by this check.

Regards,

Philippe.