diff options
-rw-r--r-- | src/peerinfo-tool/gnunet-peerinfo_plugins.c | 12 |
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 ba7c1d392..3bca9feb2 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) | |||
167 | { | 167 | { |
168 | struct TransportPlugin *head = plugins_head; | 168 | struct TransportPlugin *head = plugins_head; |
169 | 169 | ||
170 | while ((head != NULL) && (0 != strcmp (name, head->short_name))) | 170 | char *stripped = GNUNET_strdup (name); |
171 | char *sep = strchr (stripped, '_'); | ||
172 | if (NULL != sep) | ||
173 | sep[0] = '\0'; | ||
174 | |||
175 | while (head != NULL) | ||
176 | { | ||
177 | if (head->short_name == strstr (head->short_name, stripped)) | ||
178 | break; | ||
171 | head = head->next; | 179 | head = head->next; |
180 | } | ||
181 | GNUNET_free (stripped); | ||
172 | if (NULL == head) | 182 | if (NULL == head) |
173 | return NULL; | 183 | return NULL; |
174 | return head->api; | 184 | return head->api; |