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
常顺宇
OpenXG-RAN
Commits
ad1a102f
Commit
ad1a102f
authored
Mar 20, 2020
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for CU/DU split
parent
57c993ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
164 deletions
+1
-164
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+1
-4
openair2/RRC/LTE/rrc_eNB_endc.c
openair2/RRC/LTE/rrc_eNB_endc.c
+0
-160
No files found.
openair2/RRC/LTE/rrc_eNB.c
View file @
ad1a102f
...
...
@@ -8510,7 +8510,7 @@ void rrc_eNB_process_AdditionResponseInformation(const module_id_t enb_mod_idP,
unsigned
char
buffer
[
8192
];
int
size
;
ue_context
=
(
rrc_eNB_ue_context_t
*
)
get_first_ue_context
(
RC
.
rrc
[
enb_mod_idP
]
);
ue_context
=
rrc_eNB_get_ue_context
(
RC
.
rrc
[
enb_mod_idP
],
m
->
rnti
);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
0
,
...
...
@@ -8893,9 +8893,6 @@ rrc_enb_task(
{
rrc_enb_init
();
void
rrc_endc_hack_init
(
void
);
rrc_endc_hack_init
();
itti_mark_task_ready
(
TASK_RRC_ENB
);
LOG_I
(
RRC
,
"Entering main loop of RRC message task
\n
"
);
...
...
openair2/RRC/LTE/rrc_eNB_endc.c
View file @
ad1a102f
...
...
@@ -241,163 +241,3 @@ printf("\n");
return
(
enc_rval
.
encoded
+
7
)
/
8
;
}
volatile
int
go_nr
;
struct
rrc_eNB_ue_context_s
*
get_first_ue_context
(
eNB_RRC_INST
*
rrc_instance_pP
)
{
struct
rrc_eNB_ue_context_s
*
ue_context_p
=
NULL
;
RB_FOREACH
(
ue_context_p
,
rrc_ue_tree_s
,
&
(
rrc_instance_pP
->
rrc_ue_head
))
{
return
ue_context_p
;
}
return
NULL
;
}
void
rrc_go_nr
(
void
)
{
protocol_ctxt_t
ctxt
;
rrc_eNB_ue_context_t
*
ue_context
;
unsigned
char
buffer
[
8192
];
int
size
;
go_nr
=
0
;
ue_context
=
get_first_ue_context
(
RC
.
rrc
[
0
]);
PROTOCOL_CTXT_SET_BY_INSTANCE
(
&
ctxt
,
0
,
ENB_FLAG_YES
,
ue_context
->
ue_context
.
rnti
,
0
,
0
);
size
=
rrc_eNB_generate_RRCConnectionReconfiguration_endc
(
&
ctxt
,
ue_context
,
buffer
,
8192
,
NULL
,
NULL
);
rrc_data_req
(
&
ctxt
,
DCCH
,
rrc_eNB_mui
++
,
SDU_CONFIRM_NO
,
size
,
buffer
,
PDCP_TRANSMISSION_MODE_CONTROL
);
}
static
void
new_thread
(
void
*
(
*
f
)(
void
*
),
void
*
data
)
{
pthread_t
t
;
pthread_attr_t
att
;
if
(
pthread_attr_init
(
&
att
))
{
fprintf
(
stderr
,
"pthread_attr_init err
\n
"
);
exit
(
1
);
}
if
(
pthread_attr_setdetachstate
(
&
att
,
PTHREAD_CREATE_DETACHED
))
{
fprintf
(
stderr
,
"pthread_attr_setdetachstate err
\n
"
);
exit
(
1
);
}
if
(
pthread_attr_setstacksize
(
&
att
,
10000000
))
{
fprintf
(
stderr
,
"pthread_attr_setstacksize err
\n
"
);
exit
(
1
);
}
if
(
pthread_create
(
&
t
,
&
att
,
f
,
data
))
{
fprintf
(
stderr
,
"pthread_create err
\n
"
);
exit
(
1
);
}
if
(
pthread_attr_destroy
(
&
att
))
{
fprintf
(
stderr
,
"pthread_attr_destroy err
\n
"
);
exit
(
1
);
}
}
static
int
create_listen_socket
(
char
*
addr
,
int
port
)
{
struct
sockaddr_in
a
;
int
s
;
int
v
;
s
=
socket
(
AF_INET
,
SOCK_STREAM
,
0
);
if
(
s
==
-
1
)
{
perror
(
"socket"
);
exit
(
1
);
}
v
=
1
;
if
(
setsockopt
(
s
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
v
,
sizeof
(
int
)))
{
perror
(
"setsockopt"
);
exit
(
1
);
}
a
.
sin_family
=
AF_INET
;
a
.
sin_port
=
htons
(
port
);
a
.
sin_addr
.
s_addr
=
inet_addr
(
addr
);
if
(
bind
(
s
,
(
struct
sockaddr
*
)
&
a
,
sizeof
(
a
)))
{
perror
(
"bind"
);
exit
(
1
);
}
if
(
listen
(
s
,
5
))
{
perror
(
"listen"
);
exit
(
1
);
}
return
s
;
}
static
int
socket_accept
(
int
s
)
{
struct
sockaddr_in
a
;
socklen_t
alen
;
alen
=
sizeof
(
a
);
return
accept
(
s
,
(
struct
sockaddr
*
)
&
a
,
&
alen
);
}
static
int
fullread
(
int
fd
,
void
*
_buf
,
int
count
)
{
char
*
buf
=
_buf
;
int
ret
=
0
;
int
l
;
while
(
count
)
{
l
=
read
(
fd
,
buf
,
count
);
if
(
l
<=
0
)
return
-
1
;
count
-=
l
;
buf
+=
l
;
ret
+=
l
;
}
return
ret
;
}
void
*
nr_hack
(
void
*
_
)
{
int
s
=
create_listen_socket
(
"0.0.0.0"
,
9001
);
int
t
;
over:
t
=
socket_accept
(
s
);
while
(
1
)
{
char
c
;
if
(
fullread
(
t
,
&
c
,
1
)
!=
1
)
{
close
(
t
);
goto
over
;
}
if
(
c
!=
'\n'
)
continue
;
printf
(
"setting go_nr to 1
\n
"
);
go_nr
=
1
;
}
return
0
;
}
void
rrc_endc_hack_init
(
void
)
{
new_thread
(
nr_hack
,
NULL
);
}
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