Fix NetconfAccess not being able to fetch submodules

When I implemented SysrepoAccess, I ignored the submoduleRevision
argument in the "libyang missing schema callback" as Sysrepo seemed to
work just fine without supplying it. However, libnetconf needs it
because one can't supply both module name and submodule name to a
<get-schema> request. Now, if a submodule is being requested by libyang
from NetconfAccess, I pass the submodule name to libnetconf rather
than the module name.

Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/123
Change-Id: I0e5f6b82b1598ecc9f27732f450b1a204ee500f9
diff --git a/src/sysrepo_access.cpp b/src/sysrepo_access.cpp
index f84bb91..eec6d6c 100644
--- a/src/sysrepo_access.cpp
+++ b/src/sysrepo_access.cpp
@@ -89,7 +89,10 @@
     } catch (sysrepo::sysrepo_exception& ex) {
         reportErrors();
     }
-    m_schema->registerModuleCallback([this](const char* moduleName, const char* revision, const char* submodule) {
+
+    // If fetching a submodule, sysrepo::Session::get_schema will determine the revision from the main module.
+    // That's why submoduleRevision is ignored.
+    m_schema->registerModuleCallback([this](const char* moduleName, const char* revision, const char* submodule, [[maybe_unused]] const char* submoduleRevision) {
         return fetchSchema(moduleName, revision, submodule);
     });
 
@@ -199,7 +202,7 @@
 {
     std::string schema;
     try {
-        schema = m_session->get_schema(module, revision, submodule, SR_SCHEMA_YANG); // FIXME: maybe we should use get_submodule_schema for submodules?
+        schema = m_session->get_schema(module, revision, submodule, SR_SCHEMA_YANG);
     } catch (sysrepo::sysrepo_exception& ex) {
         reportErrors();
     }