diff options
author | David Robillard <d@drobilla.net> | 2009-06-03 21:47:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-06-03 21:47:19 +0000 |
commit | 3ee5e87fc15363c104f08e61ba8ed0da76f97152 (patch) | |
tree | 983ddefeeb5194e0a86887244c6b12ddba38ab1d /src/plugin.c | |
parent | c220a3ce918293855ed6b53b97dc604573fd031a (diff) | |
download | lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.tar.gz lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.tar.bz2 lilv-3ee5e87fc15363c104f08e61ba8ed0da76f97152.zip |
Consistent error/warning message output.
Fix crash on invalid plugin files.
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2086 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugin.c b/src/plugin.c index baea5f5..6bc232a 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -153,8 +153,6 @@ slv2_plugin_load_ports_if_necessary(SLV2Plugin p) const char* symbol = (const char*)librdf_node_get_literal_value(symbol_node); const char* index = (const char*)librdf_node_get_literal_value(index_node); - //printf("PORT: %s %s %s\n", type, index, symbol); - const int this_index = atoi(index); SLV2Port this_port = NULL; @@ -372,8 +370,7 @@ slv2_plugin_verify(SLV2Plugin plugin) slv2_results_free(results); if ( ! (has_type && has_name && has_license && has_port) ) { - fprintf(stderr, "Invalid LV2 Plugin %s\n", - slv2_value_as_uri(slv2_plugin_get_uri(plugin))); + SLV2_WARNF("Invalid plugin <%s>\n", slv2_value_as_uri(slv2_plugin_get_uri(plugin))); return false; } else { return true; @@ -400,6 +397,10 @@ slv2_plugin_get_name(SLV2Plugin plugin) slv2_values_free(results); } + if (!ret) + SLV2_WARNF("<%s> has no (mandatory) doap:name\n", + slv2_value_as_string(slv2_plugin_get_uri(plugin))); + return ret; } @@ -468,8 +469,7 @@ slv2_plugin_get_value_for_subject(SLV2Plugin p, SLV2Value predicate) { if ( ! slv2_value_is_uri(subject)) { - fprintf(stderr, "slv2_plugin_get_value_for_subject error: " - "subject is not a URI\n"); + SLV2_ERROR("slv2_plugin_get_value_for_subject: subject not a URI\n"); return NULL; } |