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
Michael Black
OpenXG-RAN
Commits
5d06dcc3
Commit
5d06dcc3
authored
Sep 13, 2018
by
Bing-Kai Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Segmentation fault when f1ap_message_decoded_callback have not define instance_t for arguments
parent
d4b13691
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
11 deletions
+14
-11
openair2/F1AP/f1ap_common.h
openair2/F1AP/f1ap_common.h
+1
-0
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+4
-3
openair2/F1AP/f1ap_cu_task.h
openair2/F1AP/f1ap_cu_task.h
+1
-1
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_task.c
+4
-3
openair2/F1AP/f1ap_du_task.h
openair2/F1AP/f1ap_du_task.h
+1
-1
openair2/F1AP/f1ap_handlers.c
openair2/F1AP/f1ap_handlers.c
+2
-2
openair2/F1AP/f1ap_handlers.h
openair2/F1AP/f1ap_handlers.h
+1
-1
No files found.
openair2/F1AP/f1ap_common.h
View file @
5d06dcc3
...
...
@@ -419,6 +419,7 @@ inline void ASN_DEBUG(const char *fmt, ...);
/** \brief Function callback prototype.
**/
typedef
int
(
*
f1ap_message_decoded_callback
)(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
message_p
...
...
openair2/F1AP/f1ap_cu_task.c
View file @
5d06dcc3
...
...
@@ -65,12 +65,12 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data_from_du
->
sctp_out_streams
=
sctp_new_association_resp
->
out_streams
;
}
void
cu_task_handle_sctp_data_ind
(
sctp_data_ind_t
*
sctp_data_ind
)
{
void
cu_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
)
{
int
result
;
DevAssert
(
sctp_data_ind
!=
NULL
);
f1ap_handle_message
(
sctp_data_ind
->
assoc_id
,
sctp_data_ind
->
stream
,
f1ap_handle_message
(
instance
,
sctp_data_ind
->
assoc_id
,
sctp_data_ind
->
stream
,
sctp_data_ind
->
buffer
,
sctp_data_ind
->
buffer_length
);
result
=
itti_free
(
TASK_UNKNOWN
,
sctp_data_ind
->
buffer
);
...
...
@@ -132,7 +132,8 @@ void *F1AP_CU_task(void *arg) {
case
SCTP_DATA_IND
:
LOG_I
(
CU_F1AP
,
"SCTP_DATA_IND
\n
"
);
cu_task_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
cu_task_handle_sctp_data_ind
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
break
;
case
F1AP_SETUP_RESP
:
// from rrc
...
...
openair2/F1AP/f1ap_cu_task.h
View file @
5d06dcc3
...
...
@@ -24,7 +24,7 @@
void
cu_task_handle_sctp_association_ind
(
instance_t
instance
,
sctp_new_association_ind_t
*
sctp_new_association_ind
);
void
cu_task_handle_sctp_association_resp
(
instance_t
instance
,
sctp_new_association_resp_t
*
sctp_new_association_resp
);
void
cu_task_handle_sctp_data_ind
(
sctp_data_ind_t
*
sctp_data_ind
);
void
cu_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
);
void
cu_task_send_sctp_init_req
(
instance_t
enb_id
);
void
*
F1AP_CU_task
(
void
*
arg
);
...
...
openair2/F1AP/f1ap_du_task.c
View file @
5d06dcc3
...
...
@@ -97,13 +97,13 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
DU_send_F1_SETUP_REQUEST
(
instance
);
}
void
du_task_handle_sctp_data_ind
(
sctp_data_ind_t
*
sctp_data_ind
)
void
du_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
)
{
int
result
;
DevAssert
(
sctp_data_ind
!=
NULL
);
f1ap_handle_message
(
sctp_data_ind
->
assoc_id
,
sctp_data_ind
->
stream
,
f1ap_handle_message
(
instance
,
sctp_data_ind
->
assoc_id
,
sctp_data_ind
->
stream
,
sctp_data_ind
->
buffer
,
sctp_data_ind
->
buffer_length
);
result
=
itti_free
(
TASK_UNKNOWN
,
sctp_data_ind
->
buffer
);
...
...
@@ -154,7 +154,8 @@ void *F1AP_DU_task(void *arg) {
case
SCTP_DATA_IND
:
// ex: any F1 incoming message for DU ends here
LOG_I
(
DU_F1AP
,
"SCTP_DATA_IND
\n
"
);
du_task_handle_sctp_data_ind
(
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
du_task_handle_sctp_data_ind
(
ITTI_MESSAGE_GET_INSTANCE
(
received_msg
),
&
received_msg
->
ittiMsg
.
sctp_data_ind
);
break
;
case
TERMINATE_MESSAGE
:
...
...
openair2/F1AP/f1ap_du_task.h
View file @
5d06dcc3
...
...
@@ -24,7 +24,7 @@
void
du_task_send_sctp_association_req
(
instance_t
instance
,
f1ap_setup_req_t
*
f1ap_setup_req
);
void
du_task_handle_sctp_association_resp
(
instance_t
instance
,
sctp_new_association_resp_t
*
sctp_new_association_resp
);
void
du_task_handle_sctp_data_ind
(
sctp_data_ind_t
*
sctp_data_ind
);
void
du_task_handle_sctp_data_ind
(
instance_t
instance
,
sctp_data_ind_t
*
sctp_data_ind
);
void
*
F1AP_DU_task
(
void
*
arg
);
#endif
/* DU_F1AP_TASK_H_ */
openair2/F1AP/f1ap_handlers.c
View file @
5d06dcc3
...
...
@@ -78,7 +78,7 @@ static const char *f1ap_direction_String[] = {
return
(
f1ap_direction_String
[
f1ap_dir
]);
}
int
f1ap_handle_message
(
uint32_t
assoc_id
,
int32_t
stream
,
int
f1ap_handle_message
(
instance_t
instance
,
uint32_t
assoc_id
,
int32_t
stream
,
const
uint8_t
*
const
data
,
const
uint32_t
data_length
)
{
F1AP_F1AP_PDU_t
pdu
;
...
...
@@ -116,7 +116,7 @@ int f1ap_handle_message(uint32_t assoc_id, int32_t stream,
/* Calling the right handler */
ret
=
(
*
f1ap_messages_callback
[
pdu
.
choice
.
initiatingMessage
->
procedureCode
][
pdu
.
present
-
1
])
(
assoc_id
,
stream
,
&
pdu
);
(
instance
,
assoc_id
,
stream
,
&
pdu
);
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_F1AP_F1AP_PDU
,
&
pdu
);
return
ret
;
}
\ No newline at end of file
openair2/F1AP/f1ap_handlers.h
View file @
5d06dcc3
...
...
@@ -33,7 +33,7 @@
#ifndef F1AP_HANDLERS_H_
#define F1AP_HANDLERS_H_
int
f1ap_handle_message
(
uint32_t
assoc_id
,
int32_t
stream
,
int
f1ap_handle_message
(
instance_t
instance
,
uint32_t
assoc_id
,
int32_t
stream
,
const
uint8_t
*
const
data
,
const
uint32_t
data_length
);
#endif
/* F1AP_HANDLERS_H_ */
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