diff --git a/plugins/dbus.c b/plugins/dbus.c index 811d2d6..8dc6c40 100644 --- a/plugins/dbus.c +++ b/plugins/dbus.c @@ -1742,15 +1742,30 @@ dbusHandleGetPluginMetadataMessage (DBusConnection *connection, reply = dbus_message_new_method_return (message); - if (!loadedPlugin && p->vTable->getMetadata) + if (p->vTable->getMetadata) { CompMetadata *m; - m = (*p->vTable->getMetadata) (p); + if (loadedPlugin) + { + m = malloc (sizeof (CompMetadata)); + if (!m) + return FALSE; + compInitPluginMetadata (m, p->vTable->name); + compAddMetadataFromFile (m, p->vTable->name); + } + else + { + m = (*p->vTable->getMetadata) (p); + } + if (m) { shortDesc = compGetShortPluginDescription (m); longDesc = compGetLongPluginDescription (m); + + if (loadedPlugin) + free (m); } }