Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG UE
Commits
995b385c
Commit
995b385c
authored
Jul 26, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE/EMM: move emm_nvram filename to nas_user_t
parent
1ead49cb
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
54 deletions
+51
-54
openair3/NAS/UE/EMM/emm_main.c
openair3/NAS/UE/EMM/emm_main.c
+40
-51
openair3/NAS/UE/EMM/emm_main.h
openair3/NAS/UE/EMM/emm_main.h
+1
-1
openair3/NAS/UE/nas_proc.c
openair3/NAS/UE/nas_proc.c
+1
-1
openair3/NAS/UE/nas_ue_task.c
openair3/NAS/UE/nas_ue_task.c
+8
-1
openair3/NAS/UE/user_defs.h
openair3/NAS/UE/user_defs.h
+1
-0
No files found.
openair3/NAS/UE/EMM/emm_main.c
View file @
995b385c
...
...
@@ -344,18 +344,15 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
*/
memset
(
&
user
->
emm_data
->
nvdata
.
rplmn
,
0xFF
,
sizeof
(
plmn_t
));
user
->
emm_data
->
nvdata
.
eplmn
.
n_plmns
=
0
;
/* Get EMM data pathname */
char
*
path
=
memory_get_path
(
EMM_NVRAM_DIRNAME
,
EMM_NVRAM_FILENAME
);
if
(
path
==
NULL
)
{
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to get EMM data pathname"
);
}
else
{
/* Get EMM data stored in the non-volatile memory device */
int
rc
=
memory_read
(
path
,
&
user
->
emm_data
->
nvdata
,
sizeof
(
emm_nvdata_t
));
int
rc
=
memory_read
(
user
->
emm_nvdata_store
,
&
user
->
emm_data
->
nvdata
,
sizeof
(
emm_nvdata_t
));
if
(
rc
!=
RETURNok
)
{
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to read %s"
,
path
);
}
else
{
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to read %s"
,
user
->
emm_nvdata_store
);
exit
(
EXIT_FAILURE
);
}
/* Check the IMSI */
LOG_TRACE
(
INFO
,
"EMM-MAIN - EMM data successfully read"
);
user
->
emm_data
->
imsi
=
&
user
->
usim_data
.
imsi
;
...
...
@@ -387,10 +384,6 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
}
}
free
(
path
);
}
}
/*
* Initialize EMM timers
*/
...
...
@@ -437,10 +430,12 @@ void emm_main_initialize(nas_user_t *user, emm_indication_callback_t cb, const c
** Others: None **
** **
***************************************************************************/
void
emm_main_cleanup
(
emm_data_t
*
emm_data
)
void
emm_main_cleanup
(
nas_user_t
*
user
)
{
LOG_FUNC_IN
;
emm_data_t
*
emm_data
=
user
->
emm_data
;
if
(
emm_data
->
usim_is_valid
)
{
/*
* TODO: Update USIM application data
...
...
@@ -452,16 +447,10 @@ void emm_main_cleanup(emm_data_t *emm_data)
* - Registered PLMN
* - List of equivalent PLMNs
*/
char
*
path
=
memory_get_path
(
EMM_NVRAM_DIRNAME
,
EMM_NVRAM_FILENAME
);
if
(
path
==
NULL
)
{
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to get EMM data pathname"
);
}
else
{
int
rc
=
memory_write
(
path
,
&
emm_data
->
nvdata
,
sizeof
(
emm_nvdata_t
));
int
rc
=
memory_write
(
user
->
emm_nvdata_store
,
&
emm_data
->
nvdata
,
sizeof
(
emm_nvdata_t
));
if
(
rc
!=
RETURNok
)
{
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to write %s"
,
path
);
}
LOG_TRACE
(
ERROR
,
"EMM-MAIN - Failed to write %s"
,
user
->
emm_nvdata_store
);
}
/* Release dynamically allocated memory */
...
...
openair3/NAS/UE/EMM/emm_main.h
View file @
995b385c
...
...
@@ -70,7 +70,7 @@ typedef int (*emm_indication_callback_t) (user_api_id_t *user_api_id, Stat_t, ta
void
emm_main_initialize
(
nas_user_t
*
user
,
emm_indication_callback_t
cb
,
const
char
*
imei
);
void
emm_main_cleanup
(
emm_data_t
*
emm_data
);
void
emm_main_cleanup
(
nas_user_t
*
user
);
/* User's getter of UE's identity */
...
...
openair3/NAS/UE/nas_proc.c
View file @
995b385c
...
...
@@ -138,7 +138,7 @@ void nas_proc_cleanup(nas_user_t *user)
/* Perform the EPS Mobility Manager's clean up procedure */
emm_main_cleanup
(
user
->
emm_data
);
emm_main_cleanup
(
user
);
/* Perform the EPS Session Manager's clean up procedure */
esm_main_cleanup
(
user
->
esm_data
);
...
...
openair3/NAS/UE/nas_ue_task.c
View file @
995b385c
...
...
@@ -105,7 +105,14 @@ void *nas_ue_task(void *args_p)
/* Get UE's data pathname */
user
->
user_nvdata_store
=
memory_get_path
(
USER_NVRAM_DIRNAME
,
USER_NVRAM_FILENAME
);
if
(
user
->
user_nvdata_store
==
NULL
)
{
LOG_E
(
NAS
,
"[UE %d] - Failed to get USIM data application filename"
,
user
->
ueid
);
LOG_E
(
NAS
,
"[UE %d] - Failed to get USIM nvdata filename"
,
user
->
ueid
);
exit
(
EXIT_FAILURE
);
}
/* Get EMM data pathname */
user
->
emm_nvdata_store
=
memory_get_path
(
EMM_NVRAM_DIRNAME
,
EMM_NVRAM_FILENAME
);
if
(
user
->
emm_nvdata_store
==
NULL
)
{
LOG_E
(
NAS
,
"[UE %d] - Failed to get EMM nvdata filename"
,
user
->
ueid
);
exit
(
EXIT_FAILURE
);
}
...
...
openair3/NAS/UE/user_defs.h
View file @
995b385c
...
...
@@ -70,6 +70,7 @@ typedef struct {
// Eps Mobility Management
emm_fsm_state_t
emm_fsm_status
;
// Current EPS Mobility Management status
emm_data_t
*
emm_data
;
// EPS mobility management data
const
char
*
emm_nvdata_store
;
emm_plmn_list_t
*
emm_plmn_list
;
// list of PLMN identities
authentication_data_t
*
authentication_data
;
security_data_t
*
security_data
;
//Internal data used for security mode control procedure
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment