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
0c306b02
Commit
0c306b02
authored
Sep 21, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into cu_du_testing
parents
6cb56ba6
ee09cb41
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
145 additions
and
128 deletions
+145
-128
build/scripts/build_helper
build/scripts/build_helper
+10
-8
docker/Dockerfile.amf.rhel8
docker/Dockerfile.amf.rhel8
+1
-0
src/nas/ies/5GMMCapability.cpp
src/nas/ies/5GMMCapability.cpp
+37
-32
src/nas/ies/5GMMCapability.hpp
src/nas/ies/5GMMCapability.hpp
+11
-13
src/nas/ies/UENetworkCapability.cpp
src/nas/ies/UENetworkCapability.cpp
+33
-39
src/nas/ies/UENetworkCapability.hpp
src/nas/ies/UENetworkCapability.hpp
+4
-8
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
+3
-0
src/ngap/ngapMsgs/InitialUEMessage.cpp
src/ngap/ngapMsgs/InitialUEMessage.cpp
+1
-1
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
+1
-0
src/ngap/ngapMsgs/UERadioCapabilityInfoIndication.cpp
src/ngap/ngapMsgs/UERadioCapabilityInfoIndication.cpp
+1
-0
src/ngap/ngapMsgs/UplinkNASTransport.cpp
src/ngap/ngapMsgs/UplinkNASTransport.cpp
+1
-0
src/ngap/ngapMsgs/UplinkNonUEAssociatedNRPPaTransport.cpp
src/ngap/ngapMsgs/UplinkNonUEAssociatedNRPPaTransport.cpp
+2
-0
src/ngap/ngapMsgs/UplinkUEAssociatedNRPPaTransport.cpp
src/ngap/ngapMsgs/UplinkUEAssociatedNRPPaTransport.cpp
+2
-0
src/utils/fqdn.cpp
src/utils/fqdn.cpp
+38
-27
No files found.
build/scripts/build_helper
View file @
0c306b02
...
...
@@ -131,13 +131,12 @@ check_supported_distribution() {
"ubuntu20.04") return 0 ;;
"ubuntu22.04") return 0 ;;
"rhel8") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
"rhel8.5") return 0 ;;
"rhel8.6") return 0 ;;
"rhel8.7") return 0 ;;
#"centos7") return 0 ;;
"rhel8.2") return 0 ;;
"rhel8.3") return 0 ;;
"rhel8.4") return 0 ;;
"rhel8.5") return 0 ;;
"rhel8.6") return 0 ;;
"rhel8.7") return 0 ;;
esac
return 1
}
...
...
@@ -297,7 +296,10 @@ check_enable_epel_repos() {
echo "EPEL repos already present. Good."
else
echo "EPEL repos not present. Installing them."
$SUDO $INSTALLER install $OPTION https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget --tries=4 --retry-connrefused --wait=8 \
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$SUDO $INSTALLER install $OPTION epel-release-latest-7.noarch.rpm
rm -f epel-release-latest-7.noarch.rpm
fi
fi
}
...
...
docker/Dockerfile.amf.rhel8
View file @
0c306b02
...
...
@@ -51,6 +51,7 @@ RUN rm -f /etc/rhsm-host && \
boost-devel \
openssl-devel \
openssl \
wget \
libasan && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...
...
src/nas/ies/5GMMCapability.cpp
View file @
0c306b02
...
...
@@ -19,15 +19,9 @@
* contact@openairinterface.org
*/
/*! \file 5GMMCapability.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "5GMMCapability.hpp"
#include "common_defs.h"
#include "logger.hpp"
using
namespace
nas
;
...
...
@@ -35,8 +29,8 @@ using namespace nas;
//------------------------------------------------------------------------------
_5GMMCapability
::
_5GMMCapability
(
const
uint8_t
iei
,
uint8_t
value
)
{
m_iei
=
iei
;
m_value
=
value
;
length
=
3
;
octet3_
=
value
;
length
=
k5gmmCapabilityMinimumLength
;
}
//------------------------------------------------------------------------------
...
...
@@ -48,51 +42,62 @@ _5GMMCapability::~_5GMMCapability() {}
//------------------------------------------------------------------------------
void
_5GMMCapability
::
setValue
(
uint8_t
iei
,
uint8_t
value
)
{
m_iei
=
iei
;
m_value
=
value
;
octet3_
=
value
;
}
//------------------------------------------------------------------------------
uint8_t
_5GMMCapability
::
getValue
()
{
return
m_value
;
return
octet3_
;
}
//------------------------------------------------------------------------------
int
_5GMMCapability
::
encode2buffer
(
uint8_t
*
buf
,
int
len
)
{
Logger
::
nas_mm
().
debug
(
"
encoding _5GMMCapability iei
(0x%x)"
,
m_iei
);
Logger
::
nas_mm
().
debug
(
"
Encoding _5GMMCapability IEI
(0x%x)"
,
m_iei
);
if
(
len
<
length
)
{
Logger
::
nas_mm
().
error
(
"
l
en is less than %d"
,
length
);
Logger
::
nas_mm
().
error
(
"
L
en is less than %d"
,
length
);
return
0
;
}
int
encoded_size
=
0
;
if
(
m_iei
)
{
*
(
buf
+
encoded_size
)
=
m_iei
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
length
-
2
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
m_value
;
encoded_size
++
;
ENCODE_U8
(
buf
+
encoded_size
,
m_iei
,
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
length
-
2
,
encoded_size
);
}
else
{
*
(
buf
+
encoded_size
)
=
length
-
1
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
m_value
;
encoded_size
++
;
ENCODE_U8
(
buf
+
encoded_size
,
length
-
1
,
encoded_size
);
}
Logger
::
nas_mm
().
debug
(
"encoded _5GMMCapability len(%d)"
,
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
octet3_
,
encoded_size
);
// TODO: Encode spare for the rest
uint8_t
spare
=
0
;
for
(
int
i
=
0
;
i
<
(
length
-
encoded_size
);
i
++
)
{
ENCODE_U8
(
buf
+
encoded_size
,
spare
,
encoded_size
);
}
Logger
::
nas_mm
().
debug
(
"Encoded _5GMMCapability len (%d)"
,
encoded_size
);
return
encoded_size
;
}
//------------------------------------------------------------------------------
int
_5GMMCapability
::
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
Logger
::
nas_mm
().
debug
(
"decoding _5GMMCapability iei(0x%x)"
,
*
buf
);
int
decoded_size
=
0
;
uint8_t
decoded_size
=
0
;
Logger
::
nas_mm
().
debug
(
"Decoding _5GMMCapability IEI (0x%x)"
,
*
buf
);
if
(
is_option
)
{
decoded_size
++
;
}
length
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
m_value
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"decoded _5GMMCapability value(0x%x)"
,
m_value
);
Logger
::
nas_mm
().
debug
(
"decoded _5GMMCapability len(%d)"
,
decoded_size
);
uint8_t
ie_len
=
0
;
DECODE_U8
(
buf
+
decoded_size
,
ie_len
,
decoded_size
);
length
=
ie_len
+
decoded_size
;
DECODE_U8
(
buf
+
decoded_size
,
octet3_
,
decoded_size
);
// TODO: decode the rest as spare for now
uint8_t
spare
=
0
;
for
(
int
i
=
0
;
i
<
(
ie_len
-
1
);
i
++
)
{
ENCODE_U8
(
buf
+
decoded_size
,
spare
,
decoded_size
);
}
Logger
::
nas_mm
().
debug
(
"Decoded _5GMMCapability value(0x%x)"
,
octet3_
);
Logger
::
nas_mm
().
debug
(
"Decoded _5GMMCapability len(%d)"
,
decoded_size
);
return
decoded_size
;
}
src/nas/ies/5GMMCapability.hpp
View file @
0c306b02
...
...
@@ -19,18 +19,14 @@
* contact@openairinterface.org
*/
/*! \file 5GMMCapability.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef __5GMMCapability_H_
#define __5GMMCapability_H_
#ifndef _5GMM_CAPABILITY_H_
#define _5GMM_CAPABILITY_H_
#include <stdint.h>
constexpr
uint8_t
k5gmmCapabilityMinimumLength
=
3
;
constexpr
uint8_t
k5gmmCapabilityMaximumLength
=
15
;
namespace
nas
{
class
_5GMMCapability
{
...
...
@@ -38,15 +34,17 @@ class _5GMMCapability {
_5GMMCapability
();
_5GMMCapability
(
const
uint8_t
iei
,
uint8_t
value
);
~
_5GMMCapability
();
void
setValue
(
uint8_t
iei
,
uint8_t
value
);
int
encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
uint8_t
getValue
();
int
encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
=
true
);
private:
uint8_t
m_iei
;
uint8_t
m_value
;
in
t
length
;
uint8_t
octet3_
;
// minimum length of 3 octets
uint8_
t
length
;
};
}
// namespace nas
...
...
src/nas/ies/UENetworkCapability.cpp
View file @
0c306b02
...
...
@@ -19,20 +19,12 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "UENetworkCapability.hpp"
#include <iostream>
#include "common_defs.h"
#include "logger.hpp"
using
namespace
nas
;
using
namespace
std
;
//------------------------------------------------------------------------------
UENetworkCapability
::
UENetworkCapability
(
uint8_t
iei
)
{
...
...
@@ -59,7 +51,7 @@ UENetworkCapability::UENetworkCapability(
_iei
=
iei
;
_5g_EEASel
=
_5gg_EEASel
;
_5g_EIASel
=
_5gg_EIASel
;
length
=
4
;
// Minimum length
length
=
kUeNetworkCapabilityMinimumLength
;
Logger
::
nas_mm
().
debug
(
"decoded UENetworkCapability EA(0x%d),IA(0x%d)"
,
_5g_EEASel
,
_5g_EIASel
);
}
...
...
@@ -93,22 +85,21 @@ int UENetworkCapability::encode2buffer(uint8_t* buf, int len) {
}
int
encoded_size
=
0
;
if
(
_iei
)
{
*
(
buf
+
encoded_size
)
=
_iei
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
length
-
2
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EEASel
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EIASel
;
encoded_size
++
;
ENCODE_U8
(
buf
+
encoded_size
,
_iei
,
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
length
-
2
,
encoded_size
);
}
else
{
*
(
buf
+
encoded_size
)
=
length
-
1
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EEASel
;
encoded_size
++
;
*
(
buf
+
encoded_size
)
=
_5g_EIASel
;
encoded_size
++
;
ENCODE_U8
(
buf
+
encoded_size
,
length
-
1
,
encoded_size
);
}
ENCODE_U8
(
buf
+
encoded_size
,
_5g_EEASel
,
encoded_size
);
ENCODE_U8
(
buf
+
encoded_size
,
_5g_EIASel
,
encoded_size
);
// TODO: Encode the rest as spare for now
uint8_t
spare
=
0
;
for
(
int
i
=
0
;
i
<
(
length
-
encoded_size
);
i
++
)
{
ENCODE_U8
(
buf
+
encoded_size
,
spare
,
encoded_size
);
}
Logger
::
nas_mm
().
debug
(
"Encoded UENetworkCapability len (%d)"
,
encoded_size
);
return
encoded_size
;
}
...
...
@@ -118,25 +109,28 @@ int UENetworkCapability::decodefrombuffer(
uint8_t
*
buf
,
int
len
,
bool
is_option
)
{
Logger
::
nas_mm
().
debug
(
"Decoding UENetworkCapability IEI"
);
int
decoded_size
=
0
;
int
ie_length
=
0
;
if
(
is_option
)
{
_iei
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
DECODE_U8
(
buf
+
decoded_size
,
_iei
,
decoded_size
);
}
uint8_t
ie_len
=
0
;
DECODE_U8
(
buf
+
decoded_size
,
ie_len
,
decoded_size
);
length
=
ie_len
+
decoded_size
;
DECODE_U8
(
buf
+
decoded_size
,
_5g_EEASel
,
decoded_size
);
DECODE_U8
(
buf
+
decoded_size
,
_5g_EIASel
,
decoded_size
);
// TODO: decode the rest as spare for now
uint8_t
spare
=
0
;
for
(
int
i
=
0
;
i
<
(
ie_len
-
2
);
i
++
)
{
ENCODE_U8
(
buf
+
decoded_size
,
spare
,
decoded_size
);
}
length
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
ie_length
=
length
+
decoded_size
;
_5g_EEASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
_5g_EIASel
=
*
(
buf
+
decoded_size
);
decoded_size
++
;
Logger
::
nas_mm
().
debug
(
"Decoded UENetworkCapability EA (0x%d), IA (0x%d)"
,
_5g_EEASel
,
_5g_EIASel
);
Logger
::
nas_mm
().
debug
(
"Decoded UENetworkCapability
len 0x%d, actual length 0x%d"
,
decoded_size
,
ie_length
);
"Decoded UENetworkCapability
IE len 0x%d, actual length 0x%d"
,
ie_len
,
decoded_size
);
return
ie_length
;
return
decoded_size
;
}
src/nas/ies/UENetworkCapability.hpp
View file @
0c306b02
...
...
@@ -19,18 +19,14 @@
* contact@openairinterface.org
*/
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UENetworkCapability_H
#define _UENetworkCapability_H
#include <stdint.h>
constexpr
uint8_t
kUeNetworkCapabilityMinimumLength
=
4
;
constexpr
uint8_t
kUeNetworkCapabilityMaximumLength
=
15
;
namespace
nas
{
class
UENetworkCapability
{
...
...
@@ -45,7 +41,7 @@ class UENetworkCapability {
uint8_t
getEEASel
();
uint8_t
getEIASel
();
int
encode2buffer
(
uint8_t
*
buf
,
int
len
);
int
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
);
int
decodefrombuffer
(
uint8_t
*
buf
,
int
len
,
bool
is_option
=
true
);
private:
uint8_t
_iei
;
...
...
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
View file @
0c306b02
...
...
@@ -32,6 +32,9 @@ namespace ngap {
//------------------------------------------------------------------------------
HandoverNotifyMsg
::
HandoverNotifyMsg
()
:
NgapUEMessage
()
{
handoverNotifyIEs
=
nullptr
;
setMessageType
(
NgapMessageType
::
HANDOVER_NOTIFY
);
initialize
();
}
//------------------------------------------------------------------------------
...
...
src/ngap/ngapMsgs/InitialUEMessage.cpp
View file @
0c306b02
...
...
@@ -36,7 +36,7 @@ InitialUEMessageMsg::InitialUEMessageMsg() : NgapMessage() {
amfSetId
=
std
::
nullopt
;
allowedNssai
=
std
::
nullopt
;
NgapMessage
::
setMessageType
(
NgapMessageType
::
NG_SETUP_RESPONS
E
);
NgapMessage
::
setMessageType
(
NgapMessageType
::
INITIAL_UE_MESSAG
E
);
initialize
();
}
...
...
src/ngap/ngapMsgs/UEContextReleaseComplete.cpp
View file @
0c306b02
...
...
@@ -33,6 +33,7 @@ UEContextReleaseCompleteMsg::UEContextReleaseCompleteMsg() : NgapUEMessage() {
ies
=
nullptr
;
userLocationInformation
=
nullptr
;
pduSessionResourceListCxtRelCpl
=
std
::
nullopt
;
setMessageType
(
NgapMessageType
::
UE_CONTEXT_RELEASE_COMPLETE
);
initialize
();
}
...
...
src/ngap/ngapMsgs/UERadioCapabilityInfoIndication.cpp
View file @
0c306b02
...
...
@@ -35,6 +35,7 @@ UeRadioCapabilityInfoIndicationMsg::UeRadioCapabilityInfoIndicationMsg()
:
NgapUEMessage
()
{
ueRadioCapabilityInfoIndicationIEs
=
nullptr
;
ueRadioCapabilityForPaging
=
std
::
nullopt
;
setMessageType
(
NgapMessageType
::
UE_RADIO_CAPABILITY_INFO_INDICATION
);
initialize
();
}
...
...
src/ngap/ngapMsgs/UplinkNASTransport.cpp
View file @
0c306b02
...
...
@@ -32,6 +32,7 @@ namespace ngap {
//------------------------------------------------------------------------------
UplinkNASTransportMsg
::
UplinkNASTransportMsg
()
:
NgapUEMessage
()
{
uplinkNASTransportIEs
=
nullptr
;
setMessageType
(
NgapMessageType
::
UPLINK_NAS_TRANSPORT
);
initialize
();
}
...
...
src/ngap/ngapMsgs/UplinkNonUEAssociatedNRPPaTransport.cpp
View file @
0c306b02
...
...
@@ -31,6 +31,8 @@ namespace ngap {
//------------------------------------------------------------------------------
UplinkNonUEAssociatedNRPPaTransportMsg
::
UplinkNonUEAssociatedNRPPaTransportMsg
()
:
NgapMessage
()
{
uplinkNonUEAssociatedNRPPaTransportIEs
=
nullptr
;
setMessageType
(
NgapMessageType
::
UPLINK_NON_UE_ASSOCIATED_NRPPA_TRANSPORT
);
initialize
();
}
...
...
src/ngap/ngapMsgs/UplinkUEAssociatedNRPPaTransport.cpp
View file @
0c306b02
...
...
@@ -32,6 +32,8 @@ namespace ngap {
//------------------------------------------------------------------------------
UplinkUEAssociatedNRPPaTransportMsg
::
UplinkUEAssociatedNRPPaTransportMsg
()
:
NgapUEMessage
()
{
uplinkUEAssociatedNRPPaTransportIEs
=
nullptr
;
setMessageType
(
NgapMessageType
::
UPLINK_UE_ASSOCIATED_NRPPA_TRANSPORT
);
initialize
();
}
...
...
src/utils/fqdn.cpp
View file @
0c306b02
...
...
@@ -20,43 +20,54 @@
*/
#include "fqdn.hpp"
#include "logger.hpp"
#include <boost/asio.hpp>
#include <iostream>
#include <chrono>
#include <thread>
#include "logger.hpp"
#define MAX_NB_RESOLVE_TRIES 4
#define TIME_BETWEEN_TRIES 2
bool
fqdn
::
resolve
(
const
std
::
string
&
host_name
,
std
::
string
&
address
,
uint32_t
&
port
,
uint8_t
&
addr_type
,
const
std
::
string
&
protocol
)
{
try
{
Logger
::
amf_app
().
debug
(
"Resolving DNS:- %s"
,
host_name
.
c_str
());
boost
::
asio
::
io_context
io_context
=
{};
int
tries
=
0
;
Logger
::
amf_app
().
debug
(
"Resolving a DNS (name %s)"
,
host_name
.
c_str
());
while
(
tries
<
MAX_NB_RESOLVE_TRIES
)
{
try
{
boost
::
asio
::
io_context
io_context
=
{};
Logger
::
amf_app
().
debug
(
"Resolving DNS Try #%u"
,
tries
);
boost
::
asio
::
ip
::
tcp
::
resolver
resolver
{
io_context
};
boost
::
asio
::
ip
::
tcp
::
resolver
::
results_type
endpoints
=
resolver
.
resolve
(
host_name
,
protocol
);
boost
::
asio
::
ip
::
tcp
::
resolver
resolver
{
io_context
};
boost
::
asio
::
ip
::
tcp
::
resolver
::
results_type
endpoints
=
resolver
.
resolve
(
host_name
,
protocol
);
addr_type
=
0
;
// IPv4 by default
for
(
auto
it
=
endpoints
.
cbegin
();
it
!=
endpoints
.
cend
();
it
++
)
{
// get the first Endpoint
boost
::
asio
::
ip
::
tcp
::
endpoint
endpoint
=
*
it
;
address
=
endpoint
.
address
().
to_string
();
port
=
endpoint
.
port
();
Logger
::
amf_app
().
debug
(
"Resolve a DNS (name %s, protocol %s): Ip Addr %s, port %u"
,
host_name
.
c_str
(),
protocol
.
c_str
(),
address
.
c_str
(),
port
);
if
(
endpoint
.
address
().
is_v4
())
addr_type
=
0
;
else
addr_type
=
1
;
return
true
;
addr_type
=
0
;
// IPv4 by default
for
(
auto
it
=
endpoints
.
cbegin
();
it
!=
endpoints
.
cend
();
it
++
)
{
// get the first Endpoint
boost
::
asio
::
ip
::
tcp
::
endpoint
endpoint
=
*
it
;
address
=
endpoint
.
address
().
to_string
();
port
=
endpoint
.
port
();
Logger
::
amf_app
().
debug
(
"Resolved a DNS (name %s, protocol %s): Ip Addr %s, port %u"
,
host_name
.
c_str
(),
protocol
.
c_str
(),
address
.
c_str
(),
port
);
if
(
endpoint
.
address
().
is_v4
())
addr_type
=
0
;
else
addr_type
=
1
;
return
true
;
}
}
catch
(
std
::
exception
&
e
)
{
tries
++
;
if
(
tries
==
MAX_NB_RESOLVE_TRIES
)
{
throw
std
::
runtime_error
(
"Cannot resolve a DNS name "
+
std
::
string
(
e
.
what
())
+
" after "
+
std
::
to_string
(
tries
)
+
" tries"
);
return
false
;
}
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
seconds
(
TIME_BETWEEN_TRIES
));
}
}
catch
(
std
::
exception
&
e
)
{
// TODO: Remove this line so that AMF can re-try several times
throw
std
::
runtime_error
(
"Cannot resolve a DNS name "
+
std
::
string
(
e
.
what
()));
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