Corrected RPM and RP in ports projects to handle MAX APDU Accepted.
This commit is contained in:
@@ -155,7 +155,7 @@ void handler_read_property(
|
|||||||
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
service_data->invoke_id, &data);
|
service_data->invoke_id, &data);
|
||||||
if (len > service_data->max_resp) {
|
if (len > service_data->max_resp) {
|
||||||
/* we don't support segmentation - send an abort */
|
/* too big for the sender - send an abort */
|
||||||
len =
|
len =
|
||||||
abort_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
abort_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
||||||
|
|||||||
@@ -423,8 +423,8 @@ void handler_read_property_multiple(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
if (pdu_len > service_data->max_resp) {
|
if (apdu_len > service_data->max_resp) {
|
||||||
/* we don't support segmentation - send an abort */
|
/* too big for the sender - send an abort */
|
||||||
apdu_len =
|
apdu_len =
|
||||||
abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len],
|
abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len],
|
||||||
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
||||||
|
|||||||
@@ -163,7 +163,16 @@ void handler_read_property(
|
|||||||
len =
|
len =
|
||||||
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
service_data->invoke_id, &data);
|
service_data->invoke_id, &data);
|
||||||
error = false;
|
if (len > service_data->max_resp) {
|
||||||
|
/* too big for the sender - send an abort */
|
||||||
|
len =
|
||||||
|
abort_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
|
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
||||||
|
true);
|
||||||
|
goto RP_ABORT;
|
||||||
|
} else {
|
||||||
|
error = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
if (len == -2) {
|
if (len == -2) {
|
||||||
|
|||||||
@@ -163,7 +163,16 @@ void handler_read_property(
|
|||||||
len =
|
len =
|
||||||
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
rp_ack_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
service_data->invoke_id, &data);
|
service_data->invoke_id, &data);
|
||||||
error = false;
|
if (len > service_data->max_resp) {
|
||||||
|
/* too big for the sender - send an abort */
|
||||||
|
len =
|
||||||
|
abort_encode_apdu(&Handler_Transmit_Buffer[pdu_len],
|
||||||
|
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
||||||
|
true);
|
||||||
|
goto RP_ABORT;
|
||||||
|
} else {
|
||||||
|
error = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
if (len == -2) {
|
if (len == -2) {
|
||||||
|
|||||||
@@ -432,6 +432,13 @@ void handler_read_property_multiple(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} while (1);
|
} while (1);
|
||||||
|
if (apdu_len > service_data->max_resp) {
|
||||||
|
/* too big for the sender - send an abort */
|
||||||
|
apdu_len =
|
||||||
|
abort_encode_apdu(&Handler_Transmit_Buffer[npdu_len],
|
||||||
|
service_data->invoke_id, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED,
|
||||||
|
true);
|
||||||
|
}
|
||||||
RPM_ABORT:
|
RPM_ABORT:
|
||||||
pdu_len = apdu_len + npdu_len;
|
pdu_len = apdu_len + npdu_len;
|
||||||
bytes_sent =
|
bytes_sent =
|
||||||
|
|||||||
Reference in New Issue
Block a user