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
84508513
Commit
84508513
authored
Jul 01, 2016
by
Frédéric Leroy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
UE: create a user and move user_fd into the nas_user_t struct
parent
aa2ab43a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
openair3/NAS/UE/nas_ue_task.c
openair3/NAS/UE/nas_ue_task.c
+13
-10
No files found.
openair3/NAS/UE/nas_ue_task.c
View file @
84508513
...
@@ -25,20 +25,20 @@
...
@@ -25,20 +25,20 @@
# include "nas_ue_task.h"
# include "nas_ue_task.h"
# include "UTIL/LOG/log.h"
# include "UTIL/LOG/log.h"
# include "
nas_user
.h"
# include "
user_defs
.h"
# include "user_api.h"
# include "user_api.h"
# include "nas_parser.h"
# include "nas_parser.h"
# include "nas_proc.h"
# include "nas_proc.h"
# include "msc.h"
# include "msc.h"
#include "nas_user.h"
# define NAS_UE_AUTOSTART 1
# define NAS_UE_AUTOSTART 1
extern
unsigned
char
NB_eNB_INST
;
extern
unsigned
char
NB_eNB_INST
;
extern
unsigned
char
NB_UE_INST
;
extern
unsigned
char
NB_UE_INST
;
static
int
user_fd
;
static
int
nas_ue_process_events
(
nas_user_t
*
user
,
struct
epoll_event
*
events
,
int
nb_events
)
static
int
nas_ue_process_events
(
struct
epoll_event
*
events
,
int
nb_events
)
{
{
int
event
;
int
event
;
int
exit_loop
=
FALSE
;
int
exit_loop
=
FALSE
;
...
@@ -48,8 +48,8 @@ static int nas_ue_process_events(struct epoll_event *events, int nb_events)
...
@@ -48,8 +48,8 @@ static int nas_ue_process_events(struct epoll_event *events, int nb_events)
for
(
event
=
0
;
event
<
nb_events
;
event
++
)
{
for
(
event
=
0
;
event
<
nb_events
;
event
++
)
{
if
(
events
[
event
].
events
!=
0
)
{
if
(
events
[
event
].
events
!=
0
)
{
/* If the event has not been yet been processed (not an itti message) */
/* If the event has not been yet been processed (not an itti message) */
if
(
events
[
event
].
data
.
fd
==
user
_
fd
)
{
if
(
events
[
event
].
data
.
fd
==
user
->
fd
)
{
exit_loop
=
nas_user_receive_and_process
(
&
user
_
fd
,
NULL
);
exit_loop
=
nas_user_receive_and_process
(
&
user
->
fd
,
NULL
);
}
else
{
}
else
{
LOG_E
(
NAS
,
"[UE] Received an event from an unknown fd %d!
\n
"
,
events
[
event
].
data
.
fd
);
LOG_E
(
NAS
,
"[UE] Received an event from an unknown fd %d!
\n
"
,
events
[
event
].
data
.
fd
);
}
}
...
@@ -68,6 +68,9 @@ void *nas_ue_task(void *args_p)
...
@@ -68,6 +68,9 @@ void *nas_ue_task(void *args_p)
instance_t
instance
;
instance_t
instance
;
unsigned
int
Mod_id
;
unsigned
int
Mod_id
;
int
result
;
int
result
;
nas_user_t
user_value
=
{};
nas_user_t
*
user
=
&
user_value
;
itti_mark_task_ready
(
TASK_NAS_UE
);
itti_mark_task_ready
(
TASK_NAS_UE
);
MSC_START_USE
();
MSC_START_USE
();
...
@@ -81,8 +84,8 @@ void *nas_ue_task(void *args_p)
...
@@ -81,8 +84,8 @@ void *nas_ue_task(void *args_p)
exit
(
EXIT_FAILURE
);
exit
(
EXIT_FAILURE
);
}
}
user
_
fd
=
user_api_get_fd
();
user
->
fd
=
user_api_get_fd
();
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user
_
fd
);
itti_subscribe_event_fd
(
TASK_NAS_UE
,
user
->
fd
);
}
}
/* Initialize NAS user */
/* Initialize NAS user */
...
@@ -114,7 +117,7 @@ void *nas_ue_task(void *args_p)
...
@@ -114,7 +117,7 @@ void *nas_ue_task(void *args_p)
/* Send an activate modem command to NAS like UserProcess should do it */
/* Send an activate modem command to NAS like UserProcess should do it */
char
*
user_data
=
"at+cfun=1
\r
"
;
char
*
user_data
=
"at+cfun=1
\r
"
;
nas_user_receive_and_process
(
&
user
_
fd
,
user_data
);
nas_user_receive_and_process
(
&
user
->
fd
,
user_data
);
}
}
#endif
#endif
break
;
break
;
...
@@ -215,7 +218,7 @@ void *nas_ue_task(void *args_p)
...
@@ -215,7 +218,7 @@ void *nas_ue_task(void *args_p)
nb_events
=
itti_get_events
(
TASK_NAS_UE
,
&
events
);
nb_events
=
itti_get_events
(
TASK_NAS_UE
,
&
events
);
if
((
nb_events
>
0
)
&&
(
events
!=
NULL
))
{
if
((
nb_events
>
0
)
&&
(
events
!=
NULL
))
{
if
(
nas_ue_process_events
(
events
,
nb_events
)
==
TRUE
)
{
if
(
nas_ue_process_events
(
user
,
events
,
nb_events
)
==
TRUE
)
{
LOG_E
(
NAS
,
"[UE] Received exit loop
\n
"
);
LOG_E
(
NAS
,
"[UE] Received exit loop
\n
"
);
}
}
}
}
...
...
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