dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/onomondo-eim/+/42950?usp=email )
Change subject: esipa_asn1_handler: replace handle_asn1_notificationList ......................................................................
esipa_asn1_handler: replace handle_asn1_notificationList
The helper function handle_asn1_notificationList can also be described using the comprehension syntax.
Change-Id: Ia95f56998b4f7a8b0f9fce727d82dedc942e5aeb Related: SYS#8100 --- M src/esipa_asn1_handler.erl 1 file changed, 2 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/50/42950/1
diff --git a/src/esipa_asn1_handler.erl b/src/esipa_asn1_handler.erl index 1815499..466461f 100644 --- a/src/esipa_asn1_handler.erl +++ b/src/esipa_asn1_handler.erl @@ -9,14 +9,6 @@
-export([handle_asn1/2]).
-% Helper function to send out a list of notifications -handle_asn1_notificationList(_Pid, []) -> - ok; -handle_asn1_notificationList(Pid, NotificationList) -> - [PendingNotification | NotificationListTail] = NotificationList, - handle_asn1(Pid, {handleNotificationEsipa, {pendingNotification, PendingNotification}}), - handle_asn1_notificationList(Pid, NotificationListTail). - %GSMA SGP.32, section 6.3.2.1 handle_asn1(Pid, {initiateAuthenticationRequestEsipa, EsipaReq}) -> EimTransactionId = maps:get(eimTransactionId, EsipaReq, none), @@ -384,7 +376,8 @@ ), % then forward the notifications in the included notification list NotificationList = maps:get(notificationList, EPRAndNotifications), - handle_asn1_notificationList(Pid, NotificationList); + [handle_asn1(Pid, {handleNotificationEsipa, {pendingNotification, PendingNotification}}) || + PendingNotification <- NotificationList]; {ipaEuiccDataResponse, IpaEuiccDataResponse} -> % drive-by store the eUICC public key so that we can use it later to sign PSMOs or eCOs {EidValue, _, _} = mnesia_db_work:pickup(Pid, none),