summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-08-13 12:12:48 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2015-08-13 12:12:48 +0200
commit3cae8d9183cdffa41940b97e778ac6795441139d (patch)
treeec9e3ebb42fa424cc7497339ae7e6e0919301a5c /src
parente3fa8e88e6807ed787bf859ecdce8e9cf7ce09ee (diff)
downloadlibuca-3cae8d9183cdffa41940b97e778ac6795441139d.tar.gz
libuca-3cae8d9183cdffa41940b97e778ac6795441139d.tar.bz2
libuca-3cae8d9183cdffa41940b97e778ac6795441139d.tar.xz
libuca-3cae8d9183cdffa41940b97e778ac6795441139d.zip
Match plugin names correctly
Diffstat (limited to 'src')
-rw-r--r--src/uca-plugin-manager.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/uca-plugin-manager.c b/src/uca-plugin-manager.c
index eaf38fb..4961577 100644
--- a/src/uca-plugin-manager.c
+++ b/src/uca-plugin-manager.c
@@ -46,7 +46,7 @@ struct _UcaPluginManagerPrivate {
GList *funcs;
};
-static const gchar *MODULE_PATTERN = "libuca([A-Za-z]+)";
+static const gchar *MODULE_PATTERN = "libuca([A-Za-z0-9]+)";
typedef GType (*GetTypeFunc) (void);
@@ -193,15 +193,17 @@ static gchar *
find_camera_module_path (GList *search_paths, const gchar *name)
{
gchar *result = NULL;
+ gchar *modname;
GList *paths;
+ modname = g_strdup_printf ("libuca%s.so", name);
paths = scan_search_paths (search_paths);
for (GList *it = g_list_first (paths); it != NULL; it = g_list_next (it)) {
gchar *path = (gchar *) it->data;
gchar *basename = g_path_get_basename ((gchar *) path);
- if (g_strrstr (basename, name)) {
+ if (g_strrstr (basename, modname)) {
result = g_strdup (path);
g_free (basename);
break;
@@ -210,6 +212,7 @@ find_camera_module_path (GList *search_paths, const gchar *name)
g_free (basename);
}
+ g_free (modname);
g_list_free_full (paths, g_free);
return result;
}