projects
/
profile
/
ivi
/
automotive-message-broker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aae2cac
)
fixed periodic crash when sending dbus signal
author
Kevron Rees
<kevron.m.rees@intel.com>
Mon, 18 Aug 2014 17:27:19 +0000
(10:27 -0700)
committer
Kevron Rees
<kevron.m.rees@intel.com>
Mon, 18 Aug 2014 17:27:19 +0000
(10:27 -0700)
plugins/dbus/dbussignaller.h
patch
|
blob
|
history
diff --git
a/plugins/dbus/dbussignaller.h
b/plugins/dbus/dbussignaller.h
index
a4d5da5
..
1ea3c1d
100644
(file)
--- a/
plugins/dbus/dbussignaller.h
+++ b/
plugins/dbus/dbussignaller.h
@@
-23,6
+23,11
@@
public:
}
}
+ ~DBusSignal()
+ {
+
+ }
+
bool operator == (const DBusSignal &other) const
{
return connection == other.connection &&
bool operator == (const DBusSignal &other) const
{
return connection == other.connection &&
@@
-94,7
+99,7
@@
private:
std::string interfaceName;
std::string signalName;
std::string interfaceName;
std::string signalName;
- std::unordered_map<
const char*
, GVariant*> variantMap;
+ std::unordered_map<
std::string
, GVariant*> variantMap;
for(auto s : itr.second)
{
for(auto s : itr.second)
{
@@
-107,9
+112,10
@@
private:
AbstractProperty* property = signal->property;
auto val = g_variant_ref(property->toGVariant());
AbstractProperty* property = signal->property;
auto val = g_variant_ref(property->toGVariant());
+ std::string sequenceName = property->name() + "Sequence";
- variantMap[property->name()
.c_str()
] = val;
- variantMap[s
td::string(property->name() + "Sequence").c_str()
] = g_variant_new("i", property->sequence());
+ variantMap[property->name()] = val;
+ variantMap[s
equenceName
] = g_variant_new("i", property->sequence());
variantMap["Time"] = g_variant_new("d", property->timestamp());
variantMap["Zone"] = g_variant_new("i", property->value()->zone);
}
variantMap["Time"] = g_variant_new("d", property->timestamp());
variantMap["Zone"] = g_variant_new("i", property->value()->zone);
}
@@
-120,11
+126,12
@@
private:
for(auto sv : variantMap)
{
/// Send PropertiesChanged signal
for(auto sv : variantMap)
{
/// Send PropertiesChanged signal
- //auto key = amb::make_unique(sv.first);
auto key = sv.first;
auto key = sv.first;
- auto value = amb::make_super(g_variant_ref(sv.second));
+ auto value = sv.second;
+
+ DebugOut(0) << "key: " << key << endl;
- g_variant_builder_add(&builder, "{sv}", key
, value.get()
);
+ g_variant_builder_add(&builder, "{sv}", key
.c_str(), value
);
}
GError* error = nullptr;
}
GError* error = nullptr;