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
8b872ed6
Commit
8b872ed6
authored
Mar 17, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup
parent
3f94d8e0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
37 deletions
+2
-37
src/common/utils/string.cpp
src/common/utils/string.cpp
+2
-28
src/smf_app/smf_n1.cpp
src/smf_app/smf_n1.cpp
+0
-9
No files found.
src/common/utils/string.cpp
View file @
8b872ed6
...
@@ -174,32 +174,6 @@ bool util::string_to_dotted(const std::string& str, std::string& dotted) {
...
@@ -174,32 +174,6 @@ bool util::string_to_dotted(const std::string& str, std::string& dotted) {
};
};
void
util
::
string_to_dnn
(
const
std
::
string
&
str
,
bstring
bstr
)
{
void
util
::
string_to_dnn
(
const
std
::
string
&
str
,
bstring
bstr
)
{
uint8_t
tmp
[
str
.
length
()
+
1
];
bstr
->
slen
=
str
.
length
();
tmp
[
0
]
=
str
.
length
();
memcpy
((
void
*
)
bstr
->
data
,
(
void
*
)
str
.
c_str
(),
str
.
length
());
memcpy
((
void
*
)
&
tmp
[
1
],
(
void
*
)
str
.
c_str
(),
str
.
length
());
bstr
->
slen
=
str
.
length
()
+
1
;
memcpy
((
void
*
)
bstr
->
data
,
(
void
*
)
tmp
,
str
.
length
()
+
1
);
/*
printf("\n");
for (int i = 0; i < str.length() + 1; i++) {
printf(" %02x", tmp[i]);
}
uint8_t tmp[str.length() + 1];
tmp[0] = str.length();
memcpy((void*) &tmp[1], (void*) str.c_str(), tmp.length());
bstr->slen = tmp.length() + 1;
memcpy((void*) bstr->data, (void*) tmp, tmp.length()+1);
*/
/*
// 19 05 63 74 6e 65
uint8_t strB[6] = {0};
strB[0] = str.length();
memcpy(strB + 1, str.c_str(), str.length());
bstr->slen = str.length() + 20;
uint8_t dnn[19] = {0x06, 0x6d, 0x6e, 0x63, 0x30, 0x31, 0x31, 0x06, 0x6d, 0x63,
0x63, 0x34, 0x36, 0x30, 0x04, 0x67, 0x70, 0x72, 0x73};
memcpy((void*) (bstr->data), (void*) strB, str.length() + 1);
memcpy((void*) (bstr->data + str.length() + 1), (void*) dnn, 19);*/
}
}
src/smf_app/smf_n1.cpp
View file @
8b872ed6
...
@@ -266,15 +266,6 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
...
@@ -266,15 +266,6 @@ bool smf_n1::create_n1_pdu_session_establishment_accept(
bfromcstralloc
(
dotted
.
length
()
+
1
,
"
\0
"
);
bfromcstralloc
(
dotted
.
length
()
+
1
,
"
\0
"
);
util
::
string_to_dnn
(
dotted
,
sm_msg
->
pdu_session_establishment_accept
.
dnn
);
util
::
string_to_dnn
(
dotted
,
sm_msg
->
pdu_session_establishment_accept
.
dnn
);
/*
sm_msg->pdu_session_establishment_accept.dnn = bfromcstralloc(
sm_context_res.get_dnn().length() + 1 + 2 + sizeof(".mnc011.mcc110.gprs"),
"\0");
util::string_to_dnn(
sm_context_res.get_dnn(), sm_msg->pdu_session_establishment_accept.dnn);
Logger::smf_n1().debug("DNN %s", sm_context_res.get_dnn().c_str());
*/
Logger
::
smf_n1
().
info
(
"Encode PDU Session Establishment Accept"
);
Logger
::
smf_n1
().
info
(
"Encode PDU Session Establishment Accept"
);
// Encode NAS message
// Encode NAS message
bytes
=
nas_message_encode
(
bytes
=
nas_message_encode
(
...
...
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