[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6783 - in GNUnet: . src/applications/chat src/applications
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6783 - in GNUnet: . src/applications/chat src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/stats src/applications/testing src/include src/server src/transports src/util/os |
Date: |
Tue, 6 May 2008 04:51:43 -0600 (MDT) |
Author: grothoff
Date: 2008-05-06 04:51:43 -0600 (Tue, 06 May 2008)
New Revision: 6783
Modified:
GNUnet/src/applications/chat/chattest.c
GNUnet/src/applications/chat/gnunet-chat.c
GNUnet/src/applications/fs/ecrs/directory.c
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/ecrs.h
GNUnet/src/applications/fs/ecrs/searchtest.c
GNUnet/src/applications/fs/ecrs/tree.c
GNUnet/src/applications/fs/ecrs/tree.h
GNUnet/src/applications/fs/ecrs/unindex.c
GNUnet/src/applications/fs/ecrs/upload.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/fsui/recursivetest.c
GNUnet/src/applications/fs/gap/anonymity.c
GNUnet/src/applications/fs/gap/fs.c
GNUnet/src/applications/fs/gap/fs_dht.c
GNUnet/src/applications/fs/gap/gap.c
GNUnet/src/applications/fs/gap/migration.c
GNUnet/src/applications/fs/gap/plan.c
GNUnet/src/applications/fs/gap/querymanager.c
GNUnet/src/applications/fs/gap/shared.c
GNUnet/src/applications/stats/statistics.c
GNUnet/src/applications/testing/remote.c
GNUnet/src/applications/testing/remotetopologies.c
GNUnet/src/include/fs.h
GNUnet/src/include/gnunet_ecrs_lib.h
GNUnet/src/server/core.c
GNUnet/src/server/gnunet-peer-info.c
GNUnet/src/server/tcpserver.c
GNUnet/src/transports/http.c
GNUnet/src/transports/smtp.c
GNUnet/src/transports/tcp.c
GNUnet/src/transports/udp.c
GNUnet/src/util/os/priority.c
GNUnet/todo
Log:
cleaning up constants
Modified: GNUnet/src/applications/chat/chattest.c
===================================================================
--- GNUnet/src/applications/chat/chattest.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/chat/chattest.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -93,9 +93,9 @@
int
main (int argc, char **argv)
{
- struct GNUNET_TESTING_DaemonContext *peers;
+ struct GNUNET_TESTING_DaemonContext *peers;
int ret;
-
+
pid_t daemon1;
GNUNET_PeerIdentity p1;
char *c1 = NULL;
@@ -106,13 +106,13 @@
GNUNET_RSA_PublicKey me;
struct GNUNET_RSA_PrivateKey *key = NULL;
-
+
key = GNUNET_RSA_create_key ();
GNUNET_RSA_get_public_key (key, &me);
-
+
ret = 0;
-
-
+
+
cfg = GNUNET_GC_create ();
if (-1 == GNUNET_GC_parse_configuration (cfg, "check.conf"))
{
@@ -120,7 +120,7 @@
return -1;
}
#if START_PEERS
-peers = GNUNET_TESTING_start_daemons ("tcp",
+ peers = GNUNET_TESTING_start_daemons ("tcp",
"chat stats",
"/tmp/gnunet-chat-test/",
2087, 10, 1);
@@ -138,29 +138,32 @@
&receive_callback1, NULL, &member_list_callback1,
NULL);
- r2 = GNUNET_CHAT_join_room (NULL, cfg, "nicktest2", "testroom", &me, key, "",
- &receive_callback2, NULL, &member_list_callback2,
- NULL);
-
- GNUNET_CHAT_send_message (r1, "test message 1", NULL, NULL,
GNUNET_CHAT_MSG_OPTION_NONE, NULL);
-
- GNUNET_CHAT_send_message (r2, "test message 2", NULL, NULL,
GNUNET_CHAT_MSG_OPTION_NONE, NULL);
-
- if (r1 != NULL)
- GNUNET_CHAT_leave_room (r1);
- if (r2 != NULL)
- GNUNET_CHAT_leave_room (r2);
+ r2 =
+ GNUNET_CHAT_join_room (NULL, cfg, "nicktest2", "testroom", &me, key, "",
+ &receive_callback2, NULL, &member_list_callback2,
+ NULL);
+ GNUNET_CHAT_send_message (r1, "test message 1", NULL, NULL,
+ GNUNET_CHAT_MSG_OPTION_NONE, NULL);
+ GNUNET_CHAT_send_message (r2, "test message 2", NULL, NULL,
+ GNUNET_CHAT_MSG_OPTION_NONE, NULL);
+ if (r1 != NULL)
+ GNUNET_CHAT_leave_room (r1);
+ if (r2 != NULL)
+ GNUNET_CHAT_leave_room (r2);
+
+
+
#if START_PEERS
- GNUNET_TESTING_stop_daemons (peers);
+ GNUNET_TESTING_stop_daemons (peers);
#endif
//GNUNET_shutdown_wait_for ();
GNUNET_GC_free (cfg);
-
-
- return 0;
+
+
+ return 0;
}
/* end of chattest.c */
Modified: GNUnet/src/applications/chat/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/gnunet-chat.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/chat/gnunet-chat.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -153,8 +153,8 @@
return -1;
}
-
-
+
+
my_priv = NULL;
my_priv = GNUNET_CHAT_initPrivateKey (ectx, cfg, room_name, &my_pub);
if (my_priv == NULL)
Modified: GNUnet/src/applications/fs/ecrs/directory.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directory.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/directory.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -27,6 +27,7 @@
#include "platform.h"
#include "gnunet_ecrs_lib.h"
#include "ecrs.h"
+#include "fs.h"
/**
* Iterate over all entries in a directory. Note that directories
@@ -92,11 +93,12 @@
{
/* URI is never empty, must be end of block,
skip to next alignment */
- align = ((pos / BLOCK_ALIGN_SIZE) + 1) * BLOCK_ALIGN_SIZE;
+ align =
+ ((pos / GNUNET_ECRS_DBLOCK_SIZE) + 1) * GNUNET_ECRS_DBLOCK_SIZE;
if (align == pos)
{
/* if we were already aligned, still skip a block! */
- align += BLOCK_ALIGN_SIZE;
+ align += GNUNET_ECRS_DBLOCK_SIZE;
}
pos = align;
if (pos >= len)
@@ -155,14 +157,14 @@
/**
* Given the start and end position of a block of
* data, return the end position of that data
- * after alignment to the BLOCK_ALIGN_SIZE.
+ * after alignment to the GNUNET_ECRS_DBLOCK_SIZE.
*/
static unsigned long long
do_align (unsigned long long start_position, unsigned long long end_position)
{
unsigned long long align;
- align = (end_position / BLOCK_ALIGN_SIZE) * BLOCK_ALIGN_SIZE;
+ align = (end_position / GNUNET_ECRS_DBLOCK_SIZE) * GNUNET_ECRS_DBLOCK_SIZE;
if ((start_position < align) && (end_position > align))
return align + end_position - start_position;
return end_position;
@@ -201,25 +203,28 @@
{
cval = perm[j];
cend = cpos + sizes[cval];
- if (cpos % BLOCK_ALIGN_SIZE == 0)
+ if (cpos % GNUNET_ECRS_DBLOCK_SIZE == 0)
{
/* prefer placing the largest blocks first */
- cbad = -(cend % BLOCK_ALIGN_SIZE);
+ cbad = -(cend % GNUNET_ECRS_DBLOCK_SIZE);
}
else
{
- if (cpos / BLOCK_ALIGN_SIZE == cend / BLOCK_ALIGN_SIZE)
+ if (cpos / GNUNET_ECRS_DBLOCK_SIZE ==
+ cend / GNUNET_ECRS_DBLOCK_SIZE)
{
/* Data fits into the same block! Prefer small left-overs! */
- cbad = BLOCK_ALIGN_SIZE - cend % BLOCK_ALIGN_SIZE;
+ cbad =
+ GNUNET_ECRS_DBLOCK_SIZE - cend % GNUNET_ECRS_DBLOCK_SIZE;
}
else
{
/* Would have to waste space to re-align, add big factor,
this
case is a real loss (proportional to space wasted)! */
cbad =
- BLOCK_ALIGN_SIZE * (BLOCK_ALIGN_SIZE -
- cpos % BLOCK_ALIGN_SIZE);
+ GNUNET_ECRS_DBLOCK_SIZE * (GNUNET_ECRS_DBLOCK_SIZE -
+ cpos %
+ GNUNET_ECRS_DBLOCK_SIZE);
}
}
if (cbad < badness)
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/download.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -30,6 +30,7 @@
#include "gnunet_identity_lib.h"
#include "ecrs_core.h"
#include "ecrs.h"
+#include "fs.h"
#include "tree.h"
#define DEBUG_DOWNLOAD GNUNET_NO
@@ -366,7 +367,7 @@
GNUNET_GE_ASSERT (node->ctx->ectx, node->offset < node->ctx->total);
if (node->level == 0)
{
- ret = DBLOCK_SIZE;
+ ret = GNUNET_ECRS_DBLOCK_SIZE;
if (node->offset + (unsigned long long) ret > node->ctx->total)
ret = (unsigned int) (node->ctx->total - node->offset);
#if DEBUG_DOWNLOAD
@@ -377,11 +378,11 @@
#endif
return ret;
}
- rsize = DBLOCK_SIZE;
+ rsize = GNUNET_ECRS_DBLOCK_SIZE;
for (i = 0; i < node->level - 1; i++)
- rsize *= CHK_PER_INODE;
+ rsize *= GNUNET_ECRS_CHK_PER_INODE;
spos = rsize * (node->offset / sizeof (GNUNET_EC_ContentHashKey));
- epos = spos + rsize * CHK_PER_INODE;
+ epos = spos + rsize * GNUNET_ECRS_CHK_PER_INODE;
if (epos > node->ctx->total)
epos = node->ctx->total;
ret = (epos - spos) / rsize;
@@ -507,14 +508,16 @@
}
if (node->level == 1)
{
- levelSize = DBLOCK_SIZE;
+ levelSize = GNUNET_ECRS_DBLOCK_SIZE;
baseOffset =
- node->offset / sizeof (GNUNET_EC_ContentHashKey) * DBLOCK_SIZE;
+ node->offset / sizeof (GNUNET_EC_ContentHashKey) *
+ GNUNET_ECRS_DBLOCK_SIZE;
}
else
{
- levelSize = sizeof (GNUNET_EC_ContentHashKey) * CHK_PER_INODE;
- baseOffset = node->offset * CHK_PER_INODE;
+ levelSize =
+ sizeof (GNUNET_EC_ContentHashKey) * GNUNET_ECRS_CHK_PER_INODE;
+ baseOffset = node->offset * GNUNET_ECRS_CHK_PER_INODE;
}
chks = (const GNUNET_EC_ContentHashKey *) data;
for (i = 0; i < childcount; i++)
@@ -526,7 +529,7 @@
GNUNET_GE_ASSERT (ectx, child->offset < node->ctx->total);
child->level = node->level - 1;
GNUNET_GE_ASSERT (ectx, (child->level != 0) ||
- ((child->offset % DBLOCK_SIZE) == 0));
+ ((child->offset % GNUNET_ECRS_DBLOCK_SIZE) == 0));
if (GNUNET_NO == check_node_present (child))
add_request (child);
else
Modified: GNUnet/src/applications/fs/ecrs/ecrs.h
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrs.h 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/ecrs.h 2008-05-06 10:51:43 UTC (rev
6783)
@@ -43,8 +43,6 @@
#define SBLOCK_UPDATE_NONE GNUNET_ECRS_SBLOCK_UPDATE_NONE
-#define BLOCK_ALIGN_SIZE (DBLOCK_SIZE)
-
typedef struct Location
{
/**
Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c 2008-05-06 10:41:11 UTC
(rev 6782)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c 2008-05-06 10:51:43 UTC
(rev 6783)
@@ -57,7 +57,7 @@
#endif
(*cnt)--;
if (0 == *cnt)
- return GNUNET_SYSERR; /* abort search */
+ return GNUNET_SYSERR; /* abort search */
return GNUNET_OK;
}
Modified: GNUnet/src/applications/fs/ecrs/tree.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/tree.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/tree.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -20,6 +20,7 @@
#include "platform.h"
#include "gnunet_util.h"
+#include "fs.h"
#include "tree.h"
/**
@@ -33,19 +34,19 @@
unsigned int treeDepth;
unsigned long long fl;
- GNUNET_GE_ASSERT (NULL, DBLOCK_SIZE < GNUNET_MAX_BUFFER_SIZE);
- GNUNET_GE_ASSERT (NULL, IBLOCK_SIZE < GNUNET_MAX_BUFFER_SIZE);
+ GNUNET_GE_ASSERT (NULL, GNUNET_ECRS_DBLOCK_SIZE < GNUNET_MAX_BUFFER_SIZE);
+ GNUNET_GE_ASSERT (NULL, GNUNET_ECRS_IBLOCK_SIZE < GNUNET_MAX_BUFFER_SIZE);
treeDepth = 0;
- fl = DBLOCK_SIZE;
+ fl = GNUNET_ECRS_DBLOCK_SIZE;
while (fl < flen)
{
treeDepth++;
- if (fl * CHK_PER_INODE < fl)
+ if (fl * GNUNET_ECRS_CHK_PER_INODE < fl)
{
/* integer overflow, this is a HUGE file... */
return treeDepth;
}
- fl = fl * CHK_PER_INODE;
+ fl = fl * GNUNET_ECRS_CHK_PER_INODE;
}
return treeDepth;
}
Modified: GNUnet/src/applications/fs/ecrs/tree.h
===================================================================
--- GNUnet/src/applications/fs/ecrs/tree.h 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/tree.h 2008-05-06 10:51:43 UTC (rev
6783)
@@ -24,28 +24,6 @@
#include "ecrs_core.h"
/**
- * Size of a GNUNET_EC_DBlock. Should be a multiple of 8 and larger than
- * sizeof(GNUNET_EC_ContentHashKey).
- */
-#define DBLOCK_SIZE (GNUNET_ECRS_DBLOCK_SIZE)
-
-/**
- * Pick a multiple of 2 here to achive 8-byte alignment!
- * We also probably want DBlocks to have (roughly) the
- * same size as IBlocks. With SHA-512, the optimal
- * value is 32768 byte / 128 byte = 256
- * (128 byte = 2 * 512 bits).
- */
-#define CHK_PER_INODE 256
-
-/**
- * You cannot change this one (directly). Ideally
- * CHK_PER_INODE is chosen such that
- * IBLOCK_SIZE == DBLOCK_SIZE.
- */
-#define IBLOCK_SIZE (CHK_PER_INODE * sizeof(GNUNET_EC_ContentHashKey))
-
-/**
* Compute the depth of the tree.
* @param flen file length for which to compute the depth
* @return depth of the tree
Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/unindex.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -67,7 +67,7 @@
present =
(size - sizeof (GNUNET_EC_DBlock)) / sizeof (GNUNET_EC_ContentHashKey);
db = (GNUNET_EC_DBlock *) & iblocks[level][1];
- if (present == CHK_PER_INODE)
+ if (present == GNUNET_ECRS_CHK_PER_INODE)
{
GNUNET_EC_file_block_get_key (db, size, &ichk.key);
GNUNET_EC_file_block_get_query (db, size, &ichk.query);
@@ -232,10 +232,10 @@
return GNUNET_SYSERR;
}
dblock =
- GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + DBLOCK_SIZE +
+ GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + GNUNET_ECRS_DBLOCK_SIZE +
sizeof (GNUNET_EC_DBlock));
dblock->size =
- htonl (sizeof (GNUNET_DatastoreValue) + DBLOCK_SIZE +
+ htonl (sizeof (GNUNET_DatastoreValue) + GNUNET_ECRS_DBLOCK_SIZE +
sizeof (GNUNET_EC_DBlock));
dblock->anonymity_level = htonl (0);
dblock->priority = htonl (0);
@@ -248,8 +248,8 @@
for (i = 0; i <= treedepth; i++)
{
iblocks[i] =
- GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + IBLOCK_SIZE +
- sizeof (GNUNET_EC_DBlock));
+ GNUNET_malloc (sizeof (GNUNET_DatastoreValue) +
+ GNUNET_ECRS_IBLOCK_SIZE + sizeof (GNUNET_EC_DBlock));
iblocks[i]->size =
htonl (sizeof (GNUNET_DatastoreValue) + sizeof (GNUNET_EC_DBlock));
iblocks[i]->anonymity_level = htonl (0);
@@ -268,11 +268,11 @@
if (tt != NULL)
if (GNUNET_OK != tt (ttClosure))
goto FAILURE;
- size = DBLOCK_SIZE;
+ size = GNUNET_ECRS_DBLOCK_SIZE;
if (size > filesize - pos)
{
size = filesize - pos;
- memset (&db[1], 0, DBLOCK_SIZE);
+ memset (&db[1], 0, GNUNET_ECRS_DBLOCK_SIZE);
}
dblock->size =
htonl (sizeof (GNUNET_DatastoreValue) + size +
@@ -361,7 +361,8 @@
{
if (GNUNET_OK == undoSymlinking (ectx, filename, &fileId, sock))
{
- if (GNUNET_OK != GNUNET_FS_unindex (sock, DBLOCK_SIZE, &fileId))
+ if (GNUNET_OK !=
+ GNUNET_FS_unindex (sock, GNUNET_ECRS_DBLOCK_SIZE, &fileId))
{
GNUNET_GE_BREAK (ectx, 0);
goto FAILURE;
Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/ecrs/upload.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -35,6 +35,7 @@
#include "gnunet_protocols.h"
#include "ecrs.h"
#include "ecrs_core.h"
+#include "fs.h"
#include "uri.h"
#include "tree.h"
@@ -62,11 +63,13 @@
size = ntohl (iblocks[level]->size);
GNUNET_GE_ASSERT (NULL, size > sizeof (GNUNET_DatastoreValue));
size -= sizeof (GNUNET_DatastoreValue);
- GNUNET_GE_ASSERT (NULL, size - sizeof (GNUNET_EC_DBlock) <= IBLOCK_SIZE);
+ GNUNET_GE_ASSERT (NULL,
+ size - sizeof (GNUNET_EC_DBlock) <=
+ GNUNET_ECRS_IBLOCK_SIZE);
present =
(size - sizeof (GNUNET_EC_DBlock)) / sizeof (GNUNET_EC_ContentHashKey);
db = (GNUNET_EC_DBlock *) & iblocks[level][1];
- if (present == CHK_PER_INODE)
+ if (present == GNUNET_ECRS_CHK_PER_INODE)
{
GNUNET_EC_file_block_get_key (db, size, &ichk.key);
GNUNET_EC_file_block_get_query (db, size, &ichk.query);
@@ -230,10 +233,10 @@
}
dblock =
- GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + DBLOCK_SIZE +
+ GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + GNUNET_ECRS_DBLOCK_SIZE +
sizeof (GNUNET_EC_DBlock));
dblock->size =
- htonl (sizeof (GNUNET_DatastoreValue) + DBLOCK_SIZE +
+ htonl (sizeof (GNUNET_DatastoreValue) + GNUNET_ECRS_DBLOCK_SIZE +
sizeof (GNUNET_EC_DBlock));
dblock->anonymity_level = htonl (anonymityLevel);
dblock->priority = htonl (priority);
@@ -246,8 +249,8 @@
for (i = 0; i <= treedepth; i++)
{
iblocks[i] =
- GNUNET_malloc (sizeof (GNUNET_DatastoreValue) + IBLOCK_SIZE +
- sizeof (GNUNET_EC_DBlock));
+ GNUNET_malloc (sizeof (GNUNET_DatastoreValue) +
+ GNUNET_ECRS_IBLOCK_SIZE + sizeof (GNUNET_EC_DBlock));
iblocks[i]->size =
htonl (sizeof (GNUNET_DatastoreValue) + sizeof (GNUNET_EC_DBlock));
iblocks[i]->anonymity_level = htonl (anonymityLevel);
@@ -266,11 +269,11 @@
if (tt != NULL)
if (GNUNET_OK != tt (ttClosure))
goto FAILURE;
- size = DBLOCK_SIZE;
+ size = GNUNET_ECRS_DBLOCK_SIZE;
if (size > filesize - pos)
{
size = filesize - pos;
- memset (&db[1], 0, DBLOCK_SIZE);
+ memset (&db[1], 0, GNUNET_ECRS_DBLOCK_SIZE);
}
GNUNET_GE_ASSERT (ectx,
sizeof (GNUNET_DatastoreValue) + size +
@@ -306,9 +309,9 @@
GNUNET_GE_LOG (ectx,
GNUNET_GE_ERROR | GNUNET_GE_BULK |
GNUNET_GE_USER,
- _("Indexing data of file `%s' failed at position
%llu.\n"),
- filename,
- pos);
+ _
+ ("Indexing data of file `%s' failed at position
%llu.\n"),
+ filename, pos);
goto FAILURE;
}
}
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -28,6 +28,7 @@
#include "gnunet_fsui_lib.h"
#include "gnunet_directories.h"
#include "fsui.h"
+#include "fs.h"
#define DEBUG_PERSISTENCE GNUNET_NO
@@ -47,15 +48,16 @@
* We just set the flag to notify the cron in
* the next iteration.
*/
-static void
-test_download_progress(unsigned long long totalBytes,
- unsigned long long completedBytes,
- GNUNET_CronTime eta,
- unsigned long long lastBlockOffset,
- const char *lastBlock, unsigned int lastBlockSize,
- void *closure) {
- struct SearchResultList * srl = closure;
- if (lastBlockSize > 0) /* check against IBlock events */
+static void
+test_download_progress (unsigned long long totalBytes,
+ unsigned long long completedBytes,
+ GNUNET_CronTime eta,
+ unsigned long long lastBlockOffset,
+ const char *lastBlock, unsigned int lastBlockSize,
+ void *closure)
+{
+ struct SearchResultList *srl = closure;
+ if (lastBlockSize > 0) /* check against IBlock events */
srl->test_download_start_time = 0;
}
@@ -67,9 +69,9 @@
updateDownloadThreads (void *c)
{
GNUNET_FSUI_Context *ctx = c;
- GNUNET_FSUI_DownloadList *dpos;
- struct SearchResultList * srl;
- struct GNUNET_FSUI_SearchList * sl;
+ GNUNET_FSUI_DownloadList *dpos;
+ struct SearchResultList *srl;
+ struct GNUNET_FSUI_SearchList *sl;
unsigned long long off;
unsigned long long len;
GNUNET_CronTime now;
@@ -88,96 +90,106 @@
GNUNET_FSUI_updateDownloadThread (dpos);
dpos = dpos->next;
}
- now = GNUNET_get_time();
+ now = GNUNET_get_time ();
sl = ctx->activeSearches;
while (sl != NULL)
- {
- GNUNET_mutex_lock(sl->lock);
+ {
+ GNUNET_mutex_lock (sl->lock);
srl = sl->resultsReceived;
while (srl != NULL)
- {
- if (srl->test_download != NULL)
- {
- if (srl->test_download_start_time == 0)
- {
- /* probe was successful, kill */
- GNUNET_ECRS_file_download_partial_stop (srl->test_download);
- srl->test_download = NULL;
- srl->probeSuccess++;
- event.type = GNUNET_FSUI_search_update;
- event.data.SearchUpdate.sc.pos = sl;
- event.data.SearchUpdate.sc.cctx = sl->cctx;
- event.data.SearchUpdate.fi = srl->fi;
- event.data.SearchUpdate.searchURI = sl->uri;
- event.data.SearchUpdate.availability_rank = srl->probeSuccess
- srl->probeFailure;
- event.data.SearchUpdate.applicability_rank =
srl->matchingSearchCount;
- ctx->ecb(ctx->ecbClosure, &event);
- ctx->active_probes--;
- srl->last_probe_time = now;
- }
- else
- {
- /* consider stopping */
- if ( (now - srl->test_download_start_time)
- > SQUARE(srl->probeSuccess + srl->probeFailure + 1) *
GNUNET_FSUI_PROBE_TIME_FACTOR)
- {
- /* timeout hit! */
- GNUNET_ECRS_file_download_partial_stop
(srl->test_download);
- srl->test_download = NULL;
- srl->probeFailure++;
- event.type = GNUNET_FSUI_search_update;
- event.data.SearchUpdate.sc.pos = sl;
- event.data.SearchUpdate.sc.cctx = sl->cctx;
- event.data.SearchUpdate.fi = srl->fi;
- event.data.SearchUpdate.searchURI = sl->uri;
- event.data.SearchUpdate.availability_rank =
srl->probeSuccess - srl->probeFailure;
- event.data.SearchUpdate.applicability_rank =
srl->matchingSearchCount;
- ctx->ecb(ctx->ecbClosure, &event);
- ctx->active_probes--;
- srl->last_probe_time = now;
- }
- }
- }
- else
- {
- len = GNUNET_ECRS_uri_get_file_size(srl->fi.uri);
- if (len == 0)
- srl->probeSuccess = -1; /* MAX */
- /* consider starting */
- if ( ( (srl->probeSuccess + srl->probeFailure) <
GNUNET_FSUI_MAX_PROBES) &&
- ( (srl->last_probe_time <
- now
- + GNUNET_FSUI_PROBE_DELAY * SQUARE(ctx->active_probes)
- + GNUNET_random_u64(GNUNET_RANDOM_QUALITY_WEAK,
GNUNET_FSUI_PROBE_DELAY)) ) &&
- (ctx->active_probes < GNUNET_FSUI_HARD_PROBE_LIMIT) )
- {
- off = len / GNUNET_ECRS_DBLOCK_SIZE;
- if (off > 0)
- off = GNUNET_random_u32(GNUNET_RANDOM_QUALITY_WEAK, off);
- off *= GNUNET_ECRS_DBLOCK_SIZE;
- if (len - off < GNUNET_ECRS_DBLOCK_SIZE)
- len = len - off;
- else
- len = GNUNET_ECRS_DBLOCK_SIZE;
- srl->test_download
- = GNUNET_ECRS_file_download_partial_start (ctx->ectx,
- ctx->cfg,
- srl->fi.uri,
- NULL,
- off,
- len,
- 1,
- GNUNET_YES,
-
&test_download_progress,
- srl);
- srl->test_download_start_time = now;
- ctx->active_probes++;
- }
- }
+ {
+ if (srl->test_download != NULL)
+ {
+ if (srl->test_download_start_time == 0)
+ {
+ /* probe was successful, kill */
+ GNUNET_ECRS_file_download_partial_stop (srl->test_download);
+ srl->test_download = NULL;
+ srl->probeSuccess++;
+ event.type = GNUNET_FSUI_search_update;
+ event.data.SearchUpdate.sc.pos = sl;
+ event.data.SearchUpdate.sc.cctx = sl->cctx;
+ event.data.SearchUpdate.fi = srl->fi;
+ event.data.SearchUpdate.searchURI = sl->uri;
+ event.data.SearchUpdate.availability_rank =
+ srl->probeSuccess - srl->probeFailure;
+ event.data.SearchUpdate.applicability_rank =
+ srl->matchingSearchCount;
+ ctx->ecb (ctx->ecbClosure, &event);
+ ctx->active_probes--;
+ srl->last_probe_time = now;
+ }
+ else
+ {
+ /* consider stopping */
+ if ((now - srl->test_download_start_time)
+ >
+ SQUARE (srl->probeSuccess + srl->probeFailure +
+ 1) * GNUNET_FSUI_PROBE_TIME_FACTOR)
+ {
+ /* timeout hit! */
+ GNUNET_ECRS_file_download_partial_stop (srl->
+ test_download);
+ srl->test_download = NULL;
+ srl->probeFailure++;
+ event.type = GNUNET_FSUI_search_update;
+ event.data.SearchUpdate.sc.pos = sl;
+ event.data.SearchUpdate.sc.cctx = sl->cctx;
+ event.data.SearchUpdate.fi = srl->fi;
+ event.data.SearchUpdate.searchURI = sl->uri;
+ event.data.SearchUpdate.availability_rank =
+ srl->probeSuccess - srl->probeFailure;
+ event.data.SearchUpdate.applicability_rank =
+ srl->matchingSearchCount;
+ ctx->ecb (ctx->ecbClosure, &event);
+ ctx->active_probes--;
+ srl->last_probe_time = now;
+ }
+ }
+ }
+ else
+ {
+ len = GNUNET_ECRS_uri_get_file_size (srl->fi.uri);
+ if (len == 0)
+ srl->probeSuccess = -1; /* MAX */
+ /* consider starting */
+ if (((srl->probeSuccess + srl->probeFailure) <
+ GNUNET_FSUI_MAX_PROBES)
+ &&
+ ((srl->last_probe_time <
+ now +
+ GNUNET_FSUI_PROBE_DELAY * SQUARE (ctx->active_probes) +
+ GNUNET_random_u64 (GNUNET_RANDOM_QUALITY_WEAK,
+ GNUNET_FSUI_PROBE_DELAY)))
+ && (ctx->active_probes < GNUNET_FSUI_HARD_PROBE_LIMIT))
+ {
+ off = len / GNUNET_ECRS_DBLOCK_SIZE;
+ if (off > 0)
+ off = GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, off);
+ off *= GNUNET_ECRS_DBLOCK_SIZE;
+ if (len - off < GNUNET_ECRS_DBLOCK_SIZE)
+ len = len - off;
+ else
+ len = GNUNET_ECRS_DBLOCK_SIZE;
+ srl->test_download
+ = GNUNET_ECRS_file_download_partial_start (ctx->ectx,
+ ctx->cfg,
+ srl->fi.uri,
+ NULL,
+ off,
+ len,
+ 1,
+ GNUNET_YES,
+
&test_download_progress,
+ srl);
+ srl->test_download_start_time = now;
+ ctx->active_probes++;
+ }
+ }
- srl = srl->next;
- }
- GNUNET_mutex_unlock(sl->lock);
+ srl = srl->next;
+ }
+ GNUNET_mutex_unlock (sl->lock);
sl = sl->next;
}
GNUNET_mutex_unlock (ctx->lock);
Modified: GNUnet/src/applications/fs/fsui/recursivetest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/recursivetest.c 2008-05-06 10:41:11 UTC
(rev 6782)
+++ GNUnet/src/applications/fs/fsui/recursivetest.c 2008-05-06 10:51:43 UTC
(rev 6783)
@@ -172,7 +172,7 @@
break;
case GNUNET_FSUI_search_result:
if (upURI == NULL)
- break;
+ break;
if (download == NULL)
{
char *u;
@@ -218,13 +218,13 @@
upURI = GNUNET_ECRS_uri_duplicate (event->data.UploadCompleted.uri);
#if DEBUG_VERBOSE
printf ("Upload of `%s' complete.\n",
- event->data.UploadCompleted.filename);
+ event->data.UploadCompleted.filename);
#endif
break;
case GNUNET_FSUI_download_completed:
#if DEBUG_VERBOSE
printf ("Download of `%s' complete.\n",
- event->data.DownloadCompleted.filename);
+ event->data.DownloadCompleted.filename);
#endif
if (checkHierarchy (43, DIRECTORY_TREE_SPEC) == GNUNET_OK)
search_done = 1;
@@ -249,16 +249,16 @@
#endif
break;
case GNUNET_FSUI_unindex_error:
- fprintf (stderr, "Error unindexing: %s\n",
- event->data.UnindexError.message);
+ fprintf (stderr, "Error unindexing: %s\n",
+ event->data.UnindexError.message);
break;
case GNUNET_FSUI_upload_error:
- fprintf (stderr, "Error uploading: %s\n",
- event->data.UploadError.message);
+ fprintf (stderr, "Error uploading: %s\n",
+ event->data.UploadError.message);
break;
case GNUNET_FSUI_download_error:
- fprintf (stderr, "Error downloading: %s\n",
- event->data.DownloadError.message);
+ fprintf (stderr, "Error downloading: %s\n",
+ event->data.DownloadError.message);
break;
case GNUNET_FSUI_download_aborted:
#if DEBUG_VERBOSE
Modified: GNUnet/src/applications/fs/gap/anonymity.c
===================================================================
--- GNUnet/src/applications/fs/gap/anonymity.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/anonymity.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -46,7 +46,7 @@
level--;
if (traffic == NULL)
return GNUNET_SYSERR;
- if (GNUNET_OK != traffic->get (5 * GNUNET_CRON_SECONDS /
GNUNET_TRAFFIC_TIME_UNIT, /* TTL_DECREMENT/TTU */
+ if (GNUNET_OK != traffic->get (5 * GNUNET_CRON_SECONDS /
GNUNET_TRAFFIC_TIME_UNIT, /* GNUNET_GAP_TTL_DECREMENT/TTU */
content_type,
GNUNET_TRAFFIC_TYPE_RECEIVED, &count, &peers,
&sizes, &timevect))
Modified: GNUnet/src/applications/fs/gap/fs.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/applications/fs/gap/fs.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -413,7 +413,7 @@
unsigned int type;
int ret;
- if (cls->processed > MAX_SYNC_PROCESSED)
+ if (cls->processed > GNUNET_GAP_MAX_SYNC_PROCESSED)
{
cls->have_more = GNUNET_YES;
return GNUNET_SYSERR;
@@ -595,7 +595,8 @@
prio = ntohl (req->priority);
netLoad =
GNUNET_network_monitor_get_load (coreAPI->load_monitor, GNUNET_ND_UPLOAD);
- if ((netLoad == (unsigned int) -1) || (netLoad < GAP_IDLE_LOAD_THRESHOLD))
+ if ((netLoad == (unsigned int) -1)
+ || (netLoad < GNUNET_GAP_IDLE_LOAD_THRESHOLD))
{
prio = 0; /* minimum priority, no charge! */
policy = GNUNET_FS_RoutingPolicy_ALL;
@@ -603,7 +604,7 @@
else
{
prio = -identity->changeHostTrust (sender, -prio);
- if (netLoad < GAP_IDLE_LOAD_THRESHOLD + prio)
+ if (netLoad < GNUNET_GAP_IDLE_LOAD_THRESHOLD + prio)
{
policy = GNUNET_FS_RoutingPolicy_ALL;
}
@@ -631,20 +632,22 @@
/* decrement ttl (always) */
if (ttl < 0)
{
- ttl -= 2 * TTL_DECREMENT +
- GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, TTL_DECREMENT);
+ ttl -= 2 * GNUNET_GAP_TTL_DECREMENT +
+ GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
+ GNUNET_GAP_TTL_DECREMENT);
if (ttl > 0)
/* integer underflow => drop (should be very rare)! */
return GNUNET_OK;
}
else
{
- ttl -= 2 * TTL_DECREMENT +
- GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, TTL_DECREMENT);
+ ttl -= 2 * GNUNET_GAP_TTL_DECREMENT +
+ GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
+ GNUNET_GAP_TTL_DECREMENT);
}
preference = (double) prio;
- if (preference < QUERY_BANDWIDTH_VALUE)
- preference = QUERY_BANDWIDTH_VALUE;
+ if (preference < GNUNET_GAP_QUERY_BANDWIDTH_VALUE)
+ preference = GNUNET_GAP_QUERY_BANDWIDTH_VALUE;
coreAPI->p2p_connection_preference_increase (sender, preference);
GNUNET_FS_GAP_execute_query (sender,
prio,
@@ -730,8 +733,8 @@
if (stats != NULL)
stats->change (stat_gap_trust_awarded, prio);
preference = (double) prio;
- if (preference < CONTENT_BANDWIDTH_VALUE)
- preference = CONTENT_BANDWIDTH_VALUE;
+ if (preference < GNUNET_GAP_CONTENT_BANDWIDTH_VALUE)
+ preference = GNUNET_GAP_CONTENT_BANDWIDTH_VALUE;
coreAPI->p2p_connection_preference_increase (sender, preference);
}
return GNUNET_OK;
Modified: GNUnet/src/applications/fs/gap/fs_dht.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs_dht.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/fs_dht.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -175,7 +175,7 @@
return;
now = GNUNET_get_time ();
record = GNUNET_malloc (sizeof (struct ActiveRequestRecords));
- record->end_time = now + MAX_DHT_DELAY;
+ record->end_time = now + GNUNET_GAP_MAX_DHT_DELAY;
record->handle = dht->get_start (type, query, &response_callback, record);
record->type = type;
GNUNET_mutex_lock (GNUNET_FS_lock);
Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/gap.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -159,7 +159,7 @@
if (cls->iteration_count > 10 * (1 + req->value))
{
if (cls->result_count > 0)
- req->have_more += HAVE_MORE_INCREMENT;
+ req->have_more += GNUNET_GAP_HAVE_MORE_INCREMENT;
want_more = GNUNET_SYSERR;
}
enc = NULL;
@@ -184,7 +184,7 @@
et -= now;
else
et = 0;
- et %= MAX_MIGRATION_EXP;
+ et %= GNUNET_GAP_MAX_MIGRATION_EXP;
size =
sizeof (P2P_gap_reply_MESSAGE) + ntohl (value->size) -
sizeof (GNUNET_DatastoreValue);
@@ -197,7 +197,7 @@
cls->result_count++;
if (cls->result_count > 2 * (1 + req->value))
{
- req->have_more += HAVE_MORE_INCREMENT;
+ req->have_more += GNUNET_GAP_HAVE_MORE_INCREMENT;
want_more = GNUNET_SYSERR;
}
if (stats != NULL)
@@ -209,7 +209,7 @@
GNUNET_cron_add_job (cron,
send_delayed,
GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
- TTL_DECREMENT), 0, msg);
+ GNUNET_GAP_TTL_DECREMENT), 0, msg);
ret =
(ntohl (value->type) ==
GNUNET_ECRS_BLOCKTYPE_DATA) ? GNUNET_SYSERR : want_more;
@@ -316,7 +316,7 @@
rl->bloomfilter = GNUNET_bloomfilter_init (coreAPI->ectx,
bloomfilter_data,
filter_size,
- GAP_BLOOMFILTER_K);
+
GNUNET_GAP_BLOOMFILTER_K);
else
rl->bloomfilter = NULL;
GNUNET_FS_PT_change_rc (peer, -1);
@@ -370,7 +370,7 @@
rl->bloomfilter = GNUNET_bloomfilter_init (coreAPI->ectx,
bloomfilter_data,
filter_size,
- GAP_BLOOMFILTER_K);
+ GNUNET_GAP_BLOOMFILTER_K);
}
rl->anonymityLevel = 1;
rl->type = type;
@@ -476,8 +476,10 @@
memcpy (&msg[1], data, size);
coreAPI->ciphertext_send (&target,
&msg->header,
- BASE_REPLY_PRIORITY * (1 + rl->value),
- MAX_GAP_DELAY);
+ GNUNET_GAP_BASE_REPLY_PRIORITY * (1 +
+ rl->
+ value),
+ GNUNET_GAP_MAX_GAP_DELAY);
GNUNET_free (msg);
if (stats != NULL)
{
@@ -641,11 +643,11 @@
if (-1 ==
GNUNET_GC_get_configuration_value_number (coreAPI->cfg, "GAP",
"TABLESIZE",
- MIN_INDIRECTION_TABLE_SIZE,
+
GNUNET_GAP_MIN_INDIRECTION_TABLE_SIZE,
GNUNET_MAX_GNUNET_malloc_CHECKED
/
sizeof (struct RequestList *),
- MIN_INDIRECTION_TABLE_SIZE,
+
GNUNET_GAP_MIN_INDIRECTION_TABLE_SIZE,
&ts))
return GNUNET_SYSERR;
table_size = ts;
Modified: GNUnet/src/applications/fs/gap/migration.c
===================================================================
--- GNUnet/src/applications/fs/gap/migration.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/migration.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -299,7 +299,7 @@
et -= now;
else
et = 0;
- et %= MAX_MIGRATION_EXP;
+ et %= GNUNET_GAP_MAX_MIGRATION_EXP;
anonymity = ntohl (value->anonymity_level);
ret = 0;
if ((anonymity == 0) ||
Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/plan.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -430,8 +430,8 @@
response was */
history_score
=
- (MAX_GAP_DELAY * history->response_count) / (history->request_count *
- (now - last));
+ (GNUNET_GAP_MAX_GAP_DELAY * history->response_count) /
+ (history->request_count * (now - last));
if (history->response_count == 0)
history_score =
-history->request_count * coreAPI->p2p_connections_iterate (NULL,
@@ -474,16 +474,18 @@
if (ttl < 0)
{
ttl -=
- TTL_DECREMENT + GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
- 2 * TTL_DECREMENT);
+ GNUNET_GAP_TTL_DECREMENT +
+ GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
+ 2 * GNUNET_GAP_TTL_DECREMENT);
if (ttl > 0) /* integer underflow */
ttl = -(1 << 30);
}
else
{
ttl -=
- TTL_DECREMENT + GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
- 2 * TTL_DECREMENT);
+ GNUNET_GAP_TTL_DECREMENT +
+ GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK,
+ 2 * GNUNET_GAP_TTL_DECREMENT);
}
}
ttl = GNUNET_FS_HELPER_bound_ttl (ttl, prio);
Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c 2008-05-06 10:41:11 UTC
(rev 6782)
+++ GNUnet/src/applications/fs/gap/querymanager.c 2008-05-06 10:51:43 UTC
(rev 6783)
@@ -96,7 +96,7 @@
/**
* How many bytes should a bloomfilter be if
* we have already seen entry_count responses?
- * Note that GAP_BLOOMFILTER_K gives us the
+ * Note that GNUNET_GAP_BLOOMFILTER_K gives us the
* number of bits set per entry. Furthermore,
* we should not re-size the filter too often
* (to keep it cheap).
@@ -114,7 +114,7 @@
{
unsigned short size;
unsigned short max = 1 << 15;
- unsigned int ideal = (entry_count * GAP_BLOOMFILTER_K) / 4;
+ unsigned int ideal = (entry_count * GNUNET_GAP_BLOOMFILTER_K) / 4;
if (entry_count > max)
return max;
@@ -162,7 +162,7 @@
request->response_client = client;
request->policy = GNUNET_FS_RoutingPolicy_ALL;
if (have_more != GNUNET_NO)
- request->have_more = HAVE_MORE_INCREMENT;
+ request->have_more = GNUNET_GAP_HAVE_MORE_INCREMENT;
memcpy (&request->queries[0], query, sizeof (GNUNET_HashCode) * key_count);
if (seen != NULL)
{
@@ -178,7 +178,7 @@
GNUNET_random_u32 (GNUNET_RANDOM_QUALITY_WEAK, -1);
request->bloomfilter =
GNUNET_bloomfilter_init (NULL, NULL, request->bloomfilter_size,
- GAP_BLOOMFILTER_K);
+ GNUNET_GAP_BLOOMFILTER_K);
if (stats != NULL)
stats->change (stat_gap_client_bf_updates, 1);
pos = seen;
@@ -212,7 +212,7 @@
if (request->anonymityLevel == 0)
{
request->last_dht_get = GNUNET_get_time ();
- request->dht_back_off = MAX_DHT_DELAY;
+ request->dht_back_off = GNUNET_GAP_MAX_DHT_DELAY;
GNUNET_FS_DHT_execute_query (request->type, &request->queries[0]);
}
GNUNET_mutex_unlock (GNUNET_FS_lock);
@@ -281,7 +281,7 @@
if (ret != GNUNET_OK)
return ret;
if (sender == 0) /* dht produced response */
- rl->dht_back_off = MAX_DHT_DELAY; /* go back! */
+ rl->dht_back_off = GNUNET_GAP_MAX_DHT_DELAY; /* go back! */
/* send to client */
msg = GNUNET_malloc (sizeof (CS_fs_reply_content_MESSAGE) + size);
msg->header.size = htons (sizeof (CS_fs_reply_content_MESSAGE) + size);
@@ -317,7 +317,7 @@
rl->bloomfilter = GNUNET_bloomfilter_init (NULL,
NULL,
rl->bloomfilter_size,
- GAP_BLOOMFILTER_K);
+ GNUNET_GAP_BLOOMFILTER_K);
if (stats != NULL)
stats->change (stat_gap_client_bf_updates, 1);
}
@@ -329,7 +329,7 @@
ic.mingle_number = rl->bloomfilter_mutator;
GNUNET_bloomfilter_resize (rl->bloomfilter,
&response_bf_iterator,
- &ic, bf_size, GAP_BLOOMFILTER_K);
+ &ic, bf_size, GNUNET_GAP_BLOOMFILTER_K);
if (stats != NULL)
stats->change (stat_gap_client_bf_updates, 1);
}
@@ -486,7 +486,7 @@
}
GNUNET_FS_SHARED_mark_response_seen (cls->request, &hc);
cls->processed++;
- if (cls->processed > MAX_ASYNC_PROCESSED)
+ if (cls->processed > GNUNET_GAP_MAX_ASYNC_PROCESSED)
{
cls->have_more = GNUNET_YES;
return GNUNET_SYSERR;
@@ -594,7 +594,7 @@
&have_more_processor, &hmc);
}
if (hmc.have_more)
- request->have_more += HAVE_MORE_INCREMENT;
+ request->have_more += GNUNET_GAP_HAVE_MORE_INCREMENT;
}
else
{
Modified: GNUnet/src/applications/fs/gap/shared.c
===================================================================
--- GNUnet/src/applications/fs/gap/shared.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/fs/gap/shared.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -208,12 +208,13 @@
if (ttl_in <= 0)
return ttl_in;
if (ttl_in >
- ((unsigned long long) prio) * TTL_DECREMENT / GNUNET_CRON_SECONDS)
+ ((unsigned long long) prio) * GNUNET_GAP_TTL_DECREMENT /
+ GNUNET_CRON_SECONDS)
{
- if (((unsigned long long) prio) * TTL_DECREMENT / GNUNET_CRON_SECONDS >=
- (1 << 30))
+ if (((unsigned long long) prio) * GNUNET_GAP_TTL_DECREMENT /
+ GNUNET_CRON_SECONDS >= (1 << 30))
return 1 << 30;
- return (int) ((unsigned long long) prio) * TTL_DECREMENT /
+ return (int) ((unsigned long long) prio) * GNUNET_GAP_TTL_DECREMENT /
GNUNET_CRON_SECONDS;
}
return ttl_in;
Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/stats/statistics.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -225,11 +225,20 @@
initializeStats ()
{
stat_handle_network_load_up
- = statHandle (gettext_noop (/* xgettext:no-c-format */"% of allowed
network load (up)"));
- stat_handle_network_load_down
- = statHandle (gettext_noop (/* xgettext:no-c-format */"% of allowed
network load (down)"));
- stat_handle_cpu_load = statHandle (gettext_noop (/* xgettext:no-c-format
*/"% of allowed cpu load"));
- stat_handle_io_load = statHandle (gettext_noop (/* xgettext:no-c-format */"%
of allowed io load"));
+ =
+ statHandle (gettext_noop
+ ( /* xgettext:no-c-format */
+ "% of allowed network load (up)"));
+ stat_handle_network_load_down =
+ statHandle (gettext_noop
+ ( /* xgettext:no-c-format */
+ "% of allowed network load (down)"));
+ stat_handle_cpu_load =
+ statHandle (gettext_noop
+ ( /* xgettext:no-c-format */ "% of allowed cpu load"));
+ stat_handle_io_load =
+ statHandle (gettext_noop
+ ( /* xgettext:no-c-format */ "% of allowed io load"));
stat_connected = statHandle (gettext_noop ("# of connected peers"));
stat_bytes_noise_received
= statHandle (gettext_noop ("# bytes of noise received"));
Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/applications/testing/remote.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -139,7 +139,7 @@
if (ipk_dir == NULL)
{
ipk_dir = GNUNET_malloc (1);
- strcpy(ipk_dir,"");
+ strcpy (ipk_dir, "");
}
length = snprintf (NULL, 0, "%s%s", ipk_dir, "gnunetd.conf.skel");
data_dir = GNUNET_malloc (length + 1);
@@ -292,10 +292,10 @@
{
temp_pos =
GNUNET_malloc (sizeof (struct GNUNET_REMOTE_host_list));
- temp_pos->hostname = GNUNET_malloc (strlen (curr_host)+1);
+ temp_pos->hostname = GNUNET_malloc (strlen (curr_host) + 1);
strcpy (temp_pos->hostname, curr_host);
- temp_pos->username = GNUNET_malloc (strlen (ssh_username)+1);
+ temp_pos->username = GNUNET_malloc (strlen (ssh_username) + 1);
strcpy (temp_pos->username, ssh_username);
friend_location_length =
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-05-06 10:41:11 UTC
(rev 6782)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-05-06 10:51:43 UTC
(rev 6783)
@@ -358,7 +358,7 @@
h2 = NULL;
while ((ret++ < -1) && (GNUNET_shutdown_test () == GNUNET_NO))
{
-
+
if ((GNUNET_OK == GNUNET_IDENTITY_get_self (sock1,
&h1)) &&
(GNUNET_OK == GNUNET_IDENTITY_get_self (sock2,
@@ -384,15 +384,15 @@
}
GNUNET_thread_sleep (100 * GNUNET_CRON_MILLISECONDS);
}
-
+
}
GNUNET_hash_to_enc (&h1->senderIdentity.hashPubKey, host1entry);
GNUNET_hash_to_enc (&h2->senderIdentity.hashPubKey, host2entry);
- GNUNET_free_non_null (h1);
+ GNUNET_free_non_null (h1);
GNUNET_free_non_null (h2);
-
+
if (ret != GNUNET_OK)
{
fprintf (stderr,
Modified: GNUnet/src/include/fs.h
===================================================================
--- GNUnet/src/include/fs.h 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/include/fs.h 2008-05-06 10:51:43 UTC (rev 6783)
@@ -327,10 +327,14 @@
/* ***************** policy constants **************** */
+/* The constants here are used all over FS. The
+ primary location where the constant is used
+ gives it its prefix */
+
/**
* Bandwidth value of an (effectively) 0-priority query.
*/
-#define QUERY_BANDWIDTH_VALUE 0.001
+#define GNUNET_GAP_QUERY_BANDWIDTH_VALUE 0.001
/**
* Bandwidth value of a 0-priority content (must be
@@ -339,7 +343,7 @@
* since it can take many queries to get one piece of
* content).
*/
-#define CONTENT_BANDWIDTH_VALUE 0.8
+#define GNUNET_GAP_CONTENT_BANDWIDTH_VALUE 0.8
/**
* By which amount do we decrement the TTL for simple forwarding /
@@ -347,25 +351,25 @@
* accordance to your network latency (above the time it'll take you
* to send a packet and get a reply).
*/
-#define TTL_DECREMENT (5 * GNUNET_CRON_SECONDS)
+#define GNUNET_GAP_TTL_DECREMENT (5 * GNUNET_CRON_SECONDS)
/**
* Until which load do we consider the peer idle and do not
* charge at all? (should be larger than GNUNET_IDLE_LOAD_THRESHOLD used
* by the rest of the code)!
*/
-#define GAP_IDLE_LOAD_THRESHOLD ((100 + GNUNET_IDLE_LOAD_THRESHOLD) / 2)
+#define GNUNET_GAP_IDLE_LOAD_THRESHOLD ((100 + GNUNET_IDLE_LOAD_THRESHOLD) / 2)
/**
* How many bits should we have per entry in the
* bloomfilter?
*/
-#define GAP_BLOOMFILTER_K 16
+#define GNUNET_GAP_BLOOMFILTER_K 16
/**
* Minimum size of the GAP routing table.
*/
-#define MIN_INDIRECTION_TABLE_SIZE 4
+#define GNUNET_GAP_MIN_INDIRECTION_TABLE_SIZE 4
/**
@@ -378,20 +382,20 @@
* (note that querymanager multiplies the query priority with 2 to
* compute the scheduling priority).
*/
-#define BASE_REPLY_PRIORITY 4092
+#define GNUNET_GAP_BASE_REPLY_PRIORITY 4092
/**
* What is the maximum time that any peer
* should delay forwarding a response (when
* waiting for bandwidth).
*/
-#define MAX_GAP_DELAY (60 * GNUNET_CRON_SECONDS)
+#define GNUNET_GAP_MAX_GAP_DELAY (60 * GNUNET_CRON_SECONDS)
/**
* How long should DHT requests live?
*/
-#define MAX_DHT_DELAY (60 * GNUNET_CRON_SECONDS)
+#define GNUNET_GAP_MAX_DHT_DELAY (60 * GNUNET_CRON_SECONDS)
/**
@@ -435,7 +439,7 @@
* expiration to give the user some indication about availability.
*
*/
-#define MAX_MIGRATION_EXP (1L * GNUNET_CRON_MONTHS)
+#define GNUNET_GAP_MAX_MIGRATION_EXP (1L * GNUNET_CRON_MONTHS)
/**
* Estimated size of most blocks transported with
@@ -447,20 +451,41 @@
* If, after finding local results, we abort a GET
* iteration, we increment "have_more" by this value.
*/
-#define HAVE_MORE_INCREMENT 16
+#define GNUNET_GAP_HAVE_MORE_INCREMENT 16
/**
* What is the maximum number of local results
* that we are willing to return synchronously?
*/
-#define MAX_SYNC_PROCESSED 8
+#define GNUNET_GAP_MAX_SYNC_PROCESSED 8
/**
* What is the maximum number of local results
* that we are willing to return asynchronously?
*/
-#define MAX_ASYNC_PROCESSED 32
+#define GNUNET_GAP_MAX_ASYNC_PROCESSED 32
+/**
+ * Pick a multiple of 2 here to achive 8-byte alignment!
+ * We also probably want DBlocks to have (roughly) the
+ * same size as IBlocks. With SHA-512, the optimal
+ * value is 32768 byte / 128 byte = 256
+ * (128 byte = 2 * 512 bits). DO NOT CHANGE!
+ */
+#define GNUNET_ECRS_CHK_PER_INODE 256
+/**
+ * Size of a DBLOCK. DO NOT CHANGE!
+ */
+#define GNUNET_ECRS_DBLOCK_SIZE (32 * 1024)
+
+/**
+ * You cannot change this one (directly). Ideally
+ * CHK_PER_INODE is chosen such that
+ * IBLOCK_SIZE == DBLOCK_SIZE.
+ */
+#define GNUNET_ECRS_IBLOCK_SIZE (GNUNET_ECRS_CHK_PER_INODE *
sizeof(GNUNET_EC_ContentHashKey))
+
+
#endif
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-06 10:51:43 UTC (rev
6783)
@@ -78,8 +78,6 @@
#define GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC -1
#define GNUNET_ECRS_SBLOCK_UPDATE_NONE 0
-#define GNUNET_ECRS_DBLOCK_SIZE (32 * 1024)
-
/* ***************** metadata API (meta.c) ******************** */
/**
Modified: GNUnet/src/server/core.c
===================================================================
--- GNUnet/src/server/core.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/server/core.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -110,16 +110,15 @@
&pos))
return GNUNET_SYSERR;
GNUNET_GE_ASSERT (applicationCore.ectx, pos != NULL);
- if (pos != strstr(pos, rpos))
+ if (pos != strstr (pos, rpos))
{
GNUNET_GE_LOG (applicationCore.ectx,
- GNUNET_GE_ERROR | GNUNET_GE_DEVELOPER |
- GNUNET_GE_BULK,
- _
- ("Configuration value `%s' under [MODULES] for `%s' is
invalid!\n"),
- pos,
- rpos);
- GNUNET_free(pos);
+ GNUNET_GE_ERROR | GNUNET_GE_DEVELOPER |
+ GNUNET_GE_BULK,
+ _
+ ("Configuration value `%s' under [MODULES] for `%s' is
invalid!\n"),
+ pos, rpos);
+ GNUNET_free (pos);
return GNUNET_SYSERR;
}
name = GNUNET_malloc (strlen (pos) + strlen ("module_") + 1);
@@ -310,16 +309,15 @@
&pos))
return NULL;
GNUNET_GE_ASSERT (applicationCore.ectx, pos != NULL);
- if (pos != strstr(pos, rpos))
+ if (pos != strstr (pos, rpos))
{
GNUNET_GE_LOG (applicationCore.ectx,
- GNUNET_GE_ERROR | GNUNET_GE_DEVELOPER |
- GNUNET_GE_BULK,
- _
- ("Configuration value `%s' under [MODULES] for `%s' is
invalid!\n"),
- pos,
- rpos);
- GNUNET_free(pos);
+ GNUNET_GE_ERROR | GNUNET_GE_DEVELOPER |
+ GNUNET_GE_BULK,
+ _
+ ("Configuration value `%s' under [MODULES] for `%s' is
invalid!\n"),
+ pos, rpos);
+ GNUNET_free (pos);
return NULL;
}
name = GNUNET_malloc (strlen (pos) + strlen ("module_") + 1);
Modified: GNUnet/src/server/gnunet-peer-info.c
===================================================================
--- GNUnet/src/server/gnunet-peer-info.c 2008-05-06 10:41:11 UTC (rev
6782)
+++ GNUnet/src/server/gnunet-peer-info.c 2008-05-06 10:51:43 UTC (rev
6783)
@@ -126,8 +126,8 @@
if (NULL == hello)
{
GNUNET_GE_LOG (ectx,
- GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
- _("Could not get address of peer `%s'.\n"), &enc);
+ GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
+ _("Could not get address of peer `%s'.\n"), &enc);
return GNUNET_OK;
}
if (GNUNET_SYSERR == GNUNET_RSA_verify (&hello->senderIdentity,
@@ -139,9 +139,9 @@
&hello->publicKey))
{
GNUNET_GE_LOG (ectx,
- GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
- _("`%s' message invalid (signature invalid).\n"),
- "HELLO");
+ GNUNET_GE_WARNING | GNUNET_GE_BULK | GNUNET_GE_USER,
+ _("`%s' message invalid (signature invalid).\n"),
+ "HELLO");
}
addr = NULL;
addr_len = 0;
@@ -163,19 +163,17 @@
GNUNET_GE_DEBUG | GNUNET_GE_BULK | GNUNET_GE_USER,
_("Could not get address of peer `%s'.\n"), &enc);
if (be_quiet)
- printf ("%s\n",
- (char *) &enc);
+ printf ("%s\n", (char *) &enc);
else
- printf (_("Peer `%s' with trust %8u\n"),
- (char *) &enc, identity->getHostTrust (id));
+ printf (_("Peer `%s' with trust %8u\n"),
+ (char *) &enc, identity->getHostTrust (id));
return GNUNET_OK;
}
if (be_quiet)
- printf ("%s\n",
- (char *) &enc);
+ printf ("%s\n", (char *) &enc);
else
printf (_("Peer `%s' with trust %8u and address `%s'\n"),
- (char *) &enc, identity->getHostTrust (id), info);
+ (char *) &enc, identity->getHostTrust (id), info);
GNUNET_free (info);
return GNUNET_OK;
}
@@ -185,7 +183,7 @@
{
struct GNUNET_GC_Configuration *cfg;
struct GNUNET_CronManager *cron;
- const GNUNET_RSA_PublicKey * me;
+ const GNUNET_RSA_PublicKey *me;
GNUNET_PeerIdentity id;
GNUNET_EncName enc;
int ret;
@@ -223,7 +221,7 @@
transport = GNUNET_CORE_request_service ("transport");
if (transport == NULL)
{
- GNUNET_CORE_release_service(identity);
+ GNUNET_CORE_release_service (identity);
GNUNET_CORE_done ();
GNUNET_cron_destroy (cron);
GNUNET_fini (ectx, cfg);
@@ -232,30 +230,26 @@
if (get_self != GNUNET_YES)
{
if (no_resolve != GNUNET_YES)
- {
+ {
#if HAVE_ADNS
- identity->forEachHost (0, /* no timeout */
- &resolveHostInfo, NULL);
- /* give GNU ADNS time to resolve... */
- GNUNET_thread_sleep (2 * GNUNET_CRON_SECONDS);
+ identity->forEachHost (0, /* no timeout */
+ &resolveHostInfo, NULL);
+ /* give GNU ADNS time to resolve... */
+ GNUNET_thread_sleep (2 * GNUNET_CRON_SECONDS);
#endif
- }
- identity->forEachHost (0, /* no timeout */
- &printHostInfo, NULL);
- }
+ }
+ identity->forEachHost (0, /* no timeout */
+ &printHostInfo, NULL);
+ }
else
{
- me = identity->getPublicPrivateKey();
- identity->getPeerIdentity(me,
- &id);
- GNUNET_hash_to_enc(&id.hashPubKey,
- &enc);
+ me = identity->getPublicPrivateKey ();
+ identity->getPeerIdentity (me, &id);
+ GNUNET_hash_to_enc (&id.hashPubKey, &enc);
if (be_quiet)
- printf ("%s\n",
- (char *) &enc);
+ printf ("%s\n", (char *) &enc);
else
- printf(_("I am peer `%s'.\n"),
- (const char*)&enc);
+ printf (_("I am peer `%s'.\n"), (const char *) &enc);
}
GNUNET_CORE_release_service (identity);
GNUNET_CORE_release_service (transport);
Modified: GNUnet/src/server/tcpserver.c
===================================================================
--- GNUnet/src/server/tcpserver.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/server/tcpserver.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -187,11 +187,13 @@
&&
(!(((IN6_IS_ADDR_V4COMPAT (&a6->sin6_addr))
|| (IN6_IS_ADDR_V4MAPPED (&a6->sin6_addr)))
- && (isWhitelisted4 (&ip4))))) {
- GNUNET_GE_LOG(ectx, GNUNET_GE_DEBUG | GNUNET_GE_ADMIN | GNUNET_GE_BULK,
- "Rejected connection from untrusted client");
- return NULL;
- }
+ && (isWhitelisted4 (&ip4)))))
+ {
+ GNUNET_GE_LOG (ectx,
+ GNUNET_GE_DEBUG | GNUNET_GE_ADMIN | GNUNET_GE_BULK,
+ "Rejected connection from untrusted client");
+ return NULL;
+ }
}
else if (addr_len == sizeof (struct sockaddr_in))
{
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/transports/http.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -2139,7 +2139,7 @@
_
("The UPnP service could not be loaded. To disable
UPnP, set the "
"configuration option \"UPNP\" in section \"%s\" to
\"NO\"\n"),
- "HTTP");
+ "HTTP");
}
}
stats = coreAPI->service_request ("stats");
Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/transports/smtp.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -365,7 +365,7 @@
GNUNET_GE_USER,
_
("Received malformed message via %s. Ignored.\n"),
- "SMTP");
+ "SMTP");
#if DEBUG_SMTP
GNUNET_GE_LOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/transports/tcp.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -269,7 +269,7 @@
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_BULK,
_("Received malformed message via %s. Ignored.\n"),
- MY_TRANSPORT_NAME);
+ MY_TRANSPORT_NAME);
tcp_disconnect (tsession);
return GNUNET_SYSERR;
}
@@ -289,7 +289,7 @@
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_BULK,
_("Received malformed message via %s. Ignored.\n"),
- MY_TRANSPORT_NAME);
+ MY_TRANSPORT_NAME);
tcp_disconnect (tsession);
return GNUNET_SYSERR;
}
@@ -781,8 +781,8 @@
return NULL;
}
coreAPI = core;
- if (GNUNET_GC_get_configuration_value_yesno (cfg, MY_TRANSPORT_NAME, "UPNP",
GNUNET_YES)
- == GNUNET_YES)
+ if (GNUNET_GC_get_configuration_value_yesno
+ (cfg, MY_TRANSPORT_NAME, "UPNP", GNUNET_YES) == GNUNET_YES)
{
upnp = coreAPI->service_request ("upnp");
@@ -794,7 +794,7 @@
_
("The UPnP service could not be loaded. To disable
UPnP, set the "
"configuration option \"UPNP\" in section \"%s\" to
\"NO\"\n"),
- MY_TRANSPORT_NAME);
+ MY_TRANSPORT_NAME);
}
}
Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/transports/udp.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -105,7 +105,7 @@
GNUNET_GE_LOG (coreAPI->ectx,
GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_BULK,
_("Received malformed message via %s. Ignored.\n"),
- "UDP");
+ "UDP");
return GNUNET_SYSERR;
}
um = (const UDPMessage *) msg;
@@ -553,7 +553,7 @@
GNUNET_GE_ERROR | GNUNET_GE_USER | GNUNET_GE_IMMEDIATE,
"The UPnP service could not be loaded. To disable UPnP,
set the "
"configuration option \"UPNP\" in section \"%s\" to
\"NO\"\n",
- "UDP");
+ "UDP");
}
stats = coreAPI->service_request ("stats");
if (stats != NULL)
Modified: GNUnet/src/util/os/priority.c
===================================================================
--- GNUnet/src/util/os/priority.c 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/src/util/os/priority.c 2008-05-06 10:51:43 UTC (rev 6783)
@@ -41,31 +41,31 @@
* and the usual numeric nice() increments */
if (strcmp (str, "NORMAL") == 0)
#ifdef MINGW
- prio = NORMAL_PRIORITY_CLASS;
+ prio = NORMAL_PRIORITY_CLASS;
#else
prio = 0;
#endif
else if (strcmp (str, "ABOVE NORMAL") == 0)
#ifdef MINGW
- prio = ABOVE_NORMAL_PRIORITY_CLASS;
+ prio = ABOVE_NORMAL_PRIORITY_CLASS;
#else
prio = -5;
#endif
else if (strcmp (str, "BELOW NORMAL") == 0)
#ifdef MINGW
- prio = BELOW_NORMAL_PRIORITY_CLASS;
+ prio = BELOW_NORMAL_PRIORITY_CLASS;
#else
prio = 10;
#endif
else if (strcmp (str, "HIGH") == 0)
#ifdef MINGW
- prio = HIGH_PRIORITY_CLASS;
+ prio = HIGH_PRIORITY_CLASS;
#else
prio = -10;
#endif
else if (strcmp (str, "IDLE") == 0)
#ifdef MINGW
- prio = IDLE_PRIORITY_CLASS;
+ prio = IDLE_PRIORITY_CLASS;
#else
prio = 19;
#endif
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2008-05-06 10:41:11 UTC (rev 6782)
+++ GNUnet/todo 2008-05-06 10:51:43 UTC (rev 6783)
@@ -3,7 +3,7 @@
Annotations:
RC == Release Critical
-0.8.0 [4'08] (aka "advanced features"):
+0.8.0 [5'08] (aka "new protocol"):
- document gnunet-auto-share on webpage [RC]
- clean up and test VPN code [RC]
- tune GAP query planning code [RC]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6783 - in GNUnet: . src/applications/chat src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/stats src/applications/testing src/include src/server src/transports src/util/os,
gnunet <=