summaryrefslogtreecommitdiffstats
path: root/src/lib.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-18 01:34:45 +0000
committerDavid Robillard <d@drobilla.net>2014-01-18 01:34:45 +0000
commitd10ea3bd9e270216bad0fa8eb3f40197332ddbce (patch)
tree1e67b3d7ac7ac54eb22a9bdc7e5ee36047834809 /src/lib.c
parentb981fe987511c429aca18151429e233ba80ccf94 (diff)
downloadlilv-d10ea3bd9e270216bad0fa8eb3f40197332ddbce.tar.gz
lilv-d10ea3bd9e270216bad0fa8eb3f40197332ddbce.tar.bz2
lilv-d10ea3bd9e270216bad0fa8eb3f40197332ddbce.zip
Call lv2_lib_descriptor separately for different bundle paths
(fix loading several dynamic plugins like Ingen at once). git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5314 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/lib.c')
-rw-r--r--src/lib.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib.c b/src/lib.c
index 7eb62aa..314a943 100644
--- a/src/lib.c
+++ b/src/lib.c
@@ -22,8 +22,10 @@ lilv_lib_open(LilvWorld* world,
const char* bundle_path,
const LV2_Feature*const* features)
{
- ZixTreeIter* i = NULL;
- const struct LilvHeader key = { world, (LilvNode*)uri };
+ ZixTreeIter* i = NULL;
+ const LilvLib key = {
+ world, (LilvNode*)uri, (char*)bundle_path, NULL, NULL, NULL, 0
+ };
if (!zix_tree_find(world->libs, &key, &i)) {
LilvLib* llib = (LilvLib*)zix_tree_get(i);
++llib->refs;
@@ -69,6 +71,7 @@ lilv_lib_open(LilvWorld* world,
LilvLib* llib = (LilvLib*)malloc(sizeof(LilvLib));
llib->world = world;
llib->uri = lilv_node_duplicate(uri);
+ llib->bundle_path = lilv_strdup(bundle_path);
llib->lib = lib;
llib->lv2_descriptor = df;
#ifdef LILV_NEW_LV2
@@ -106,6 +109,7 @@ lilv_lib_close(LilvLib* lib)
}
lilv_node_free(lib->uri);
+ free(lib->bundle_path);
free(lib);
}
}