summaryrefslogtreecommitdiffstats
path: root/src/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port.c')
-rw-r--r--src/port.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/port.c b/src/port.c
index 329e63c..db18ab8 100644
--- a/src/port.c
+++ b/src/port.c
@@ -79,17 +79,20 @@ slv2_port_get_property(SLV2Plugin* p,
rasqal_init();
- rasqal_query_results* results = slv2_plugin_run_query(p,
+ char* query = strjoin(
"SELECT DISTINCT ?value FROM data: WHERE { \n"
- "plugin: lv2:port ?port \n"
- "?port lv2:index ", index_str, " \n"
- "?port ", property, " ?value . \n}\n", NULL);
+ "plugin: lv2:port ?port . \n"
+ "?port lv2:index ", index_str, " . \n"
+ "?port ", property, " ?value . \n}\n", NULL);
+
+ rasqal_query_results* results = slv2_plugin_run_query(p, query);
SLV2Property result = slv2_query_get_results(results);
rasqal_free_query_results(results);
rasqal_finish();
-
+ free(query);
+
return result;
}