Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
a36c6c90
Commit
a36c6c90
authored
Aug 05, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'curl_timeout' into 'develop'
Update curl timeout See merge request oai/cn5g/oai-cn5g-amf!44
parents
9b4a6072
6dc13966
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+4
-4
src/common/amf.hpp
src/common/amf.hpp
+1
-5
No files found.
src/amf-app/amf_n11.cpp
View file @
a36c6c90
...
@@ -559,7 +559,7 @@ void amf_n11::curl_http_client(
...
@@ -559,7 +559,7 @@ void amf_n11::curl_http_client(
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
remoteUri
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
remoteUri
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
SMF_
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
// Response information
// Response information
...
@@ -783,7 +783,7 @@ bool amf_n11::discover_smf(
...
@@ -783,7 +783,7 @@ bool amf_n11::discover_smf(
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
NRF_
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
// Response information
// Response information
...
@@ -894,7 +894,7 @@ void amf_n11::register_nf_instance(
...
@@ -894,7 +894,7 @@ void amf_n11::register_nf_instance(
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPHEADER
,
headers
);
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
NRF_
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_CUSTOMREQUEST
,
"PUT"
);
curl_easy_setopt
(
curl
,
CURLOPT_CUSTOMREQUEST
,
"PUT"
);
...
@@ -969,7 +969,7 @@ bool amf_n11::send_ue_authentication_request(
...
@@ -969,7 +969,7 @@ bool amf_n11::send_ue_authentication_request(
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_URL
,
url
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_HTTPGET
,
1
);
curl_easy_setopt
(
curl
,
CURLOPT_CUSTOMREQUEST
,
"POST"
);
curl_easy_setopt
(
curl
,
CURLOPT_CUSTOMREQUEST
,
"POST"
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
AUSF_
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_TIMEOUT_MS
,
CURL_TIMEOUT_MS
);
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
curl_easy_setopt
(
curl
,
CURLOPT_INTERFACE
,
amf_cfg
.
n11
.
if_name
.
c_str
());
if
(
http_version
==
2
)
{
if
(
http_version
==
2
)
{
...
...
src/common/amf.hpp
View file @
a36c6c90
...
@@ -96,12 +96,8 @@ enum class http_response_codes_e {
...
@@ -96,12 +96,8 @@ enum class http_response_codes_e {
};
};
// for CURL
// for CURL
#define SMF_CURL_TIMEOUT_MS 100L
#define SMF_NUMBER_RETRIES 3
constexpr
auto
CURL_MIME_BOUNDARY
=
"----Boundary"
;
constexpr
auto
CURL_MIME_BOUNDARY
=
"----Boundary"
;
#define NRF_CURL_TIMEOUT_MS 100L
#define CURL_TIMEOUT_MS 1000L
#define AUSF_CURL_TIMEOUT_MS 100L
#define CURL_TIMEOUT_MS 100L
#define BUFFER_SIZE_2048 2048
#define BUFFER_SIZE_2048 2048
#define BUFFER_SIZE_1024 1024
#define BUFFER_SIZE_1024 1024
...
...
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