changeset 52:2f697a8c5196

fc-simtool pb-* commands support new EF_MBDN phonebook
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 13 Feb 2021 05:33:46 +0000
parents ab3c945f869e
children 4eb447be01c0
files simtool/pbcommon.c
diffstat 1 files changed, 18 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/simtool/pbcommon.c	Sat Feb 13 05:23:07 2021 +0000
+++ b/simtool/pbcommon.c	Sat Feb 13 05:33:46 2021 +0000
@@ -14,22 +14,26 @@
 static struct map {
 	char	*user_name;
 	char	*canon_name;
+	int	dir_id;
 	int	file_id;
 } phonebook_map[] = {
-	{"adn",		"EF_ADN",	EF_ADN},
-	{"ADN",		"EF_ADN",	EF_ADN},
-	{"EF_ADN",	"EF_ADN",	EF_ADN},
-	{"fdn",		"EF_FDN",	EF_FDN},
-	{"FDN",		"EF_FDN",	EF_FDN},
-	{"EF_FDN",	"EF_FDN",	EF_FDN},
-	{"sdn",		"EF_SDN",	EF_SDN},
-	{"SDN",		"EF_SDN",	EF_SDN},
-	{"EF_SDN",	"EF_SDN",	EF_SDN},
-	{"msisdn",	"EF_MSISDN",	EF_MSISDN},
-	{"MSISDN",	"EF_MSISDN",	EF_MSISDN},
-	{"EF_MSISDN",	"EF_MSISDN",	EF_MSISDN},
+	{"adn",		"EF_ADN",	DF_TELECOM,	EF_ADN},
+	{"ADN",		"EF_ADN",	DF_TELECOM,	EF_ADN},
+	{"EF_ADN",	"EF_ADN",	DF_TELECOM,	EF_ADN},
+	{"fdn",		"EF_FDN",	DF_TELECOM,	EF_FDN},
+	{"FDN",		"EF_FDN",	DF_TELECOM,	EF_FDN},
+	{"EF_FDN",	"EF_FDN",	DF_TELECOM,	EF_FDN},
+	{"sdn",		"EF_SDN",	DF_TELECOM,	EF_SDN},
+	{"SDN",		"EF_SDN",	DF_TELECOM,	EF_SDN},
+	{"EF_SDN",	"EF_SDN",	DF_TELECOM,	EF_SDN},
+	{"msisdn",	"EF_MSISDN",	DF_TELECOM,	EF_MSISDN},
+	{"MSISDN",	"EF_MSISDN",	DF_TELECOM,	EF_MSISDN},
+	{"EF_MSISDN",	"EF_MSISDN",	DF_TELECOM,	EF_MSISDN},
+	{"mbdn",	"EF_MBDN",	DF_GSM,		EF_MBDN},
+	{"MBDN",	"EF_MBDN",	DF_GSM,		EF_MBDN},
+	{"EF_MBDN",	"EF_MBDN",	DF_GSM,		EF_MBDN},
 	/* table search terminator */
-	{0,		0,		-1}
+	{0,		0,		-1,		-1}
 };
 
 phonebook_op_common(reqname)
@@ -46,7 +50,7 @@
 			reqname);
 		return(-1);
 	}
-	rc = select_op(DF_TELECOM);
+	rc = select_op(tp->dir_id);
 	if (rc < 0)
 		return(rc);
 	rc = select_op(tp->file_id);