This is pretty serious error, perhaps propagate it to the caller? If a .scope file can't be found proxy can't be created and therefore it doesn't even make sense to try to display an icon for the .scope file. Bottom line - invalid scope ids should be completely ignored (and LOG_WARNed)
+void ScopeProxy::Impl::OnScopeChannelsInvalidated(UnityProtocolScopeProxy* proxy)
+{
+ LOG_WARNING(logger) << "Channels for scope '" << scope_data_->dbus_path() << "' have been invalidated. Attempting proxy re-creation.";
+ DestroyProxy();
+ CreateProxy();
+}
Shouldn't be needed, UnityProtocolScopeProxy is clever, it will try to reconnect to the scope automatically, are we missing notifications when this happens?
Too easy to get wrong, the passed hashtable needs to have key_destroy_func set to g_free and value_destroy_func to g_variant_unref. Perhaps just return a hash table without making it an in param?
+++ UnityCore/ MusicPreview. cpp 2013-01-21 16:58:59 +0000
@@ -70,7 +71,12 @@
+ else
+ g_assert(false);
Nasty, LOG_ERROR() pls.
@@ -81,7 +87,12 @@
+ else
+ g_assert(false);
Same as above
+++ UnityCore/ Preview. cpp 2013-01-21 16:58:59 +0000
@@ -229,7 +229,12 @@
+ else
+ g_assert(false);
Same
+++ UnityCore/ ScopeData. cpp 2013-01-21 22:19:45 +0000
+ if (error)
+ {
+ data->id = scope_id;
+ LOG_DEBUG(logger) << "Error fetching metadata for scope: " << scope_id << " : " << error.Message();
+ }
This is pretty serious error, perhaps propagate it to the caller? If a .scope file can't be found proxy can't be created and therefore it doesn't even make sense to try to display an icon for the .scope file. Bottom line - invalid scope ids should be completely ignored (and LOG_WARNed)
+void ScopeProxy: :Impl:: DestroyProxy( ) .Release( ); cancel( cancel_ scope_) ; new(); new();
+{
+ scope_proxy_
+ if (cancel_scope_)
+ {
+ g_cancellable_
+ cancel_scope_ = g_cancellable_
+ }
+ cancel_scope_ = g_cancellable_
Why the double creation?
+void ScopeProxy: :Impl:: OnScopeChannels Invalidated( UnityProtocolSc opeProxy* proxy) ->dbus_ path() << "' have been invalidated. Attempting proxy re-creation.";
+{
+ LOG_WARNING(logger) << "Channels for scope '" << scope_data_
+ DestroyProxy();
+ CreateProxy();
+}
Shouldn't be needed, UnityProtocolSc opeProxy is clever, it will try to reconnect to the scope automatically, are we missing notifications when this happens?
+GHashTable* hashtable_ from_hintsmap( glib::HintsMap const& hints, GHashTable* hash_table) HintsMap: :const_ iterator it = hints.begin(); it != hints.end(); ++it) it->first. c_str() ); ref(it- >second) ; table_insert( hash_table, key, ptr);
+{
+ if (!hash_table)
+ return nullptr;
+
+ for (glib::
+ {
+ gchar* key = g_strdup(
+ GVariant* ptr = g_variant_
+
+ g_hash_
+ }
+ return hash_table;
+}
Too easy to get wrong, the passed hashtable needs to have key_destroy_func set to g_free and value_destroy_func to g_variant_unref. Perhaps just return a hash table without making it an in param?
+++ UnityCore/ ScopeProxy. cpp 2013-01-21 20:39:28 +0000 _from_hintsmap( hints, g_hash_ table_new( g_direct_ hash, g_direct_equal));
+ GHashTable* hints_table = glib::hashtable
The poor hashtable is leaking, the proxy doesn't steal it.