Compare commits
1 commit
359c6dd598
...
ff1520657c
Author | SHA1 | Date | |
---|---|---|---|
ff1520657c |
1 changed files with 3 additions and 6 deletions
|
@ -94,7 +94,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es10b_get_euicc_challenge_and_info(ctx);
|
||||
syslog(LOG_INFO, "es10b_get_euicc_challenge_and_info %d", ret);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = -ES10B_ERROR_REASON_UNDEFINED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -107,7 +106,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es9p_initiate_authentication(ctx);
|
||||
syslog(LOG_INFO, "es9p_initiate_authentication %d", ret);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = -ES10B_ERROR_REASON_UNDEFINED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -120,7 +118,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es10b_authenticate_server(ctx, _matching_id, _imei);
|
||||
syslog(LOG_INFO, "es10b_authenticate_server %d", ret);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = -ES10B_ERROR_REASON_UNDEFINED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -132,7 +129,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es9p_authenticate_client(ctx);
|
||||
syslog(LOG_INFO, "es9p_authenticate_client %d", ret);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = -ES10B_ERROR_REASON_UNDEFINED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -145,7 +141,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es10b_prepare_download(ctx, _confirmation_code);
|
||||
syslog(LOG_INFO, "es10b_prepare_download %d", ret);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = -ES10B_ERROR_REASON_UNDEFINED;
|
||||
goto out;
|
||||
}
|
||||
|
@ -167,7 +162,6 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
ret = es10b_load_bound_profile_package(ctx, &es10b_load_bound_profile_package_result);
|
||||
syslog(LOG_INFO, "es10b_load_bound_profile_package %d, reason %d", ret, es10b_load_bound_profile_package_result.errorReason);
|
||||
if (ret < 0) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
ret = - (int) es10b_load_bound_profile_package_result.errorReason;
|
||||
goto out;
|
||||
}
|
||||
|
@ -175,6 +169,9 @@ Java_net_typeblog_lpac_1jni_LpacJni_downloadProfile(JNIEnv *env, jobject thiz, j
|
|||
euicc_http_cleanup(ctx);
|
||||
|
||||
out:
|
||||
if (ret == -ES10B_ERROR_REASON_UNDEFINED) {
|
||||
SET_CANCELLED(JNI_TRUE);
|
||||
}
|
||||
// We expect Java side to call cancelSessions after any error -- thus, `euicc_http_cleanup` is done there
|
||||
// This is so that Java side can access the last HTTP and/or APDU errors when we return.
|
||||
if (_confirmation_code != NULL)
|
||||
|
|
Loading…
Add table
Reference in a new issue