[Debian-iot-packaging] [openzwave-controlpanel] 28/81: Handle missing values from bugs in the library. Clear groups when getting updates.
Dara Adib
daradib-guest at moszumanska.debian.org
Thu Dec 22 16:57:48 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 e0f53797e36c45a389bd768d5a67fb725a7f1abb
Author: glsatz at gmail.com <glsatz at gmail.com>
Date: Thu Dec 6 00:56:46 2012 +0000
Handle missing values from bugs in the library.
Clear groups when getting updates.
---
cp.js | 4 +++-
ozwcp.cpp | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cp.js b/cp.js
index 8b6c541..9dcb2ca 100644
--- a/cp.js
+++ b/cp.js
@@ -204,8 +204,10 @@ function PollReply()
for (var l = 0; l < items.length; l++) {
nodes[id].values[k].value[l] = {item: items[l].firstChild.nodeValue, selected: (current == items[l].firstChild.nodeValue)};
}
- } else
+ } else if (values[j].firstChild != null)
nodes[id].values[k].value = values[j].firstChild.nodeValue;
+ else
+ nodes[id].values[k].value = '0';
k++;
}
var groups = elem[i].getElementsByTagName('groups');
diff --git a/ozwcp.cpp b/ozwcp.cpp
index bad6453..54c03e2 100644
--- a/ozwcp.cpp
+++ b/ozwcp.cpp
@@ -219,6 +219,7 @@ void MyNode::addGroup (uint8 node, uint8 g, uint8 n, uint8 *v)
newGroup(node);
for (vector<MyGroup*>::iterator it = groups.begin(); it != groups.end(); ++it)
if ((*it)->groupid == g) {
+ (*it)->grouplist.clear();
for (int i = 0; i < n; i++)
(*it)->grouplist.push_back(v[i]);
setTime(time(NULL));
--
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