[gnome-software] trivial: Do not include the parent profile name when it's not set



commit a91e6412af5938ff6793355f35f667095346d864
Author: Richard Hughes <richard hughsie com>
Date:   Mon Oct 21 11:22:11 2013 +0100

    trivial: Do not include the parent profile name when it's not set

 src/gs-plugin-loader.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 2ad8197..e527b09 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -195,10 +195,16 @@ gs_plugin_loader_run_refine_plugin (GsPluginLoader *plugin_loader,
                goto out;
 
        /* profile the plugin runtime */
-       profile_id = g_strdup_printf ("GsPlugin::%s(%s;%s)",
-                                     plugin->name,
-                                     function_name_parent,
-                                     function_name);
+       if (function_name_parent == NULL) {
+               profile_id = g_strdup_printf ("GsPlugin::%s(%s)",
+                                             plugin->name,
+                                             function_name);
+       } else {
+               profile_id = g_strdup_printf ("GsPlugin::%s(%s;%s)",
+                                             plugin->name,
+                                             function_name_parent,
+                                             function_name);
+       }
        gs_profile_start (plugin_loader->priv->profile, profile_id);
        ret = plugin_func (plugin, list, flags, cancellable, error);
        if (!ret) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]