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
e0d10859
Commit
e0d10859
authored
Mar 15, 2023
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
8b35840c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
src/smf_app/smf_sbi.cpp
src/smf_app/smf_sbi.cpp
+10
-5
No files found.
src/smf_app/smf_sbi.cpp
View file @
e0d10859
...
@@ -164,7 +164,7 @@ smf_sbi::smf_sbi() {
...
@@ -164,7 +164,7 @@ smf_sbi::smf_sbi() {
handles
=
{};
handles
=
{};
headers
=
nullptr
;
headers
=
nullptr
;
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"
c
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"
C
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
if
((
code
<
0
)
or
(
curl_multi
==
nullptr
)
or
(
headers
==
nullptr
))
{
if
((
code
<
0
)
or
(
curl_multi
==
nullptr
)
or
(
headers
==
nullptr
))
{
...
@@ -1094,10 +1094,10 @@ bool smf_sbi::curl_create_handle(
...
@@ -1094,10 +1094,10 @@ bool smf_sbi::curl_create_handle(
headers
=
nullptr
;
headers
=
nullptr
;
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"
c
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"
C
harsets: utf-8"
);
if
(
is_multipart
)
{
if
(
is_multipart
)
{
std
::
string
content_type
=
"
c
ontent-type: multipart/related; boundary="
+
std
::
string
content_type
=
"
C
ontent-type: multipart/related; boundary="
+
std
::
string
(
CURL_MIME_BOUNDARY
);
std
::
string
(
CURL_MIME_BOUNDARY
);
headers
=
curl_slist_append
(
headers
,
content_type
.
c_str
());
headers
=
curl_slist_append
(
headers
,
content_type
.
c_str
());
}
else
{
}
else
{
...
@@ -1161,7 +1161,7 @@ bool smf_sbi::curl_create_handle(
...
@@ -1161,7 +1161,7 @@ bool smf_sbi::curl_create_handle(
headers
=
nullptr
;
headers
=
nullptr
;
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"
c
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"
C
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
...
@@ -1225,7 +1225,7 @@ bool smf_sbi::curl_create_handle(
...
@@ -1225,7 +1225,7 @@ bool smf_sbi::curl_create_handle(
headers
=
nullptr
;
headers
=
nullptr
;
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"
c
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"
C
harsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
...
@@ -1285,6 +1285,11 @@ bool smf_sbi::curl_create_handle(
...
@@ -1285,6 +1285,11 @@ bool smf_sbi::curl_create_handle(
// Create handle for a curl request
// Create handle for a curl request
CURL
*
curl
=
curl_easy_init
();
CURL
*
curl
=
curl_easy_init
();
headers
=
nullptr
;
headers
=
curl_slist_append
(
headers
,
"Accept: application/json"
);
headers
=
curl_slist_append
(
headers
,
"Charsets: utf-8"
);
headers
=
curl_slist_append
(
headers
,
"Content-Type: application/json"
);
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
if
((
curl
==
nullptr
)
or
(
headers
==
nullptr
))
{
Logger
::
smf_sbi
().
error
(
"Cannot initialize a new Curl Handle"
);
Logger
::
smf_sbi
().
error
(
"Cannot initialize a new Curl Handle"
);
return
false
;
return
false
;
...
...
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