jolly has uploaded this change for review.
V1.2: Add function ES10b.DisableEmergencyProfile
Add new library function to disable emergency profile on IoT eUICC.
Also add an option to the command line interface to call the library
function. The optional refresh flag may be set via command line option.
The function cannot be emulated with non-IoT eUICC.
Reference: SGP.32 Section 5.9.23
Related: SYS#8101
Change-Id: I2af2077228fb8c5fa3f254acc15bd0afaa33fe43
---
M asn1/SGP32Definitions.asn
M include/onomondo/ipa/ipad.h
M src/ipa/libasn/CMakeLists.txt
A src/ipa/libasn/DisableEmergencyProfileRequest.c
A src/ipa/libasn/DisableEmergencyProfileRequest.h
A src/ipa/libasn/DisableEmergencyProfileResponse.c
A src/ipa/libasn/DisableEmergencyProfileResponse.h
M src/ipa/libipa/CMakeLists.txt
A src/ipa/libipa/es10b_dis_emerg_prfle.c
A src/ipa/libipa/es10b_dis_emerg_prfle.h
M src/ipa/libipa/ipad.c
M src/ipa/main.c
12 files changed, 371 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-ipa refs/changes/44/43044/1
diff --git a/asn1/SGP32Definitions.asn b/asn1/SGP32Definitions.asn
index a33785b..8dd2579 100644
--- a/asn1/SGP32Definitions.asn
+++ b/asn1/SGP32Definitions.asn
@@ -648,6 +648,23 @@
}
-- ASN1STOP
+-- Section 5.9.23
+-- ASN1START
+DisableEmergencyProfileRequest ::= [92] SEQUENCE { -- Tag 'BF5C'
+ refreshFlag BOOLEAN -- indicating whether REFRESH is required
+}
+-- ASN1STOP
+-- ASN1START
+DisableEmergencyProfileResponse ::= [92] SEQUENCE { -- Tag 'BF5C'
+ disableEmergencyProfileResult [0] INTEGER {
+ ok(0),
+ profileNotInEnabledState(2),
+ catBusy(5),
+ undefinedError(127)
+ }
+}
+-- ASN1STOP
+
-- Section 5.9.25
-- ASN1START
SGP32-SetDefaultDpAddressRequest ::= [101] SEQUENCE { -- Tag 'BF65'
diff --git a/include/onomondo/ipa/ipad.h b/include/onomondo/ipa/ipad.h
index c952603..139ae21 100644
--- a/include/onomondo/ipa/ipad.h
+++ b/include/onomondo/ipa/ipad.h
@@ -97,6 +97,7 @@
int ipa_execute_fallback_mechanism(struct ipa_context *ctx, bool refresh_flag);
int ipa_return_from_fallback(struct ipa_context *ctx, bool refresh_flag);
int ipa_enable_emergency_profile(struct ipa_context *ctx, bool refresh_flag);
+int ipa_disable_emergency_profile(struct ipa_context *ctx, bool refresh_flag);
int ipa_poll(struct ipa_context *ctx);
void ipa_close(struct ipa_context *ctx);
struct ipa_buf *ipa_free_ctx(struct ipa_context *ctx);
diff --git a/src/ipa/libasn/CMakeLists.txt b/src/ipa/libasn/CMakeLists.txt
index f25fa19..209a5f3 100644
--- a/src/ipa/libasn/CMakeLists.txt
+++ b/src/ipa/libasn/CMakeLists.txt
@@ -247,6 +247,10 @@
DeviceInfo.h
DirectoryString.c
DirectoryString.h
+DisableEmergencyProfileRequest.c
+DisableEmergencyProfileRequest.h
+DisableEmergencyProfileResponse.c
+DisableEmergencyProfileResponse.h
DisableProfileRequest.c
DisableProfileRequest.h
DisableProfileResponse.c
diff --git a/src/ipa/libasn/DisableEmergencyProfileRequest.c b/src/ipa/libasn/DisableEmergencyProfileRequest.c
new file mode 100644
index 0000000..d5a273f
--- /dev/null
+++ b/src/ipa/libasn/DisableEmergencyProfileRequest.c
@@ -0,0 +1,51 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#include "DisableEmergencyProfileRequest.h"
+
+static asn_TYPE_member_t asn_MBR_DisableEmergencyProfileRequest_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct DisableEmergencyProfileRequest, refreshFlag),
+ (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+ -1, /* IMPLICIT tag at current level */
+ &asn_DEF_BOOLEAN,
+ 0,
+ { 0, 0, 0 },
+ 0, 0, /* No default value */
+ "refreshFlag"
+ },
+};
+static const ber_tlv_tag_t asn_DEF_DisableEmergencyProfileRequest_tags_1[] = {
+ (ASN_TAG_CLASS_CONTEXT | (92 << 2)),
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static const asn_TYPE_tag2member_t asn_MAP_DisableEmergencyProfileRequest_tag2el_1[] = {
+ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* refreshFlag */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_DisableEmergencyProfileRequest_specs_1 = {
+ sizeof(struct DisableEmergencyProfileRequest),
+ offsetof(struct DisableEmergencyProfileRequest, _asn_ctx),
+ asn_MAP_DisableEmergencyProfileRequest_tag2el_1,
+ 1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
+ 1, /* First extension addition */
+};
+asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileRequest = {
+ "DisableEmergencyProfileRequest",
+ "DisableEmergencyProfileRequest",
+ &asn_OP_SEQUENCE,
+ asn_DEF_DisableEmergencyProfileRequest_tags_1,
+ sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1)
+ /sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1[0]) - 1, /* 1 */
+ asn_DEF_DisableEmergencyProfileRequest_tags_1, /* Same as above */
+ sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1)
+ /sizeof(asn_DEF_DisableEmergencyProfileRequest_tags_1[0]), /* 2 */
+ { 0, 0, SEQUENCE_constraint },
+ asn_MBR_DisableEmergencyProfileRequest_1,
+ 1, /* Elements count */
+ &asn_SPC_DisableEmergencyProfileRequest_specs_1 /* Additional specs */
+};
+
diff --git a/src/ipa/libasn/DisableEmergencyProfileRequest.h b/src/ipa/libasn/DisableEmergencyProfileRequest.h
new file mode 100644
index 0000000..04c8057
--- /dev/null
+++ b/src/ipa/libasn/DisableEmergencyProfileRequest.h
@@ -0,0 +1,42 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#ifndef _DisableEmergencyProfileRequest_H_
+#define _DisableEmergencyProfileRequest_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include <BOOLEAN.h>
+#include <constr_SEQUENCE.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* DisableEmergencyProfileRequest */
+typedef struct DisableEmergencyProfileRequest {
+ BOOLEAN_t refreshFlag;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} DisableEmergencyProfileRequest_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileRequest;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DisableEmergencyProfileRequest_H_ */
+#include <asn_internal.h>
diff --git a/src/ipa/libasn/DisableEmergencyProfileResponse.c b/src/ipa/libasn/DisableEmergencyProfileResponse.c
new file mode 100644
index 0000000..12e6527
--- /dev/null
+++ b/src/ipa/libasn/DisableEmergencyProfileResponse.c
@@ -0,0 +1,51 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#include "DisableEmergencyProfileResponse.h"
+
+static asn_TYPE_member_t asn_MBR_DisableEmergencyProfileResponse_1[] = {
+ { ATF_NOFLAGS, 0, offsetof(struct DisableEmergencyProfileResponse, disableEmergencyProfileResult),
+ (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+ -1, /* IMPLICIT tag at current level */
+ &asn_DEF_NativeInteger,
+ 0,
+ { 0, 0, 0 },
+ 0, 0, /* No default value */
+ "disableEmergencyProfileResult"
+ },
+};
+static const ber_tlv_tag_t asn_DEF_DisableEmergencyProfileResponse_tags_1[] = {
+ (ASN_TAG_CLASS_CONTEXT | (92 << 2)),
+ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static const asn_TYPE_tag2member_t asn_MAP_DisableEmergencyProfileResponse_tag2el_1[] = {
+ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* disableEmergencyProfileResult */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_DisableEmergencyProfileResponse_specs_1 = {
+ sizeof(struct DisableEmergencyProfileResponse),
+ offsetof(struct DisableEmergencyProfileResponse, _asn_ctx),
+ asn_MAP_DisableEmergencyProfileResponse_tag2el_1,
+ 1, /* Count of tags in the map */
+ 0, 0, 0, /* Optional elements (not needed) */
+ 1, /* First extension addition */
+};
+asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileResponse = {
+ "DisableEmergencyProfileResponse",
+ "DisableEmergencyProfileResponse",
+ &asn_OP_SEQUENCE,
+ asn_DEF_DisableEmergencyProfileResponse_tags_1,
+ sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1)
+ /sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1[0]) - 1, /* 1 */
+ asn_DEF_DisableEmergencyProfileResponse_tags_1, /* Same as above */
+ sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1)
+ /sizeof(asn_DEF_DisableEmergencyProfileResponse_tags_1[0]), /* 2 */
+ { 0, 0, SEQUENCE_constraint },
+ asn_MBR_DisableEmergencyProfileResponse_1,
+ 1, /* Elements count */
+ &asn_SPC_DisableEmergencyProfileResponse_specs_1 /* Additional specs */
+};
+
diff --git a/src/ipa/libasn/DisableEmergencyProfileResponse.h b/src/ipa/libasn/DisableEmergencyProfileResponse.h
new file mode 100644
index 0000000..898b2c6
--- /dev/null
+++ b/src/ipa/libasn/DisableEmergencyProfileResponse.h
@@ -0,0 +1,50 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "SGP32Definitions"
+ * found in "../../../asn1/SGP32Definitions.asn"
+ * `asn1c -fcompound-names -no-gen-example`
+ */
+
+#ifndef _DisableEmergencyProfileResponse_H_
+#define _DisableEmergencyProfileResponse_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include <NativeInteger.h>
+#include <constr_SEQUENCE.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Dependencies */
+typedef enum DisableEmergencyProfileResponse__disableEmergencyProfileResult {
+ DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok = 0,
+ DisableEmergencyProfileResponse__disableEmergencyProfileResult_profileNotInEnabledState = 2,
+ DisableEmergencyProfileResponse__disableEmergencyProfileResult_catBusy = 5,
+ DisableEmergencyProfileResponse__disableEmergencyProfileResult_undefinedError = 127
+} e_DisableEmergencyProfileResponse__disableEmergencyProfileResult;
+
+/* DisableEmergencyProfileResponse */
+typedef struct DisableEmergencyProfileResponse {
+ long disableEmergencyProfileResult;
+ /*
+ * This type is extensible,
+ * possible extensions are below.
+ */
+
+ /* Context for parsing across buffer boundaries */
+ asn_struct_ctx_t _asn_ctx;
+} DisableEmergencyProfileResponse_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_DisableEmergencyProfileResponse;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _DisableEmergencyProfileResponse_H_ */
+#include <asn_internal.h>
diff --git a/src/ipa/libipa/CMakeLists.txt b/src/ipa/libipa/CMakeLists.txt
index 8b5b9f8..d25b35b 100644
--- a/src/ipa/libipa/CMakeLists.txt
+++ b/src/ipa/libipa/CMakeLists.txt
@@ -23,6 +23,7 @@
es10b_exec_fallback_mech.c
es10b_ret_from_fallback.c
es10b_en_emerg_prfle.c
+ es10b_dis_emerg_prfle.c
es10c_delete_prfle.c
es10c_disable_prfle.c
es10c_enable_prfle.c
diff --git a/src/ipa/libipa/es10b_dis_emerg_prfle.c b/src/ipa/libipa/es10b_dis_emerg_prfle.c
new file mode 100644
index 0000000..5ca12cf
--- /dev/null
+++ b/src/ipa/libipa/es10b_dis_emerg_prfle.c
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ *
+ * Author: Philipp Maier <pmaier@sysmocom.de> / sysmocom - s.f.m.c. GmbH
+ * Andreas Eversberg <aeversberg@sysmocom.de> / sysmocom - s.f.m.c. GmbH
+ *
+ * See also: GSMA SGP.22, 5.9.23: Function (ES10b): DisableEmergencyProfile
+ */
+
+#include <stdio.h>
+#include <assert.h>
+#include <onomondo/ipa/utils.h>
+#include "context.h"
+#include "utils.h"
+#include "euicc.h"
+#include "es10x.h"
+#include "es10b_dis_emerg_prfle.h"
+
+static const struct num_str_map error_code_strings[] = {
+ { DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok, "ok" },
+ { DisableEmergencyProfileResponse__disableEmergencyProfileResult_profileNotInEnabledState, "profileNotInEnabledState" },
+ { DisableEmergencyProfileResponse__disableEmergencyProfileResult_catBusy, "catBusy" },
+ { DisableEmergencyProfileResponse__disableEmergencyProfileResult_undefinedError, "undefinedError" },
+ { 0, NULL }
+};
+
+static int dec_dis_emerg_prfle_res(struct ipa_es10b_dis_emerg_prfle_res *res, const struct ipa_buf *es10b_res)
+{
+ struct DisableEmergencyProfileResponse *asn = NULL;
+
+ asn = ipa_es10x_res_dec(&asn_DEF_DisableEmergencyProfileResponse, es10b_res, "DisableEmergencyProfile");
+ if (!asn)
+ return -EINVAL;
+
+ if (asn->disableEmergencyProfileResult != DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok) {
+ IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "function failed with error code %ld=%s!\n",
+ asn->disableEmergencyProfileResult,
+ ipa_str_from_num(error_code_strings, asn->disableEmergencyProfileResult, "(unknown)"));
+ } else {
+ IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "function succeeded with status code %ld=%s!\n",
+ asn->disableEmergencyProfileResult,
+ ipa_str_from_num(error_code_strings, asn->disableEmergencyProfileResult, "(unknown)"));
+ }
+
+ res->res = asn;
+ return 0;
+}
+
+/*! Function (Es10b): DisableEmergencyProfile.
+ * \param[inout] ctx pointer to ipa_context.
+ * \param[in] req pointer to struct that holds the function parameters.
+ * \returns pointer newly allocated struct with function result, NULL on error. */
+struct ipa_es10b_dis_emerg_prfle_res *ipa_es10b_dis_emerg_prfle(struct ipa_context *ctx,
+ const struct ipa_es10b_dis_emerg_prfle_req *req)
+{
+ struct ipa_buf *es10b_req = NULL;
+ struct ipa_buf *es10b_res = NULL;
+ struct ipa_es10b_dis_emerg_prfle_res *res = IPA_ALLOC_ZERO(struct ipa_es10b_dis_emerg_prfle_res);
+ int rc;
+
+ es10b_req = ipa_es10x_req_enc(&asn_DEF_DisableEmergencyProfileRequest, &req->req, "DisableEmergencyProfile");
+ if (!es10b_req) {
+ IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "unable to encode Es10b request\n");
+ goto error;
+ }
+
+ es10b_res = ipa_euicc_transceive_es10x(ctx, es10b_req);
+ if (!es10b_res) {
+ IPA_LOGP_ES10X("DisableEmergencyProfile", LERROR, "no Es10b response\n");
+ goto error;
+ }
+
+ rc = dec_dis_emerg_prfle_res(res, es10b_res);
+ if (rc < 0)
+ goto error;
+
+ IPA_FREE(es10b_req);
+ IPA_FREE(es10b_res);
+ return res;
+error:
+ IPA_FREE(es10b_req);
+ IPA_FREE(es10b_res);
+ ipa_es10b_dis_emerg_prfle_res_free(res);
+ return NULL;
+}
+
+/*! Free results of function (Es10b): DisableEmergencyProfile.
+ * \param[in] res pointer to function result. */
+void ipa_es10b_dis_emerg_prfle_res_free(struct ipa_es10b_dis_emerg_prfle_res *res)
+{
+ IPA_ES10X_RES_FREE(asn_DEF_DisableEmergencyProfileResponse, res);
+}
diff --git a/src/ipa/libipa/es10b_dis_emerg_prfle.h b/src/ipa/libipa/es10b_dis_emerg_prfle.h
new file mode 100644
index 0000000..0eb6325
--- /dev/null
+++ b/src/ipa/libipa/es10b_dis_emerg_prfle.h
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2026 sysmocom - s.f.m.c. GmbH. All rights reserved.
+ *
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+#pragma once
+
+#include <DisableEmergencyProfileRequest.h>
+#include <DisableEmergencyProfileResponse.h>
+struct ipa_context;
+
+struct ipa_es10b_dis_emerg_prfle_req {
+ struct DisableEmergencyProfileRequest req;
+};
+
+struct ipa_es10b_dis_emerg_prfle_res {
+ struct DisableEmergencyProfileResponse *res;
+};
+
+struct ipa_es10b_dis_emerg_prfle_res *ipa_es10b_dis_emerg_prfle(struct ipa_context *ctx,
+ const struct ipa_es10b_dis_emerg_prfle_req *req);
+void ipa_es10b_dis_emerg_prfle_res_free(struct ipa_es10b_dis_emerg_prfle_res *res);
diff --git a/src/ipa/libipa/ipad.c b/src/ipa/libipa/ipad.c
index 79cab99..33e634d 100644
--- a/src/ipa/libipa/ipad.c
+++ b/src/ipa/libipa/ipad.c
@@ -28,6 +28,7 @@
#include "es10b_exec_fallback_mech.h"
#include "es10b_ret_from_fallback.h"
#include "es10b_en_emerg_prfle.h"
+#include "es10b_dis_emerg_prfle.h"
#include "proc_euicc_pkg_dwnld_exec.h"
#include "proc_notif_delivery.h"
@@ -344,6 +345,32 @@
return rc;
}
+/*! Trigger enabling of fallback profile.
+ * \param[inout] ctx pointer to ipa_context.
+ * \param[in] refresh_flag send a CAT refresh after switchting profile.
+ * \returns 0 on success, negative on error. */
+int ipa_disable_emergency_profile(struct ipa_context *ctx, bool refresh_flag)
+{
+ struct ipa_es10b_dis_emerg_prfle_req dis_emerg_prfle = { 0 };
+ struct ipa_es10b_dis_emerg_prfle_res *res;
+ int rc = -EINVAL;
+
+ if (ctx->cfg->iot_euicc_emu_enabled) {
+ IPA_LOGP(SIPA, LERROR, "Unable to emulate switching back from emergency profile.\n");
+ return -ENOTSUP;
+ }
+
+ dis_emerg_prfle.req.refreshFlag = refresh_flag;
+ res = ipa_es10b_dis_emerg_prfle(ctx, &dis_emerg_prfle);
+ if (!res)
+ return -EIO;
+ if (res->res->disableEmergencyProfileResult == DisableEmergencyProfileResponse__disableEmergencyProfileResult_ok)
+ rc = 0;
+ ipa_es10b_dis_emerg_prfle_res_free(res);
+
+ return rc;
+}
+
static int check_canaries(struct ipa_context *ctx)
{
if (ctx->check_http)
diff --git a/src/ipa/main.c b/src/ipa/main.c
index f49ddd5..9ed5c36 100644
--- a/src/ipa/main.c
+++ b/src/ipa/main.c
@@ -52,6 +52,7 @@
printf(" --execute-fallback-mechanism Trigger enabling of fallback profile\n");
printf(" --return-from-fallback...... Trigger return from fallback profile to previous profile\n");
printf(" --enable-emergency-profile.. Trigger enabling of emergency profile\n");
+ printf(" --disable-emergency-profile. Trigger return from emergency profile to previous profile\n");
printf(" --refresh-flag.............. Make eUICC send a CAT refresh after switchting profile with the triggers above.\n");
printf(" -n PATH .................... path to nvstate file (default: %s)\n", DEFAULT_NVSTATE_PATH);
printf(" -y NUM ..................... number of retries for ESipa requests (default: %u)\n",
@@ -149,6 +150,7 @@
bool getopt_execute_fallback_mechanism = false;
bool getopt_return_from_fallback = false;
bool getopt_enable_emergency_profile = false;
+ bool getopt_disable_emergency_profile = false;
bool getopt_refresh_flag = false;
char *getopt_nvstate_path = DEFAULT_NVSTATE_PATH;
struct ipa_buf *nvstate_load = NULL;
@@ -170,6 +172,7 @@
OPT_EXECFALLBACK = 256,
OPT_RETURNFALLBACK,
OPT_ENABLEEMGERGENCY,
+ OPT_DISABLEEMGERGENCY,
OPT_REFRESHFLAG,
};
@@ -177,6 +180,7 @@
{ "execute-fallback-mechanism", no_argument, NULL, OPT_EXECFALLBACK},
{ "return-from-fallback", no_argument, NULL, OPT_RETURNFALLBACK},
{ "enable-emergency-profile", no_argument, NULL, OPT_ENABLEEMGERGENCY},
+ { "disable-emergency-profile", no_argument, NULL, OPT_DISABLEEMGERGENCY},
{ "refresh-flag", no_argument, NULL, OPT_REFRESHFLAG},
{ NULL, 0, NULL, 0}
};
@@ -219,6 +223,9 @@
case OPT_ENABLEEMGERGENCY:
getopt_enable_emergency_profile = true;
break;
+ case OPT_DISABLEEMGERGENCY:
+ getopt_disable_emergency_profile = true;
+ break;
case OPT_REFRESHFLAG:
getopt_refresh_flag = true;
break;
@@ -312,6 +319,9 @@
} else if (getopt_enable_emergency_profile) {
/* Trigger enabling of emergency profile */
ipa_enable_emergency_profile(ctx, getopt_refresh_flag);
+ } else if (getopt_disable_emergency_profile) {
+ /* Trigger return from emergency profile to previous profile */
+ ipa_disable_emergency_profile(ctx, getopt_refresh_flag);
} else {
IPA_LOGP(SMAIN, LINFO, "-----------------------------8<-----------------------------\n");
rc = eim_init(ctx);
To view, visit change 43044. To unsubscribe, or for help writing mail filters, visit settings.