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
7a595847
Commit
7a595847
authored
Nov 16, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix SD value conversion
parent
de2e7a17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
src/common/smf.h
src/common/smf.h
+15
-6
src/smf_app/smf_pfcp_association.cpp
src/smf_app/smf_pfcp_association.cpp
+1
-0
src/smf_app/smf_sbi.cpp
src/smf_app/smf_sbi.cpp
+1
-1
No files found.
src/common/smf.h
View file @
7a595847
...
...
@@ -26,6 +26,7 @@
#include "3gpp_29.571.h"
#include "3gpp_24.501.h"
#include <nlohmann/json.hpp>
#include <boost/algorithm/string.hpp>
#include <map>
#include <vector>
...
...
@@ -85,13 +86,21 @@ typedef struct s_nssai // section 28.4, TS23.003
uint32_t
sd
;
s_nssai
(
const
uint8_t
&
m_sst
,
const
uint32_t
m_sd
)
:
sst
(
m_sst
),
sd
(
m_sd
)
{}
s_nssai
(
const
uint8_t
&
m_sst
,
const
std
::
string
m_sd
)
:
sst
(
m_sst
)
{
sd
=
0xFFFFFF
;
sd
=
SD_NO_VALUE
;
if
(
m_sd
.
empty
())
return
;
uint8_t
base
=
10
;
try
{
sd
=
std
::
stoul
(
m_sd
,
nullptr
,
10
);
if
(
m_sd
.
size
()
>
2
)
{
if
(
boost
::
iequals
(
m_sd
.
substr
(
0
,
2
),
"0x"
))
{
base
=
16
;
}
}
sd
=
std
::
stoul
(
m_sd
,
nullptr
,
base
);
}
catch
(
const
std
::
exception
&
e
)
{
Logger
::
smf_app
().
warn
(
"Error when converting from string to int for
snssai.
SD, error: %s"
,
Logger
::
smf_app
().
error
(
"Error when converting from string to int for
S-NSSAI
SD, error: %s"
,
e
.
what
());
sd
=
SD_NO_VALUE
;
}
}
s_nssai
()
:
sst
(),
sd
()
{}
...
...
@@ -212,8 +221,8 @@ enum class sm_context_status_e {
SM_CONTEXT_STATUS_RELEASED
=
1
};
static
const
std
::
vector
<
std
::
string
>
sm_context_status_e2str
=
{
"ACTIVE"
,
"RELEASED"
};
static
const
std
::
vector
<
std
::
string
>
sm_context_status_e2str
=
{
"ACTIVE"
,
"RELEASED"
};
typedef
struct
qos_profile_gbr_s
{
gfbr_t
gfbr
;
// Guaranteed Flow Bit Rate
...
...
src/smf_app/smf_pfcp_association.cpp
View file @
7a595847
...
...
@@ -1254,6 +1254,7 @@ std::shared_ptr<upf_graph> upf_graph::select_upf_node(
}
return
upf_graph_ptr
;
}
return
upf_graph_ptr
;
}
//------------------------------------------------------------------------------
...
...
src/smf_app/smf_sbi.cpp
View file @
7a595847
...
...
@@ -927,7 +927,7 @@ bool smf_sbi::get_sm_data(
}
if
(
jsonData
[
"singleNssai"
].
find
(
"sd"
)
!=
jsonData
[
"singleNssai"
].
end
())
{
std
::
string
sd_str
=
jsonData
[
"singleNssai"
][
"sd"
];
uint32_t
sd
=
0xFFFFFF
;
uint32_t
sd
=
SD_NO_VALUE
;
xgpp_conv
::
sd_string_to_int
(
jsonData
[
"singleNssai"
][
"sd"
].
get
<
std
::
string
>
(),
sd
);
if
(
sd
!=
snssai
.
sd
)
{
...
...
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