[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23931 - gnunet/src/peerinfo-tool
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23931 - gnunet/src/peerinfo-tool |
Date: |
Fri, 21 Sep 2012 14:15:18 +0200 |
Author: wachs
Date: 2012-09-21 14:15:18 +0200 (Fri, 21 Sep 2012)
New Revision: 23931
Modified:
gnunet/src/peerinfo-tool/gnunet-peerinfo_plugins.c
Log:
prefix based plugin lookup for peerinfo tool
Modified: gnunet/src/peerinfo-tool/gnunet-peerinfo_plugins.c
===================================================================
--- gnunet/src/peerinfo-tool/gnunet-peerinfo_plugins.c 2012-09-21 12:10:26 UTC
(rev 23930)
+++ gnunet/src/peerinfo-tool/gnunet-peerinfo_plugins.c 2012-09-21 12:15:18 UTC
(rev 23931)
@@ -167,8 +167,18 @@
{
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23931 - gnunet/src/peerinfo-tool,
gnunet <=