aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo-tool/gnunet-peerinfo_plugins.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/peerinfo-tool/gnunet-peerinfo_plugins.c')
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo_plugins.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/peerinfo-tool/gnunet-peerinfo_plugins.c b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
index ba7c1d3..3bca9fe 100644
--- a/src/peerinfo-tool/gnunet-peerinfo_plugins.c
+++ b/src/peerinfo-tool/gnunet-peerinfo_plugins.c
@@ -167,8 +167,18 @@ GPI_plugins_find (const char *name)
{
struct TransportPlugin *head = plugins_head;
- while ((head != NULL) && (0 != strcmp (name, head->short_name)))
+ char *stripped = GNUNET_strdup (name);
+ char *sep = strchr (stripped, '_');
+ if (NULL != sep)
+ sep[0] = '\0';
+
+ while (head != NULL)
+ {
+ if (head->short_name == strstr (head->short_name, stripped))
+ break;
head = head->next;
+ }
+ GNUNET_free (stripped);
if (NULL == head)
return NULL;
return head->api;