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
zzha zzha
OpenXG-RAN
Commits
4badf669
Commit
4badf669
authored
Jul 18, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add mutexes to CreateF1Inst(), only save data if provided
parent
a2419226
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
openair2/F1AP/f1ap_common.c
openair2/F1AP/f1ap_common.c
+8
-4
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+1
-0
No files found.
openair2/F1AP/f1ap_common.c
View file @
4badf669
...
...
@@ -49,13 +49,17 @@ f1ap_cudu_inst_t *getCxt(instance_t instanceP)
return
f1_inst
[
instanceP
];
}
static
pthread_mutex_t
f1_inst_mtx
=
PTHREAD_MUTEX_INITIALIZER
;
void
createF1inst
(
instance_t
instanceP
,
f1ap_setup_req_t
*
req
,
f1ap_net_config_t
*
nc
)
{
DevAssert
(
instanceP
==
0
);
DevAssert
(
req
!=
NULL
);
AssertFatal
(
f1_inst
[
0
]
==
NULL
,
"
Double call to F1 DU init
\n
"
);
pthread_mutex_lock
(
&
f1_inst_mtx
);
AssertFatal
(
f1_inst
[
0
]
==
NULL
,
"
Attempted to initialize multiple F1 instances
\n
"
);
f1_inst
[
0
]
=
calloc
(
1
,
sizeof
(
f1ap_cudu_inst_t
));
AssertFatal
(
f1_inst
[
0
]
!=
NULL
,
"out of memory
\n
"
);
f1_inst
[
0
]
->
setupReq
=
*
req
;
f1_inst
[
0
]
->
net_config
=
*
nc
;
if
(
req
)
f1_inst
[
0
]
->
setupReq
=
*
req
;
if
(
nc
)
f1_inst
[
0
]
->
net_config
=
*
nc
;
pthread_mutex_unlock
(
&
f1_inst_mtx
);
}
openair2/F1AP/f1ap_cu_task.c
View file @
4badf669
...
...
@@ -52,6 +52,7 @@ static void cu_task_handle_sctp_association_ind(instance_t instance,
sctp_new_association_ind_t
*
sctp_new_association_ind
,
eth_params_t
*
IPaddrs
)
{
createF1inst
(
instance
,
NULL
,
NULL
);
// save the assoc id
f1ap_cudu_inst_t
*
f1ap_cu_data
=
getCxt
(
instance
);
f1ap_cu_data
->
assoc_id
=
sctp_new_association_ind
->
assoc_id
;
...
...
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