summaryrefslogtreecommitdiffstats
path: root/veslibrary/ves_cpplibrary/src/lib
diff options
context:
space:
mode:
authorYatian XU <yatian.xu@nokia-sbell.com>2019-09-17 13:46:50 +0800
committerYatian XU <yatian.xu@nokia-sbell.com>2019-09-17 05:57:44 +0000
commit1571a7c1dbecc320d9e0c6014c845a1fe1abe377 (patch)
treeafdeaf900a48af837a0c3aeeac49fa8314df8ea4 /veslibrary/ves_cpplibrary/src/lib
parent7966a4012c0eb263936e1b284801a79c5cb607a7 (diff)
Contribute C++ implement of VES spec 7.0.1 to ONAP/vnfsdk:
Part5: test and code coverage Issue-ID: VNFSDK-466 Signed-off-by: Yatian XU <yatian.xu@nokia-sbell.com> Change-Id: Ia8188169188547b88ec586b68dbe5e42e7b28482
Diffstat (limited to 'veslibrary/ves_cpplibrary/src/lib')
-rwxr-xr-xveslibrary/ves_cpplibrary/src/lib/transport/XDiskQueue.cpp2
-rwxr-xr-xveslibrary/ves_cpplibrary/src/lib/transport/XRpcClientTransport.cpp12
2 files changed, 7 insertions, 7 deletions
diff --git a/veslibrary/ves_cpplibrary/src/lib/transport/XDiskQueue.cpp b/veslibrary/ves_cpplibrary/src/lib/transport/XDiskQueue.cpp
index c63d19e..5834f97 100755
--- a/veslibrary/ves_cpplibrary/src/lib/transport/XDiskQueue.cpp
+++ b/veslibrary/ves_cpplibrary/src/lib/transport/XDiskQueue.cpp
@@ -160,7 +160,7 @@ std::string vagt::queue::XDiskQueue::front()
std::string vagt::queue::XDiskQueue::createKey()
{
auto now = chrono::system_clock::now().time_since_epoch().count();
- snprintf(key, sizeof(key), "%020ld_%010u", now, keyId_.fetch_add(1));
+ snprintf(key, sizeof(key), "%020ld_%010ld", now, keyId_.fetch_add(1));
return key;
}
diff --git a/veslibrary/ves_cpplibrary/src/lib/transport/XRpcClientTransport.cpp b/veslibrary/ves_cpplibrary/src/lib/transport/XRpcClientTransport.cpp
index a63fc00..84711d9 100755
--- a/veslibrary/ves_cpplibrary/src/lib/transport/XRpcClientTransport.cpp
+++ b/veslibrary/ves_cpplibrary/src/lib/transport/XRpcClientTransport.cpp
@@ -65,12 +65,12 @@ XErrorCode vagt::transport::XRpcClientTransport::post(const std::string & event)
{
return (XErrorCode)(rpcClient_->post(event));
}
- catch (TTransportException ex)
+ catch (TTransportException& ex)
{
SPDLOG_ERROR("Fail to post event:({}).", ex.what());
return XErrorNetworkError;
}
- catch (TException ex)
+ catch (TException& ex)
{
SPDLOG_ERROR("Fail to post event:({}).", ex.what());
return XErrorNetworkError;
@@ -133,12 +133,12 @@ XErrorCode vagt::transport::XRpcClientTransport::startRPC()
{
rpcTransport_->open();
}
- catch (TTransportException ex)
+ catch (TTransportException& ex)
{
SPDLOG_ERROR("Fail to start rpc client:({}).", ex.what());
return XErrorNok;
}
- catch (TException ex)
+ catch (TException& ex)
{
SPDLOG_ERROR("Fail to start rpc client:({}).", ex.what());
return XErrorNok;
@@ -164,12 +164,12 @@ XErrorCode vagt::transport::XRpcClientTransport::stopRPC()
rpcTransport_->close();
rpcTransport_.reset();
}
- catch (TTransportException ex)
+ catch (TTransportException& ex)
{
SPDLOG_ERROR("Fail to stop rpc client:({}).", ex.what());
return XErrorNok;
}
- catch (TException ex)
+ catch (TException& ex)
{
SPDLOG_ERROR("Fail to stop rpc client:({}).", ex.what());
return XErrorNok;