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
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
OpenXG
OpenXG-SMF
Commits
4161fe65
Commit
4161fe65
authored
Nov 29, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
9891f5a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
src/api-server/impl/IndividualSMContextApiImpl.cpp
src/api-server/impl/IndividualSMContextApiImpl.cpp
+2
-2
src/api-server/impl/SMContextsCollectionApiImpl.cpp
src/api-server/impl/SMContextsCollectionApiImpl.cpp
+2
-2
src/api-server/smf-http2-server.cpp
src/api-server/smf-http2-server.cpp
+3
-3
src/smf_app/smf_sbi.cpp
src/smf_app/smf_sbi.cpp
+1
-1
No files found.
src/api-server/impl/IndividualSMContextApiImpl.cpp
View file @
4161fe65
...
...
@@ -86,7 +86,7 @@ void IndividualSMContextApiImpl::release_sm_context(
boost
::
future_status
status
;
// wait for timeout or ready
status
=
f
.
wait_for
(
boost
::
chrono
::
milliseconds
(
FUTURE_STATUS_TIMEOUT_MS
));
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
status
==
boost
::
future_status
::
ready
)
{
assert
(
f
.
is_ready
());
assert
(
f
.
has_value
());
...
...
@@ -163,7 +163,7 @@ void IndividualSMContextApiImpl::update_sm_context(
bool
n1_sm_msg_is_set
=
false
;
bool
n2_sm_info_is_set
=
false
;
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
sm_context_response
.
find
(
"http_code"
)
!=
sm_context_response
.
end
())
{
http_code
=
sm_context_response
[
"http_code"
].
get
<
int
>
();
}
...
...
src/api-server/impl/SMContextsCollectionApiImpl.cpp
View file @
4161fe65
...
...
@@ -118,7 +118,7 @@ void SMContextsCollectionApiImpl::post_sm_contexts(
std
::
string
body
=
{};
bool
n1_sm_msg_is_set
=
false
;
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
sm_context_response
.
find
(
"http_code"
)
!=
sm_context_response
.
end
())
{
http_code
=
sm_context_response
[
"http_code"
].
get
<
int
>
();
}
...
...
@@ -136,7 +136,7 @@ void SMContextsCollectionApiImpl::post_sm_contexts(
n1_sm_msg_is_set
=
true
;
}
if
(
http_code
==
201
)
{
if
(
http_code
==
http_status_code_e
::
HTTP_STATUS_CODE_201_CREATED
)
{
if
(
sm_context_response
.
find
(
"smf_context_uri"
)
!=
sm_context_response
.
end
())
{
response
.
headers
().
add
<
Pistache
::
Http
::
Header
::
Location
>
(
...
...
src/api-server/smf-http2-server.cpp
View file @
4161fe65
...
...
@@ -398,7 +398,7 @@ void smf_http2_server::create_sm_contexts_handler(
nlohmann
::
json
json_data
=
{};
std
::
string
json_format
=
{};
bool
n1_sm_msg_is_set
=
false
;
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
sm_context_response
.
find
(
"http_code"
)
!=
sm_context_response
.
end
())
{
http_code
=
sm_context_response
[
"http_code"
].
get
<
int
>
();
...
...
@@ -483,7 +483,7 @@ void smf_http2_server::update_sm_context_handler(
std
::
string
json_format
=
{};
bool
n1_sm_msg_is_set
=
false
;
bool
n2_sm_info_is_set
=
false
;
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
sm_context_response
.
find
(
"http_code"
)
!=
sm_context_response
.
end
())
{
http_code
=
sm_context_response
[
"http_code"
].
get
<
int
>
();
...
...
@@ -585,7 +585,7 @@ void smf_http2_server::release_sm_context_handler(
nlohmann
::
json
sm_context_response
=
f
.
get
();
Logger
::
smf_api_server
().
debug
(
"Got result for promise ID %d"
,
promise_id
);
int
http_code
=
408
;
// TODO: Request_Timeout
int
http_code
=
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
if
(
sm_context_response
.
find
(
"http_code"
)
!=
sm_context_response
.
end
())
{
http_code
=
sm_context_response
[
"http_code"
].
get
<
int
>
();
}
...
...
src/smf_app/smf_sbi.cpp
View file @
4161fe65
...
...
@@ -1392,7 +1392,7 @@ uint32_t smf_sbi::get_available_response(boost::shared_future<uint32_t>& f) {
uint32_t
response_code
=
f
.
get
();
return
response_code
;
}
else
{
return
408
;
// timeout, TODO: remove hardcoded value
return
http_status_code_e
::
HTTP_STATUS_CODE_408_REQUEST_TIMEOUT
;
}
}
...
...
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