[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-developers] gnunet-search and URIs
From: |
Yunta |
Subject: |
[GNUnet-developers] gnunet-search and URIs |
Date: |
Tue, 10 Feb 2009 23:12:21 +0200 |
Hi,
gnunet-search's man says you can give it URI instead of keywords
it didn't work for me (rev 8213), so I wrote this:
Index: src/applications/fs/ecrs/helper.c
===================================================================
--- src/applications/fs/ecrs/helper.c (revision 8213)
+++ src/applications/fs/ecrs/helper.c (working copy)
@@ -160,6 +160,18 @@
if (num_keywords == 0)
return NULL;
+
+ if (num_keywords == 1)
+ {
+ if (strlen(keywords[0])>strlen(GNUNET_ECRS_URI_PREFIX))
+ {
+ if
(strncmp(keywords[0],GNUNET_ECRS_URI_PREFIX,strlen(GNUNET_ECRS_URI_PREFIX))
== 0)
+ {
+ return GNUNET_ECRS_string_to_uri(ectx, keywords[0]);
+ }
+ }
+ }
+
uri = GNUNET_malloc (sizeof (URI));
uri->type = ksk;
uri->data.ksk.keywordCount = num_keywords;
and it works (or just looks like it's working)
I don't know gnunet's code (it took me 1 hour to write this) so it can
be totally wrong.
And probably it is placed incorrectly.
Anyway, it may be better than nothing :)
br,
yunta
ps.
thank you all for writing gnunet, for your effort, time and result
- [GNUnet-developers] gnunet-search and URIs,
Yunta <=