Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF-Simple
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
Operations
Operations
Metrics
Environments
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
CommunityXG
OpenXG-SMF-Simple
Commits
3fa4362d
Commit
3fa4362d
authored
Jan 29, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for static vector string
parent
7b682c40
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
24 deletions
+25
-24
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+9
-8
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+10
-9
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+6
-7
No files found.
src/smf_app/smf_app.cpp
View file @
3fa4362d
...
...
@@ -478,7 +478,7 @@ void smf_app::handle_itti_msg(
"Got successful response from AMF (response code %d), set session "
"status to %s"
,
m
.
response_code
,
pdu_session_status_e2str
[
static_cast
<
int
>
(
status
)]
.
c_str
());
pdu_session_status_e2str
.
at
(
static_cast
<
int
>
(
status
))
.
c_str
());
}
else
{
// TODO:
Logger
::
smf_app
().
debug
(
...
...
@@ -537,7 +537,8 @@ void smf_app::handle_itti_msg(
void
smf_app
::
handle_itti_msg
(
itti_n11_update_pdu_session_status
&
m
)
{
Logger
::
smf_app
().
info
(
"Set PDU Session Status to %s"
,
pdu_session_status_e2str
[
static_cast
<
int
>
(
m
.
pdu_session_status
)].
c_str
());
pdu_session_status_e2str
.
at
(
static_cast
<
int
>
(
m
.
pdu_session_status
))
.
c_str
());
update_pdu_session_status
(
m
.
scid
,
m
.
pdu_session_status
);
}
...
...
@@ -1419,7 +1420,7 @@ void smf_app::update_pdu_session_status(
sp
.
get
()
->
set_pdu_session_status
(
status
);
Logger
::
smf_app
().
info
(
"Set PDU Session Status to %s"
,
pdu_session_status_e2str
[
static_cast
<
int
>
(
status
)]
.
c_str
());
pdu_session_status_e2str
.
at
(
static_cast
<
int
>
(
status
))
.
c_str
());
}
//---------------------------------------------------------------------------------------------
...
...
@@ -1474,7 +1475,7 @@ void smf_app::update_pdu_session_upCnx_state(
sp
.
get
()
->
set_upCnx_state
(
state
);
Logger
::
smf_app
().
info
(
"Set PDU Session UpCnxState to %s"
,
upCnx_state_e2str
[
static_cast
<
int
>
(
state
)]
.
c_str
());
upCnx_state_e2str
.
at
(
static_cast
<
int
>
(
state
))
.
c_str
());
}
//---------------------------------------------------------------------------------------------
void
smf_app
::
timer_t3591_timeout
(
timer_id_t
timer_id
,
uint64_t
arg2_user
)
{
...
...
@@ -1527,7 +1528,7 @@ n2_sm_info_type_e smf_app::n2_sm_info_type_str2e(
const
std
::
string
&
n2_info_type
)
const
{
std
::
size_t
number_of_types
=
n2_sm_info_type_e2str
.
size
();
for
(
auto
i
=
0
;
i
<
number_of_types
;
++
i
)
{
if
(
n2_info_type
.
compare
(
n2_sm_info_type_e2str
[
i
]
)
==
0
)
{
if
(
n2_info_type
.
compare
(
n2_sm_info_type_e2str
.
at
(
i
)
)
==
0
)
{
return
static_cast
<
n2_sm_info_type_e
>
(
i
);
}
}
...
...
@@ -1645,7 +1646,7 @@ void smf_app::trigger_create_context_error_response(
oai
::
smf_server
::
model
::
ProblemDetails
problem_details
=
{};
oai
::
smf_server
::
model
::
RefToBinaryData
refToBinaryData
=
{};
Logger
::
smf_app
().
warn
(
"Create SmContextCreateError"
);
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
cause
]
);
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
cause
)
);
sm_context
.
setError
(
problem_details
);
refToBinaryData
.
setContentId
(
N1_SM_CONTENT_ID
);
sm_context
.
setN1SmMsg
(
refToBinaryData
);
...
...
@@ -1677,7 +1678,7 @@ void smf_app::trigger_update_context_error_response(
oai
::
smf_server
::
model
::
SmContextUpdateError
smContextUpdateError
=
{};
oai
::
smf_server
::
model
::
ProblemDetails
problem_details
=
{};
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
cause
]
);
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
cause
)
);
smContextUpdateError
.
setError
(
problem_details
);
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>
itti_msg
=
...
...
@@ -1707,7 +1708,7 @@ void smf_app::trigger_update_context_error_response(
oai
::
smf_server
::
model
::
SmContextUpdateError
smContextUpdateError
=
{};
oai
::
smf_server
::
model
::
ProblemDetails
problem_details
=
{};
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
cause
]
);
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
cause
)
);
smContextUpdateError
.
setError
(
problem_details
);
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>
itti_msg
=
...
...
src/smf_app/smf_context.cpp
View file @
3fa4362d
...
...
@@ -409,7 +409,7 @@ void smf_pdu_session::set_pdu_session_status(
// TODO: Should consider congestion handling
Logger
::
smf_app
().
info
(
"Set PDU Session Status to %s"
,
pdu_session_status_e2str
[
static_cast
<
int
>
(
status
)]
.
c_str
());
pdu_session_status_e2str
.
at
(
static_cast
<
int
>
(
status
))
.
c_str
());
std
::
unique_lock
lock
(
m_pdu_session_mutex
);
pdu_session_status
=
status
;
}
...
...
@@ -424,7 +424,7 @@ pdu_session_status_e smf_pdu_session::get_pdu_session_status() const {
void
smf_pdu_session
::
set_upCnx_state
(
const
upCnx_state_e
&
state
)
{
Logger
::
smf_app
().
info
(
"Set upCnxState to %s"
,
upCnx_state_e2str
[
static_cast
<
int
>
(
state
)]
.
c_str
());
upCnx_state_e2str
.
at
(
static_cast
<
int
>
(
state
))
.
c_str
());
std
::
unique_lock
lock
(
m_pdu_session_mutex
);
upCnx_state
=
state
;
}
...
...
@@ -1885,7 +1885,7 @@ bool smf_context::handle_pdu_session_release_complete(
Logger
::
smf_app
().
debug
(
"Signal the SM Context Status Change"
);
event_sub
.
sm_context_status
(
scid
,
static_cast
<
uint
32
_t
>
(
sm_context_status_e
::
SM_CONTEXT_STATUS_RELEASED
),
static_cast
<
uint
8
_t
>
(
sm_context_status_e
::
SM_CONTEXT_STATUS_RELEASED
),
sm_context_request
.
get
()
->
http_version
);
// Trigger PDU Session Release event notification
...
...
@@ -2512,8 +2512,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
Logger
::
smf_app
().
info
(
"PDU Update SM Context Request procedure failed (session procedure "
"type %s)"
,
session_management_procedures_type_e2str
[
static_cast
<
int
>
(
procedure_type
)]
session_management_procedures_type_e2str
.
at
(
static_cast
<
int
>
(
procedure_type
))
.
c_str
());
remove_procedure
(
proc
);
...
...
@@ -2917,7 +2917,8 @@ void smf_context::handle_sm_context_status_change(
std
::
make_shared
<
itti_n11_notify_sm_context_status
>
(
TASK_SMF_APP
,
TASK_SMF_N11
);
itti_msg
->
scid
=
scid
;
itti_msg
->
sm_context_status
=
sm_context_status_e2str
[
status
];
itti_msg
->
sm_context_status
=
sm_context_status_e2str
.
at
(
static_cast
<
int
>
(
status
));
itti_msg
->
amf_status_uri
=
scf
.
get
()
->
amf_status_uri
;
itti_msg
->
http_version
=
http_version
;
...
...
src/smf_app/smf_procedure.cpp
View file @
3fa4362d
...
...
@@ -520,8 +520,8 @@ int session_update_sm_context_procedure::run(
Logger
::
smf_app
().
debug
(
"Session procedure type: %s"
,
session_management_procedures_type_e2str
[
static_cast
<
int
>
(
session_procedure_type
)]
session_management_procedures_type_e2str
.
at
(
static_cast
<
int
>
(
session_procedure_type
))
.
c_str
());
switch
(
session_procedure_type
)
{
...
...
@@ -893,8 +893,8 @@ void session_update_sm_context_procedure::handle_itti_msg(
Logger
::
smf_app
().
debug
(
"Session procedure type: %s"
,
session_management_procedures_type_e2str
[
static_cast
<
int
>
(
session_procedure_type
)]
session_management_procedures_type_e2str
.
at
(
static_cast
<
int
>
(
session_procedure_type
))
.
c_str
());
switch
(
session_procedure_type
)
{
...
...
@@ -1310,9 +1310,8 @@ void session_release_sm_context_procedure::handle_itti_msg(
n11_triggered_pending
->
pid
,
N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE
);
}
else
{
oai
::
smf_server
::
model
::
ProblemDetails
problem_details
=
{};
problem_details
.
setCause
(
pdu_session_application_error_e2str
[
PDU_SESSION_APPLICATION_ERROR_NETWORK_FAILURE
]);
problem_details
.
setCause
(
pdu_session_application_error_e2str
.
at
(
PDU_SESSION_APPLICATION_ERROR_NETWORK_FAILURE
));
// trigger to send reply to AMF
/*
smf_app_inst->trigger_http_response(
...
...
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