[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6901 - GNUnet/src/applications/fs/ecrs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6901 - GNUnet/src/applications/fs/ecrs |
Date: |
Mon, 26 May 2008 19:58:50 -0600 (MDT) |
Author: grothoff
Date: 2008-05-26 19:58:50 -0600 (Mon, 26 May 2008)
New Revision: 6901
Modified:
GNUnet/src/applications/fs/ecrs/uri.c
Log:
fixing uri operations
Modified: GNUnet/src/applications/fs/ecrs/uri.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.c 2008-05-27 01:26:40 UTC (rev
6900)
+++ GNUnet/src/applications/fs/ecrs/uri.c 2008-05-27 01:58:50 UTC (rev
6901)
@@ -300,8 +300,8 @@
for (i = 0; i < keywordCount; i++)
{
keyword = keywords[i];
- n += strlen (keyword);
- if (NULL != strstr (keyword, " "))
+ n += strlen (keyword) - 1;
+ if (NULL != strstr (&keyword[1], " "))
n += 2;
}
ret = GNUNET_malloc (n);
@@ -309,14 +309,14 @@
for (i = 0; i < keywordCount; i++)
{
keyword = keywords[i];
- if (NULL != strstr (keyword, " "))
+ if (NULL != strstr (&keyword[1], " "))
{
strcat (ret, "\"");
- strcat (ret, keyword);
+ strcat (ret, &keyword[1]);
strcat (ret, "\"");
}
else
- strcat (ret, keyword);
+ strcat (ret, &keyword[1]);
}
return ret;
}
@@ -358,6 +358,7 @@
out[wpos++] = out[rpos++];
}
}
+ out[wpos] = '\0';
if (out[0] == '+')
{
ret = GNUNET_strdup (out);
@@ -821,7 +822,7 @@
{
keyword = uri->data.ksk.keywords[i];
/* first character of keyword indicates
- if it is mandator or not */
+ if it is mandatory or not */
if (GNUNET_OK != iterator (&keyword[1], keyword[0] == '+', cls))
return i;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6901 - GNUnet/src/applications/fs/ecrs,
gnunet <=