diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-02 17:17:34 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-02 17:17:34 -0400 |
| commit | 80d8b7d0ae56f1dce8b5b25ab7930df436755daf (patch) | |
| tree | dc3eecbc787610f216036ddf202d052a29d94ea2 /netconf-service | |
| parent | f823fd05acb2a786fc0de00f77c952b23ca3414d (diff) | |
| download | infinitytier-80d8b7d0ae56f1dce8b5b25ab7930df436755daf.tar.gz infinitytier-80d8b7d0ae56f1dce8b5b25ab7930df436755daf.zip | |
Netconf wired up, ready to test.
Diffstat (limited to 'netconf-service')
| -rw-r--r-- | netconf-service/netconf.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/netconf-service/netconf.cpp b/netconf-service/netconf.cpp index 01f33120..af6ed4e6 100644 --- a/netconf-service/netconf.cpp +++ b/netconf-service/netconf.cpp @@ -219,6 +219,22 @@ int main(int argc,char **argv) StoreQueryResult rs = q.store(); if (rs.num_rows() > 0) isOpen = ((int)rs[0]["isOpen"] > 0); + else { + Dictionary response; + response["peer"] = peerIdentity.address().toString(); + response["nwid"] = request.get("nwid"); + response["type"] = "netconf-response"; + response["requestId"] = request.get("requestId"); + response["error"] = "NOT_FOUND"; + std::string respm = response.toString(); + uint32_t respml = (uint32_t)htonl((uint32_t)respm.length()); + + stdoutWriteLock.lock(); + write(STDOUT_FILENO,&respml,4); + write(STDOUT_FILENO,respm.data(),respm.length()); + stdoutWriteLock.unlock(); + continue; + } } Dictionary netconf; |
