[Debian-iot-packaging] [openzwave-controlpanel] 22/81: Leave saving configuration as true for now. Add some debugging for topology display. Check for closed driver upon exit. Don't display self (same node) in topology display.
Dara Adib
daradib-guest at moszumanska.debian.org
Thu Dec 22 16:57:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
daradib-guest pushed a commit to branch debian/master
in repository openzwave-controlpanel.
commit 81ab03a470e0f14baa5911986f9097adf67f5498
Author: glsatz <glsatz at gmail.com>
Date: Mon Feb 13 00:21:25 2012 +0000
Leave saving configuration as true for now.
Add some debugging for topology display.
Check for closed driver upon exit.
Don't display self (same node) in topology display.
---
cp.js | 2 +-
ozwcp.cpp | 2 +-
webserver.cpp | 9 +++++----
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/cp.js b/cp.js
index 212f7e4..79a6739 100644
--- a/cp.js
+++ b/cp.js
@@ -1151,7 +1151,7 @@ function TopoReply()
var j, k = 0;
for (j = 1; j < routes.length; j++) {
if (i == j) {
- stuff=stuff+'<td>*</td>';
+ stuff=stuff+'<td> </td>';
} else if (k < routes[i].length && j == routes[i][k]) {
stuff=stuff+'<td>*</td>';
k++;
diff --git a/ozwcp.cpp b/ozwcp.cpp
index 74275c4..bf862a8 100644
--- a/ozwcp.cpp
+++ b/ozwcp.cpp
@@ -657,7 +657,7 @@ int32 main(int32 argc, char* argv[])
for (i = 0; i < MAX_NODES; i++)
nodes[i] = NULL;
- Options::Create("./config/", "", "--SaveConfiguration=false");
+ Options::Create("./config/", "", "--SaveConfiguration=true");
Options::Get()->Lock();
Manager::Create();
diff --git a/webserver.cpp b/webserver.cpp
index 6852207..cf58c42 100644
--- a/webserver.cpp
+++ b/webserver.cpp
@@ -317,6 +317,7 @@ const char *Webserver::SendTopoResponse (struct MHD_Connection *conn, const char
if (k < (len - 1))
list += ",";
}
+ fprintf(stderr, "topo: node=%d %s\n", i, list.c_str());
TiXmlText *textElement = new TiXmlText(list.c_str());
nodeElement->LinkEndChild(textElement);
topoElement->LinkEndChild(nodeElement);
@@ -803,13 +804,13 @@ int Webserver::Handler (struct MHD_Connection *conn, const char *url,
Manager::Get()->SoftReset(homeId);
} else if (strcmp((char *)cp->conn_arg1, "exit") == 0) { /* exit */
pthread_mutex_lock(&glock);
- Manager::Get()->RemoveDriver(devname ? devname : "HID Controller");
- if (devname != NULL) {
+ if (devname != NULL || usb) {
+ Manager::Get()->RemoveDriver(devname ? devname : "HID Controller");
free(devname);
devname = NULL;
+ homeId = 0;
+ usb = false;
}
- homeId = 0;
- usb = false;
done = true; // let main exit
pthread_mutex_unlock(&glock);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/openzwave-controlpanel.git
More information about the Debian-iot-packaging
mailing list