Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
wangjie
OpenXG-RAN
Commits
9af35991
Commit
9af35991
authored
Jul 22, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE: add nas_user_api_id_initialize() function
parent
e36aee0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
openair3/NAS/UE/nas_ue_task.c
openair3/NAS/UE/nas_ue_task.c
+15
-14
No files found.
openair3/NAS/UE/nas_ue_task.c
View file @
9af35991
...
...
@@ -62,6 +62,20 @@ static int nas_ue_process_events(nas_user_t *user, struct epoll_event *events, i
return
(
exit_loop
);
}
// Initialize user api id and port number
void
nas_user_api_id_initialize
(
nas_user_t
*
user
)
{
user_api_id_t
*
user_api_id
=
calloc_or_fail
(
sizeof
(
user_api_id_t
));
user
->
user_api_id
=
user_api_id
;
if
(
user_api_initialize
(
user_api_id
,
NAS_PARSER_DEFAULT_USER_HOSTNAME
,
NAS_PARSER_DEFAULT_USER_PORT_NUMBER
,
NULL
,
NULL
)
!=
RETURNok
)
{
LOG_E
(
NAS
,
"[UE %d] user interface initialization failed!"
,
user
->
ueid
);
exit
(
EXIT_FAILURE
);
}
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user_api_get_fd
(
user_api_id
));
}
void
*
nas_ue_task
(
void
*
args_p
)
{
int
nb_events
;
...
...
@@ -81,23 +95,10 @@ void *nas_ue_task(void *args_p)
/* Initialize UE NAS (EURECOM-NAS) */
{
/* Initialize user interface (to exchange AT commands with user process) */
{
user_api_id_t
*
user_api_id
=
calloc_or_fail
(
sizeof
(
user_api_id_t
));
user
->
user_api_id
=
user_api_id
;
if
(
user_api_initialize
(
user_api_id
,
NAS_PARSER_DEFAULT_USER_HOSTNAME
,
NAS_PARSER_DEFAULT_USER_PORT_NUMBER
,
NULL
,
NULL
)
!=
RETURNok
)
{
LOG_E
(
NAS
,
"[UE] user interface initialization failed!"
);
exit
(
EXIT_FAILURE
);
}
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user_api_get_fd
(
user_api_id
));
}
nas_user_api_id_initialize
(
user
);
user
->
user_at_commands
=
calloc_or_fail
(
sizeof
(
user_at_commands_t
));
user
->
at_response
=
calloc_or_fail
(
sizeof
(
at_response_t
));
user
->
lowerlayer_data
=
calloc_or_fail
(
sizeof
(
lowerlayer_data_t
));
/* Initialize NAS user */
nas_user_initialize
(
user
,
&
user_api_emm_callback
,
&
user_api_esm_callback
,
FIRMWARE_VERSION
);
}
...
...
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