You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
977 B

  1. --- a/service/SettingsConfuse.cpp
  2. +++ b/service/SettingsConfuse.cpp
  3. @@ -42,10 +42,10 @@ Settings::Settings(void) {
  4. */
  5. Settings::~Settings(void) {
  6. TelldusCore::MutexLocker locker(&mutex);
  7. - if (d->cfg > 0) {
  8. + if (d->cfg) {
  9. cfg_free(d->cfg);
  10. }
  11. - if (d->var_cfg > 0) {
  12. + if (d->var_cfg) {
  13. cfg_free(d->var_cfg);
  14. }
  15. delete d;
  16. @@ -56,7 +56,7 @@ Settings::~Settings(void) {
  17. */
  18. std::wstring Settings::getSetting(const std::wstring &strName) const {
  19. TelldusCore::MutexLocker locker(&mutex);
  20. - if (d->cfg > 0) {
  21. + if (d->cfg) {
  22. std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str()));
  23. return TelldusCore::charToWstring(setting.c_str());
  24. }
  25. @@ -68,7 +68,7 @@ std::wstring Settings::getSetting(const
  26. */
  27. int Settings::getNumberOfNodes(Node node) const {
  28. TelldusCore::MutexLocker locker(&mutex);
  29. - if (d->cfg > 0) {
  30. + if (d->cfg) {
  31. if (node == Device) {
  32. return cfg_size(d->cfg, "device");
  33. } else if (node == Controller) {