commit | 1d50a5be75721e46a4df9f927f2b773d42501c97 | [log] [tgz] |
---|---|---|
author | Václav Kubernát <kubernat@cesnet.cz> | Mon Feb 03 16:44:22 2020 +0100 |
committer | Václav Kubernát <kubernat@cesnet.cz> | Mon Feb 03 18:08:41 2020 +0100 |
tree | ed06b14f35b274ccb2b955aa90f7c1c6617217ed | |
parent | caa6cb1864a8b0646ebb68786214962f2c5b42db [diff] [blame] |
NetconfAccess: reuse netconf libyang context Change-Id: Ib8d4b35ddd0ecc24e9ff4066e10eaf71eb175bee
diff --git a/src/netconf-client.cpp b/src/netconf-client.cpp index 3ced537..9f6908b 100644 --- a/src/netconf-client.cpp +++ b/src/netconf-client.cpp
@@ -204,6 +204,11 @@ return m_session; } +libyang::S_Context Session::libyangContext() +{ + return std::make_shared<libyang::Context>(nc_session_get_ctx(m_session), nullptr); +} + Session::Session(struct nc_session* session) : m_session(session) {