[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6951 - in GNUnet: libltdl src/applications/advertising src
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6951 - in GNUnet: libltdl src/applications/advertising src/applications/chat/lib src/applications/chat/module src/applications/chat/tools src/applications/dht/module src/applications/dht/tools src/applications/fragmentation src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/fs/tools src/applications/identity src/applications/pingpong src/applications/sqstore_mysql src/applications/sqstore_sqlite src/applications/stats src/applications/testing src/applications/traffic src/applications/transport src/applications/vpn src/include src/server src/transports src/util/os |
Date: |
Sat, 31 May 2008 14:00:23 -0600 (MDT) |
Author: grothoff
Date: 2008-05-31 14:00:22 -0600 (Sat, 31 May 2008)
New Revision: 6951
Modified:
GNUnet/libltdl/ltdl.c
GNUnet/src/applications/advertising/advertising.c
GNUnet/src/applications/chat/lib/messaging.c
GNUnet/src/applications/chat/module/chat.c
GNUnet/src/applications/chat/tools/gnunet-chat.c
GNUnet/src/applications/dht/module/cs.c
GNUnet/src/applications/dht/module/routing.c
GNUnet/src/applications/dht/module/service.c
GNUnet/src/applications/dht/tools/dht-query.c
GNUnet/src/applications/dht/tools/dht_api.c
GNUnet/src/applications/fragmentation/fragmentation.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/fs/gap/fs.c
GNUnet/src/applications/fs/gap/gap.c
GNUnet/src/applications/fs/gap/migration.c
GNUnet/src/applications/fs/gap/ondemand.c
GNUnet/src/applications/fs/gap/pid_table.c
GNUnet/src/applications/fs/gap/plan.c
GNUnet/src/applications/fs/gap/querymanager.c
GNUnet/src/applications/fs/tools/gnunet-insert.c
GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
GNUnet/src/applications/identity/identity.c
GNUnet/src/applications/pingpong/pingpong.c
GNUnet/src/applications/sqstore_mysql/mysql.c
GNUnet/src/applications/sqstore_mysql/mysqltest.c
GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
GNUnet/src/applications/stats/statistics.c
GNUnet/src/applications/testing/remotetopologies.c
GNUnet/src/applications/traffic/traffic.c
GNUnet/src/applications/transport/transport.c
GNUnet/src/applications/vpn/vpn.c
GNUnet/src/include/gnunet_chat_lib.h
GNUnet/src/include/gnunet_collection_lib.h
GNUnet/src/include/gnunet_ecrs_lib.h
GNUnet/src/include/gnunet_namespace_lib.h
GNUnet/src/include/gnunet_protocols.h
GNUnet/src/server/connection.c
GNUnet/src/server/core.c
GNUnet/src/transports/http.c
GNUnet/src/transports/smtp.c
GNUnet/src/util/os/semaphore.c
Log:
indent
Modified: GNUnet/libltdl/ltdl.c
===================================================================
--- GNUnet/libltdl/ltdl.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/libltdl/ltdl.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -1769,7 +1769,8 @@
lt_int_dyld_match_loaded_lib_by_install_name ((char
*) (((struct
dylib_command
- *) lc)->
+ *)
+ lc)->
dylib.name.
offset +
(unsigned
@@ -1779,9 +1780,10 @@
{
/* Maybe NSAddImage can find it */
mh1 =
- ltdl_NSAddImage ((char *) (((struct dylib_command *) lc)->
- dylib.name.offset +
- (unsigned long) lc),
+ ltdl_NSAddImage ((char
+ *) (((struct dylib_command *)
+ lc)->dylib.name.offset +
+ (unsigned long) lc),
NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED +
NSADDIMAGE_OPTION_WITH_SEARCHING +
NSADDIMAGE_OPTION_RETURN_ON_ERROR);
Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/advertising/advertising.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -889,34 +889,29 @@
stat_hello_in =
stats->create (gettext_noop ("# Peer advertisements received"));
stat_hello_nat_in =
- stats->
- create (gettext_noop ("# Peer advertisements of type NAT received"));
+ stats->create (gettext_noop
+ ("# Peer advertisements of type NAT received"));
stat_hello_verified =
- stats->
- create (gettext_noop ("# Peer advertisements confirmed via PONG"));
+ stats->create (gettext_noop
+ ("# Peer advertisements confirmed via PONG"));
stat_hello_update =
- stats->
- create (gettext_noop
- ("# Peer advertisements updating earlier HELLOs"));
+ stats->create (gettext_noop
+ ("# Peer advertisements updating earlier HELLOs"));
stat_hello_discard =
- stats->
- create (gettext_noop ("# Peer advertisements discarded due to load"));
+ stats->create (gettext_noop
+ ("# Peer advertisements discarded due to load"));
stat_hello_no_transport =
- stats->
- create (gettext_noop
- ("# Peer advertisements for unsupported transport"));
+ stats->create (gettext_noop
+ ("# Peer advertisements for unsupported transport"));
stat_hello_ping_busy =
- stats->
- create (gettext_noop
- ("# Peer advertisements not confirmed due to ping busy"));
+ stats->create (gettext_noop
+ ("# Peer advertisements not confirmed due to ping
busy"));
stat_hello_noselfad =
- stats->
- create (gettext_noop
- ("# Peer advertisements not confirmed due to lack of self
ad"));
+ stats->create (gettext_noop
+ ("# Peer advertisements not confirmed due to lack of
self ad"));
stat_hello_send_error =
- stats->
- create (gettext_noop
- ("# Peer advertisements not confirmed due to send error"));
+ stats->create (gettext_noop
+ ("# Peer advertisements not confirmed due to send
error"));
stat_hello_out =
stats->create (gettext_noop ("# Self advertisments transmitted"));
stat_hello_fwd =
Modified: GNUnet/src/applications/chat/lib/messaging.c
===================================================================
--- GNUnet/src/applications/chat/lib/messaging.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/chat/lib/messaging.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -70,25 +70,27 @@
unsigned int sequence_number;
+ unsigned int msg_options;
+
};
/**
* Linked list of members in the chat room.
*/
-struct MemberList
+struct MemberList
{
- struct MemberList * next;
-
+ struct MemberList *next;
+
/**
* Description of the member.
*/
- struct GNUNET_ECRS_MetaData * meta;
+ struct GNUNET_ECRS_MetaData *meta;
/**
* Member ID (pseudonym).
*/
GNUNET_HashCode id;
-
+
};
static int
@@ -110,6 +112,8 @@
join_msg = GNUNET_malloc (size_of_join);
join_msg->header.size = htons (size_of_join);
join_msg->header.type = htons (GNUNET_CS_PROTO_CHAT_JOIN_REQUEST);
+ join_msg->msg_options = htonl (chat_room->msg_options);
+ join_msg->private_key = *chat_room->my_private_key;
join_msg->room_name_len = htons (room_len);
room = (char *) &join_msg[1];
memcpy (room, chat_room->room_name, room_len);
@@ -147,9 +151,9 @@
CS_chat_MESSAGE_JoinNotification *join_msg;
CS_chat_MESSAGE_ReceiveNotification *received_msg;
struct GNUNET_ECRS_MetaData *meta;
- struct MemberList * members;
- struct MemberList * pos;
- struct MemberList * prev;
+ struct MemberList *members;
+ struct MemberList *pos;
+ struct MemberList *prev;
unsigned int size;
unsigned int meta_len;
unsigned int msg_len;
@@ -216,19 +220,15 @@
malformed = GNUNET_YES;
continue;
}
- pos = GNUNET_malloc(sizeof(struct MemberList));
- pos->meta = meta;
- GNUNET_hash(&join_msg->public_key,
- sizeof(GNUNET_RSA_PublicKey),
- &pos->id);
- GNUNET_PSEUDO_add(room->ectx,
- room->cfg,
- &pos->id,
- meta);
+ pos = GNUNET_malloc (sizeof (struct MemberList));
+ pos->meta = meta;
+ GNUNET_hash (&join_msg->public_key,
+ sizeof (GNUNET_RSA_PublicKey), &pos->id);
+ GNUNET_PSEUDO_add (room->ectx, room->cfg, &pos->id, meta);
room->member_list_callback (room->member_list_callback_cls,
meta, &join_msg->public_key);
- pos->next = members;
- members = pos;
+ pos->next = members;
+ members = pos;
break;
case GNUNET_CS_PROTO_CHAT_LEAVE_NOTIFICATION:
if (size < sizeof (CS_chat_MESSAGE_LeaveNotification))
@@ -239,23 +239,22 @@
leave_msg = (CS_chat_MESSAGE_LeaveNotification *) reply;
room->member_list_callback (room->member_list_callback_cls,
NULL, &leave_msg->user);
- prev = NULL;
- pos = members;
- while ( (pos != NULL) &&
- (0 != memcmp(&pos->id,
- &leave_msg->user,
- sizeof(GNUNET_HashCode))) )
- {
- prev = pos;
- pos = pos->next;
- }
- GNUNET_GE_ASSERT(NULL, pos != NULL);
- if (prev == NULL)
- members = pos->next;
- else
- prev->next = pos->next;
- GNUNET_ECRS_meta_data_destroy(pos->meta);
- GNUNET_free(pos);
+ prev = NULL;
+ pos = members;
+ while ((pos != NULL) &&
+ (0 != memcmp (&pos->id,
+ &leave_msg->user, sizeof (GNUNET_HashCode))))
+ {
+ prev = pos;
+ pos = pos->next;
+ }
+ GNUNET_GE_ASSERT (NULL, pos != NULL);
+ if (prev == NULL)
+ members = pos->next;
+ else
+ prev->next = pos->next;
+ GNUNET_ECRS_meta_data_destroy (pos->meta);
+ GNUNET_free (pos);
break;
case GNUNET_CS_PROTO_CHAT_MESSAGE_NOTIFICATION:
if (size < sizeof (CS_chat_MESSAGE_ReceiveNotification))
@@ -268,17 +267,17 @@
message_content = GNUNET_malloc (msg_len + 1);
memcpy (message_content, &received_msg[1], msg_len);
message_content[msg_len] = '\0';
- pos = members;
- while ( (pos != NULL) &&
- (0 != memcmp(&pos->id,
- &received_msg->sender,
- sizeof(GNUNET_HashCode))) )
- pos = pos->next;
- GNUNET_GE_ASSERT(NULL, pos != NULL);
- room->message_callback (room->message_callback_cls,
+ pos = members;
+ while ((pos != NULL) &&
+ (0 != memcmp (&pos->id,
+ &received_msg->sender,
+ sizeof (GNUNET_HashCode))))
+ pos = pos->next;
+ GNUNET_GE_ASSERT (NULL, pos != NULL);
+ room->message_callback (room->message_callback_cls,
room,
&received_msg->sender,
- pos->meta,
+ pos->meta,
message_content,
ntohl (received_msg->msg_options));
GNUNET_free (message_content);
@@ -309,8 +308,8 @@
{
pos = members;
members = pos->next;
- GNUNET_ECRS_meta_data_destroy(pos->meta);
- GNUNET_free(pos);
+ GNUNET_ECRS_meta_data_destroy (pos->meta);
+ GNUNET_free (pos);
}
return NULL;
}
@@ -430,6 +429,7 @@
const char *nick_name,
struct GNUNET_ECRS_MetaData *member_info,
const char *room_name,
+ GNUNET_CHAT_MSG_OPTIONS msg_options,
GNUNET_CHAT_MessageCallback messageCallback,
void *message_cls,
GNUNET_CHAT_MemberListCallback memberCallback,
@@ -451,6 +451,7 @@
return NULL;
}
chat_room = GNUNET_malloc (sizeof (struct GNUNET_CHAT_Room));
+ chat_room->msg_options = msg_options;
chat_room->room_name = GNUNET_strdup (room_name);
chat_room->member_info = GNUNET_ECRS_meta_data_duplicate (member_info);
chat_room->my_private_key = key;
Modified: GNUnet/src/applications/chat/module/chat.c
===================================================================
--- GNUnet/src/applications/chat/module/chat.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/chat/module/chat.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -104,44 +104,45 @@
rmsg->sender = pos->id;
else
memset (&rmsg->sender, 0, sizeof (GNUNET_HashCode));
- priv_msg = (0 == memcmp(&all_zeros,
- &cmsg->target,
- sizeof(GNUNET_HashCode)));
- memcpy(&rmsg[1],
- &cmsg[1],
- msg_len);
+ priv_msg = (0 == memcmp (&all_zeros,
+ &cmsg->target, sizeof (GNUNET_HashCode)));
+ memcpy (&rmsg[1], &cmsg[1], msg_len);
pos = client_list_head;
while (pos != NULL)
{
if (0 == strcmp (room, pos->room))
{
- if ( ( (!priv_msg) ||
- (0 == memcmp(&cmsg->target,
- &pos->id,
- sizeof(GNUNET_HashCode))) ) &&
- ( (0 == ntohl(cmsg->msg_options)) & (~pos->msg_options) ) )
- {
- coreAPI->cs_send_message (pos->client, &rmsg->header, GNUNET_YES);
- if (0 != (ntohl(cmsg->msg_options)&GNUNET_CHAT_MSG_ACKNOWLEDGED))
- {
- receipt.header.size =
htons(sizeof(CS_chat_MESSAGE_ConfirmationReceipt));
- receipt.header.type =
htons(GNUNET_CS_PROTO_CHAT_CONFIRMATION_RECEIPT);
- receipt.sequence_number = cmsg->sequence_number;
- receipt.timestamp = GNUNET_htonll(GNUNET_get_time());
- receipt.target = pos->id;
- /* FIXME: this will currently *always* be the plaintext
message;
- once we have P2P, we want to sign the encrypted message
- (which we currently do not even generate!) */
- GNUNET_hash(&cmsg[1],
- msg_len,
- &receipt.content);
- GNUNET_RSA_sign(pos->private_key,
- sizeof(CS_chat_MESSAGE_ConfirmationReceipt) -
sizeof(GNUNET_RSA_Signature),
- &receipt,
- &receipt.signature);
- coreAPI->cs_send_message (client, &receipt.header,
GNUNET_YES);
- }
- }
+ if (((!priv_msg) ||
+ (0 == memcmp (&cmsg->target,
+ &pos->id,
+ sizeof (GNUNET_HashCode)))) &&
+ ((0 == ntohl (cmsg->msg_options)) & (~pos->msg_options)))
+ {
+ coreAPI->cs_send_message (pos->client, &rmsg->header,
+ GNUNET_YES);
+ if (0 !=
+ (ntohl (cmsg->msg_options) & GNUNET_CHAT_MSG_ACKNOWLEDGED))
+ {
+ receipt.header.size =
+ htons (sizeof (CS_chat_MESSAGE_ConfirmationReceipt));
+ receipt.header.type =
+ htons (GNUNET_CS_PROTO_CHAT_CONFIRMATION_RECEIPT);
+ receipt.sequence_number = cmsg->sequence_number;
+ receipt.timestamp = GNUNET_htonll (GNUNET_get_time ());
+ receipt.target = pos->id;
+ /* FIXME: this will currently *always* be the plaintext
message;
+ once we have P2P, we want to sign the encrypted message
+ (which we currently do not even generate!) */
+ GNUNET_hash (&cmsg[1], msg_len, &receipt.content);
+ GNUNET_RSA_sign (pos->private_key,
+ sizeof
+ (CS_chat_MESSAGE_ConfirmationReceipt) -
+ sizeof (GNUNET_RSA_Signature), &receipt,
+ &receipt.signature);
+ coreAPI->cs_send_message (client, &receipt.header,
+ GNUNET_YES);
+ }
+ }
}
pos = pos->next;
}
Modified: GNUnet/src/applications/chat/tools/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -83,15 +83,14 @@
receive_callback (void *cls,
struct GNUNET_CHAT_Room *room,
const GNUNET_HashCode * sender,
- const struct GNUNET_ECRS_MetaData * meta,
- const char *message,
- GNUNET_CHAT_MSG_OPTIONS options)
+ const struct GNUNET_ECRS_MetaData *meta,
+ const char *message, GNUNET_CHAT_MSG_OPTIONS options)
{
- char * nick;
+ char *nick;
- nick = GNUNET_PSEUDO_id_to_name(ectx, cfg, sender);
+ nick = GNUNET_PSEUDO_id_to_name (ectx, cfg, sender);
fprintf (stdout, _("`%s' said: %s\n"), nick, message);
- GNUNET_free(nick);
+ GNUNET_free (nick);
return GNUNET_OK;
}
@@ -100,17 +99,14 @@
const struct GNUNET_ECRS_MetaData *member_info,
const GNUNET_RSA_PublicKey * member_id)
{
- char * nick;
+ char *nick;
GNUNET_HashCode id;
- GNUNET_hash(member_id,
- sizeof(GNUNET_RSA_PublicKey),
- &id);
- nick = GNUNET_PSEUDO_id_to_name(ectx, cfg, &id);
+ GNUNET_hash (member_id, sizeof (GNUNET_RSA_PublicKey), &id);
+ nick = GNUNET_PSEUDO_id_to_name (ectx, cfg, &id);
fprintf (stdout, member_info != NULL
- ? _("`%s' entered the room\n")
- : _("`%s' left the room\n"), nick);
- GNUNET_free(nick);
+ ? _("`%s' entered the room\n") : _("`%s' left the room\n"), nick);
+ GNUNET_free (nick);
return GNUNET_OK;
}
@@ -173,8 +169,8 @@
nickname,
meta,
room_name,
- &receive_callback, NULL,
- &member_list_callback, NULL,
+ &receive_callback, NULL,
+ &member_list_callback, NULL,
&confirmation_callback, NULL);
GNUNET_ECRS_meta_data_destroy (meta);
if (room == NULL)
Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/dht/module/cs.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -177,7 +177,7 @@
*/
static int
csGetEnd (struct GNUNET_ClientHandle *client,
- const GNUNET_MessageHeader * message)
+ const GNUNET_MessageHeader * message)
{
const CS_dht_request_get_MESSAGE *get;
struct DHT_CLIENT_GET_RECORD *pos;
@@ -201,9 +201,10 @@
prev = NULL;
while (pos != NULL)
{
- if ((memcmp(pos->client,client,sizeof(client)) == 0) &&
- (memcmp(&pos->get_record->key,&get->key,sizeof(GNUNET_HashCode))) &&
- (ntohs(get->type) == pos->get_record->type))
+ if ((memcmp (pos->client, client, sizeof (client)) == 0) &&
+ (memcmp
+ (&pos->get_record->key, &get->key, sizeof (GNUNET_HashCode)))
+ && (ntohs (get->type) == pos->get_record->type))
break;
prev = pos;
pos = pos->next;
@@ -220,7 +221,7 @@
GNUNET_mutex_unlock (lock);
dhtAPI->get_stop (pos->get_record);
GNUNET_free (pos);
-
+
return GNUNET_OK;
}
@@ -283,7 +284,8 @@
capi->cs_handler_register (GNUNET_CS_PROTO_DHT_REQUEST_GET, &csGet))
status = GNUNET_SYSERR;
if (GNUNET_SYSERR ==
- capi->cs_handler_register (GNUNET_CS_PROTO_DHT_REQUEST_GET_END,
&csGetEnd))
+ capi->cs_handler_register (GNUNET_CS_PROTO_DHT_REQUEST_GET_END,
+ &csGetEnd))
status = GNUNET_SYSERR;
if (GNUNET_SYSERR == capi->cs_disconnect_handler_register (&csClientExit))
status = GNUNET_SYSERR;
Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/dht/module/routing.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -913,8 +913,8 @@
unsigned int i;
struct DHT_Source_Route *pos;
- coreAPI->
- send_callback_unregister (sizeof (DHT_MESSAGE), &extra_get_callback);
+ coreAPI->send_callback_unregister (sizeof (DHT_MESSAGE),
+ &extra_get_callback);
coreAPI->p2p_ciphertext_handler_unregister (GNUNET_P2P_PROTO_DHT_GET,
&handleGet);
coreAPI->p2p_ciphertext_handler_unregister (GNUNET_P2P_PROTO_DHT_PUT,
Modified: GNUnet/src/applications/dht/module/service.c
===================================================================
--- GNUnet/src/applications/dht/module/service.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/dht/module/service.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -23,7 +23,7 @@
* @brief internal GNUnet DHT service
* @author Christian Grothoff
*/
-
+
#include "table.h"
#include "routing.h"
#include "gnunet_dht_service.h"
Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/dht/tools/dht-query.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -87,7 +87,7 @@
if (timeout == 0)
timeout = 30 * GNUNET_CRON_SECONDS;
ret = GNUNET_DHT_get_start (ctx, GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- (void *) key);
+ (void *) key);
if (ret == 0)
printf (_("%s(%s) operation returned no results.\n"), "get", key);
}
@@ -135,8 +135,8 @@
}
handle = GNUNET_client_connection_create (ectx, cfg);
-
- ctx = GNUNET_DHT_context_create(cfg,ectx,&printCallback,unused);
+
+ ctx = GNUNET_DHT_context_create (cfg, ectx, &printCallback, unused);
if (handle == NULL)
{
fprintf (stderr, _("Failed to connect to gnunetd.\n"));
Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -60,7 +60,7 @@
* connection or the processor callback requesting
* it).
*/
- struct GNUNET_ThreadHandle *poll_thread; /*Poll thread instead.. */
+ struct GNUNET_ThreadHandle *poll_thread; /*Poll thread instead.. */
/**
* Are we done (for whichever reason)?
@@ -116,32 +116,30 @@
* GNUNET_SYSERR
* @return NULL on error
*/
-struct GNUNET_DHT_Context
-*GNUNET_DHT_context_create (struct GNUNET_GC_Configuration
- *cfg,
- struct GNUNET_GE_Context
- *ectx,
- GNUNET_ResultProcessor
- resultCallback,
- void
- *resCallbackClosure)
+struct GNUNET_DHT_Context *
+GNUNET_DHT_context_create (struct GNUNET_GC_Configuration
+ *cfg,
+ struct GNUNET_GE_Context
+ *ectx,
+ GNUNET_ResultProcessor
+ resultCallback, void *resCallbackClosure)
{
struct GNUNET_DHT_Context *ctx;
struct GNUNET_ClientServerConnection *sock;
-
+
sock = GNUNET_client_connection_create (ectx, cfg);
if (sock == NULL)
- {
+ {
return NULL;
- }
-
- ctx = GNUNET_malloc(sizeof (struct GNUNET_DHT_Context));
+ }
+
+ ctx = GNUNET_malloc (sizeof (struct GNUNET_DHT_Context));
ctx->sock = sock;
ctx->closure = resCallbackClosure;
ctx->processor = resultCallback;
- ctx->poll_thread = GNUNET_thread_create (&poll_thread, ctx, 1024 * 8); /*
Should this be here, or will we create on the first request? */
+ ctx->poll_thread = GNUNET_thread_create (&poll_thread, ctx, 1024 * 8);
/* Should this be here, or will we create on the first request? */
ctx->aborted = GNUNET_NO;
- return NULL;
+ return NULL;
}
@@ -153,11 +151,12 @@
* @param key the key to look up
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DHT_get_start (struct GNUNET_DHT_Context *ctx,
- unsigned int type, const GNUNET_HashCode * key)
+int
+GNUNET_DHT_get_start (struct GNUNET_DHT_Context *ctx,
+ unsigned int type, const GNUNET_HashCode * key)
{
CS_dht_request_get_MESSAGE req;
-
+
if (ctx->sock == NULL)
return GNUNET_SYSERR;
req.header.size = htons (sizeof (CS_dht_request_get_MESSAGE));
@@ -167,12 +166,12 @@
if (GNUNET_OK != GNUNET_client_connection_write (ctx->sock, &req.header))
{
return GNUNET_SYSERR;
- }
-
- return GNUNET_OK;
-}
+ }
+ return GNUNET_OK;
+}
+
/**
* Stop an asynchronous GET operation on the DHT looking for
* key.
@@ -180,12 +179,13 @@
* @param key the key to look up
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DHT_get_stop (struct GNUNET_DHT_Context *ctx,
- unsigned int type, const GNUNET_HashCode * key)
+int
+GNUNET_DHT_get_stop (struct GNUNET_DHT_Context *ctx,
+ unsigned int type, const GNUNET_HashCode * key)
{
-
+
CS_dht_request_get_MESSAGE req;
-
+
if (ctx->sock == NULL)
return GNUNET_SYSERR;
req.header.size = htons (sizeof (CS_dht_request_get_MESSAGE));
@@ -195,27 +195,28 @@
if (GNUNET_OK != GNUNET_client_connection_write (ctx->sock, &req.header))
{
return GNUNET_SYSERR;
- }
-
- return GNUNET_OK;
-
-}
+ }
+ return GNUNET_OK;
+
+}
+
/**
* Destroy a previously created context for DHT operations.
*
* @param ctx context to destroy
* @return GNUNET_SYSERR on error
*/
-int GNUNET_DHT_context_destroy (struct GNUNET_DHT_Context *ctx)
+int
+GNUNET_DHT_context_destroy (struct GNUNET_DHT_Context *ctx)
{
void *unused;
ctx->aborted = GNUNET_YES;
GNUNET_client_connection_close_forever (ctx->sock);
GNUNET_thread_join (ctx->poll_thread, &unused);
GNUNET_client_connection_destroy (ctx->sock);
- return GNUNET_OK;
-}
+ return GNUNET_OK;
+}
/**
* Perform a synchronous put operation. The peer does not have
Modified: GNUnet/src/applications/fragmentation/fragmentation.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentation.c 2008-05-31
19:53:36 UTC (rev 6950)
+++ GNUnet/src/applications/fragmentation/fragmentation.c 2008-05-31
20:00:22 UTC (rev 6951)
@@ -606,9 +606,8 @@
{
int i;
- coreAPI->
- p2p_ciphertext_handler_unregister (GNUNET_P2P_PROTO_MESSAGE_FRAGMENT,
- &processFragment);
+ coreAPI->p2p_ciphertext_handler_unregister
+ (GNUNET_P2P_PROTO_MESSAGE_FRAGMENT, &processFragment);
GNUNET_cron_del_job (coreAPI->cron, &defragmentationPurgeCron,
60 * GNUNET_CRON_SECONDS, NULL);
for (i = 0; i < DEFRAG_BUCKET_COUNT; i++)
Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/fs/collection/collection.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -435,9 +435,8 @@
}
collectionData = GNUNET_malloc (sizeof (CollectionInfo));
memset (collectionData, 0, sizeof (CollectionInfo));
- GNUNET_create_random_hash (&collectionData->data.lastId);
- GNUNET_ECRS_uri_get_namespace_from_sks(rootURI,
- &collectionData->data.pid);
+ GNUNET_create_random_hash (&collectionData->data.lastId);
+ GNUNET_ECRS_uri_get_namespace_from_sks (rootURI, &collectionData->data.pid);
collectionData->data.nextId = nextId;
collectionData->data.updateInterval = htonl (updateInterval);
collectionData->data.anonymityLevel = htonl (anonymityLevel);
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -39,13 +39,13 @@
static char *
getPseudonymFileName (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pid)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pid)
{
char *gnHome;
char *fileName;
GNUNET_EncName enc;
-
+
GNUNET_GC_get_configuration_value_filename (cfg,
"GNUNET",
"GNUNET_HOME",
@@ -54,7 +54,8 @@
gnHome = GNUNET_expand_file_name (ectx, fileName);
GNUNET_free (fileName);
fileName =
- GNUNET_malloc (strlen (gnHome) + strlen (PSEUDODIR) +
sizeof(GNUNET_EncName) + 2);
+ GNUNET_malloc (strlen (gnHome) + strlen (PSEUDODIR) +
+ sizeof (GNUNET_EncName) + 2);
strcpy (fileName, gnHome);
GNUNET_free (gnHome);
strcat (fileName, DIR_SEPARATOR_STR);
@@ -62,9 +63,8 @@
GNUNET_disk_directory_create (ectx, fileName);
if (pid != NULL)
{
- GNUNET_hash_to_enc(pid,
- &enc);
- strcat (fileName, (char*) &enc);
+ GNUNET_hash_to_enc (pid, &enc);
+ strcat (fileName, (char *) &enc);
}
return fileName;
}
@@ -75,9 +75,10 @@
*
* @return GNUNET_OK if the namespace exists, GNUNET_SYSERR if not
*/
-int GNUNET_ECRS_namespace_test_exists (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pid)
+int
+GNUNET_ECRS_namespace_test_exists (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pid)
{
char *fileName;
int ret;
@@ -178,15 +179,12 @@
return NULL;
}
hk = GNUNET_RSA_create_key ();
- GNUNET_RSA_get_public_key(hk,
- &pubk);
- GNUNET_hash(&pubk,
- sizeof(GNUNET_RSA_PublicKey),
- &pid);
+ GNUNET_RSA_get_public_key (hk, &pubk);
+ GNUNET_hash (&pubk, sizeof (GNUNET_RSA_PublicKey), &pid);
fileName = getPseudonymFileName (ectx, cfg, &pid);
if (GNUNET_YES == GNUNET_disk_file_test (ectx, fileName))
{
- GNUNET_GE_BREAK(NULL, 0); /* hash collision!? */
+ GNUNET_GE_BREAK (NULL, 0); /* hash collision!? */
GNUNET_free (fileName);
return NULL;
}
@@ -535,9 +533,8 @@
GNUNET_RSA_PublicKey pk;
GNUNET_HashCode pid;
- if (GNUNET_OK != GNUNET_enc_to_hash(name,
- &pid))
- return GNUNET_OK; /* ignore */
+ if (GNUNET_OK != GNUNET_enc_to_hash (name, &pid))
+ return GNUNET_OK; /* ignore */
fileName = getPseudonymFileName (c->ectx, c->cfg, &pid);
if (GNUNET_OK !=
GNUNET_disk_file_size (c->ectx, fileName, &len, GNUNET_YES))
@@ -549,9 +546,10 @@
{
GNUNET_GE_LOG (c->ectx,
GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER,
- _("File `%s' does not contain a pseudonym, trying to
remove.\n"),
+ _
+ ("File `%s' does not contain a pseudonym, trying to
remove.\n"),
fileName);
- UNLINK(fileName);
+ UNLINK (fileName);
GNUNET_free (fileName);
return GNUNET_OK;
}
@@ -573,8 +571,9 @@
{
GNUNET_GE_LOG (c->ectx,
GNUNET_GE_ERROR | GNUNET_GE_BULK | GNUNET_GE_USER,
- _("Format of file `%s' is invalid, trying to remove.\n"),
fileName);
- UNLINK(fileName);
+ _("Format of file `%s' is invalid, trying to remove.\n"),
+ fileName);
+ UNLINK (fileName);
GNUNET_free (fileName);
GNUNET_GE_BREAK (c->ectx, 0);
return GNUNET_SYSERR;
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -130,8 +130,8 @@
1) * GNUNET_FSUI_PROBE_TIME_FACTOR)
{
/* timeout hit! */
- GNUNET_ECRS_file_download_partial_stop (srl->
- test_download);
+ GNUNET_ECRS_file_download_partial_stop
+ (srl->test_download);
srl->test_download = NULL;
srl->probeFailure++;
event.type = GNUNET_FSUI_search_update;
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/fsui/upload.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -445,8 +445,8 @@
{
loc = GNUNET_ECRS_location_to_uri (utc->uri,
&hello->publicKey,
- ntohl (hello->
- expiration_time),
+ ntohl
+ (hello->expiration_time),
(GNUNET_ECRS_SignFunction) &
GNUNET_IDENTITY_sign_function,
sock);
Modified: GNUnet/src/applications/fs/gap/fs.c
===================================================================
--- GNUnet/src/applications/fs/gap/fs.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/applications/fs/gap/fs.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -239,10 +239,10 @@
ret = GNUNET_FS_ONDEMAND_add_indexed_content (cectx,
datastore,
ntohl (ri->priority),
- GNUNET_ntohll (ri->
- expiration),
- GNUNET_ntohll (ri->
- fileOffset),
+ GNUNET_ntohll
+ (ri->expiration),
+ GNUNET_ntohll
+ (ri->fileOffset),
ntohl (ri->anonymity_level),
&ri->fileId,
ntohs (ri->header.size) -
@@ -825,19 +825,17 @@
GNUNET_P2P_PROTO_GAP_QUERY, GNUNET_P2P_PROTO_GAP_RESULT);
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- capi->
- p2p_ciphertext_handler_register
+ capi->p2p_ciphertext_handler_register
(GNUNET_P2P_PROTO_GAP_QUERY, &handle_p2p_query));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- capi->
- p2p_ciphertext_handler_register
+ capi->p2p_ciphertext_handler_register
(GNUNET_P2P_PROTO_GAP_RESULT, &handle_p2p_content));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- capi->
- cs_handler_register (GNUNET_CS_PROTO_GAP_QUERY_START,
- &handle_cs_query_start_request));
+ capi->cs_handler_register
+ (GNUNET_CS_PROTO_GAP_QUERY_START,
+ &handle_cs_query_start_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
capi->cs_handler_register (GNUNET_CS_PROTO_GAP_INSERT,
@@ -880,51 +878,46 @@
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- p2p_ciphertext_handler_unregister
+ coreAPI->p2p_ciphertext_handler_unregister
(GNUNET_P2P_PROTO_GAP_QUERY, &handle_p2p_query));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- p2p_ciphertext_handler_unregister
+ coreAPI->p2p_ciphertext_handler_unregister
(GNUNET_P2P_PROTO_GAP_RESULT, &handle_p2p_content));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_QUERY_START,
- &handle_cs_query_start_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_QUERY_START,
+ &handle_cs_query_start_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_INSERT,
- &handle_cs_insert_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_INSERT, &handle_cs_insert_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_INDEX,
- &handle_cs_index_request));
+ coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_GAP_INDEX,
+ &handle_cs_index_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_INIT_INDEX,
- &handle_cs_init_index_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_INIT_INDEX,
+ &handle_cs_init_index_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_DELETE,
- &handle_cs_delete_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_DELETE, &handle_cs_delete_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_UNINDEX,
- &handle_cs_unindex_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_UNINDEX,
+ &handle_cs_unindex_request));
GNUNET_GE_ASSERT (ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_GAP_TESTINDEX,
- &handle_cs_test_indexed_request));
+ coreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_GAP_TESTINDEX,
+ &handle_cs_test_indexed_request));
GNUNET_FS_MIGRATION_done ();
GNUNET_FS_GAP_done ();
GNUNET_FS_DHT_done ();
Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/gap/gap.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -656,8 +656,7 @@
memset (table, 0, sizeof (struct RequestList *) * table_size);
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- peer_disconnect_notification_register
+ coreAPI->peer_disconnect_notification_register
(&cleanup_on_peer_disconnect, NULL));
GNUNET_cron_add_job (capi->cron,
&have_more_processor,
@@ -675,8 +674,8 @@
stat_gap_content_found_locally =
stats->create (gettext_noop ("# gap content found locally"));
stat_gap_query_refreshed =
- stats->
- create (gettext_noop ("# gap queries refreshed existing record"));
+ stats->create (gettext_noop
+ ("# gap queries refreshed existing record"));
stat_trust_earned = stats->create (gettext_noop ("# trust earned"));
}
cron = GNUNET_cron_create (coreAPI->ectx);
@@ -706,8 +705,7 @@
table = NULL;
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- peer_disconnect_notification_unregister
+ coreAPI->peer_disconnect_notification_unregister
(&cleanup_on_peer_disconnect, NULL));
coreAPI->service_release (datastore);
datastore = NULL;
Modified: GNUnet/src/applications/fs/gap/migration.c
===================================================================
--- GNUnet/src/applications/fs/gap/migration.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/gap/migration.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -423,8 +423,7 @@
unsigned long long option_value;
coreAPI = capi;
- coreAPI->
- send_callback_register
+ coreAPI->send_callback_register
(GNUNET_GAP_ESTIMATED_DATA_SIZE,
GNUNET_FS_GAP_CONTENT_MIGRATION_PRIORITY, &activeMigrationCallback);
datastore = capi->service_request ("datastore");
@@ -456,8 +455,7 @@
int i;
struct MigrationRecord *record;
- coreAPI->
- send_callback_unregister
+ coreAPI->send_callback_unregister
(GNUNET_GAP_ESTIMATED_DATA_SIZE, &activeMigrationCallback);
if (stats != NULL)
{
Modified: GNUnet/src/applications/fs/gap/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/gap/ondemand.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/gap/ondemand.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -409,9 +409,8 @@
}
if (GNUNET_ntohll (odb->fileOffset) != LSEEK (fileHandle,
- GNUNET_ntohll (odb->
- fileOffset),
- SEEK_SET))
+ GNUNET_ntohll
+ (odb->fileOffset), SEEK_SET))
{
GNUNET_GE_LOG_STRERROR_FILE (coreAPI->ectx,
GNUNET_GE_WARNING | GNUNET_GE_ADMIN |
Modified: GNUnet/src/applications/fs/gap/pid_table.c
===================================================================
--- GNUnet/src/applications/fs/gap/pid_table.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/gap/pid_table.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -173,12 +173,11 @@
{
stat_pid_entries
=
- stats->
- create (gettext_noop ("# distinct interned peer IDs in pid table"));
+ stats->create (gettext_noop
+ ("# distinct interned peer IDs in pid table"));
stat_pid_rc =
- stats->
- create (gettext_noop
- ("# total RC of interned peer IDs in pid table"));
+ stats->create (gettext_noop
+ ("# total RC of interned peer IDs in pid table"));
}
}
Modified: GNUnet/src/applications/fs/gap/plan.c
===================================================================
--- GNUnet/src/applications/fs/gap/plan.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/fs/gap/plan.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -951,19 +951,18 @@
coreAPI = capi;
GNUNET_GE_ASSERT (capi->ectx,
GNUNET_SYSERR !=
- capi->
- cs_disconnect_handler_register (&handle_client_exit));
+ capi->cs_disconnect_handler_register
+ (&handle_client_exit));
GNUNET_GE_ASSERT (capi->ectx,
GNUNET_SYSERR !=
- capi->
- peer_disconnect_notification_register
+ capi->peer_disconnect_notification_register
(&peer_disconnect_handler, NULL));
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- send_callback_register (sizeof (P2P_gap_query_MESSAGE),
- GNUNET_FS_GAP_QUERY_POLL_PRIORITY,
- &query_fill_callback));
+ coreAPI->send_callback_register (sizeof
+ (P2P_gap_query_MESSAGE),
+
GNUNET_FS_GAP_QUERY_POLL_PRIORITY,
+ &query_fill_callback));
stats = capi->service_request ("stats");
if (stats != NULL)
{
@@ -994,19 +993,17 @@
handle_client_exit (clients->client);
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_disconnect_handler_unregister (&handle_client_exit));
+ coreAPI->cs_disconnect_handler_unregister
+ (&handle_client_exit));
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- peer_disconnect_notification_unregister
+ coreAPI->peer_disconnect_notification_unregister
(&peer_disconnect_handler, NULL));
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- send_callback_unregister (sizeof
- (P2P_gap_query_MESSAGE),
- &query_fill_callback));
+ coreAPI->send_callback_unregister (sizeof
+ (P2P_gap_query_MESSAGE),
+ &query_fill_callback));
if (stats != NULL)
{
coreAPI->service_release (stats);
Modified: GNUnet/src/applications/fs/gap/querymanager.c
===================================================================
--- GNUnet/src/applications/fs/gap/querymanager.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/fs/gap/querymanager.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -628,8 +628,8 @@
coreAPI = capi;
GNUNET_GE_ASSERT (capi->ectx,
GNUNET_SYSERR !=
- capi->
- cs_disconnect_handler_register (&handle_client_exit));
+ capi->cs_disconnect_handler_register
+ (&handle_client_exit));
datastore = capi->service_request ("datastore");
stats = capi->service_request ("stats");
if (stats != NULL)
@@ -643,8 +643,8 @@
stat_gap_client_query_injected =
stats->create (gettext_noop ("# gap client requests injected"));
stat_gap_client_bf_updates =
- stats->
- create (gettext_noop ("# gap query bloomfilter resizing updates"));
+ stats->create (gettext_noop
+ ("# gap query bloomfilter resizing updates"));
}
GNUNET_cron_add_job (capi->cron,
&repeat_requests_job,
@@ -659,8 +659,8 @@
&repeat_requests_job, CHECK_REPEAT_FREQUENCY, NULL);
GNUNET_GE_ASSERT (coreAPI->ectx,
GNUNET_SYSERR !=
- coreAPI->
- cs_disconnect_handler_unregister (&handle_client_exit));
+ coreAPI->cs_disconnect_handler_unregister
+ (&handle_client_exit));
while (clients != NULL)
handle_client_exit (clients->client);
coreAPI->service_release (datastore);
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -450,11 +450,10 @@
/* check arguments */
if (pseudonym != NULL)
{
- if ( (GNUNET_OK !=
- GNUNET_PSEUDO_name_to_id(ectx, cfg,
- pseudonym, &pid)) ||
- (GNUNET_OK !=
- GNUNET_ECRS_namespace_test_exists (ectx, cfg, &pid)) )
+ if ((GNUNET_OK !=
+ GNUNET_PSEUDO_name_to_id (ectx, cfg,
+ pseudonym, &pid)) ||
+ (GNUNET_OK != GNUNET_ECRS_namespace_test_exists (ectx, cfg, &pid)))
{
printf (_("Could not access namespace `%s' (does not exist?).\n"),
pseudonym);
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -251,10 +251,10 @@
GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_TITLE, create_name);
if (start_collection)
{
- /* FIXME: allow other update policies */
+ /* FIXME: allow other update policies */
if (GNUNET_OK == GNUNET_CO_collection_start (anonymity,
- priority,
-
GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC,
+ priority,
+
GNUNET_ECRS_SBLOCK_UPDATE_SPORADIC,
meta))
{
printf ("%s", _("Started collection.\n"));
@@ -303,13 +303,12 @@
}
else
{
- GNUNET_ECRS_uri_get_namespace_from_sks(rootURI,
- &nsid);
- ns_name = GNUNET_PSEUDO_id_to_name(ectx, cfg, &nsid);
+ GNUNET_ECRS_uri_get_namespace_from_sks (rootURI, &nsid);
+ ns_name = GNUNET_PSEUDO_id_to_name (ectx, cfg, &nsid);
root = GNUNET_ECRS_uri_to_string (rootURI);
printf (_("Namespace `%s' created (root: %s).\n"),
ns_name, root);
- GNUNET_free (ns_name);
+ GNUNET_free (ns_name);
GNUNET_free (root);
GNUNET_ECRS_uri_destroy (rootURI);
}
Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/identity/identity.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -696,9 +696,8 @@
if (protocol == GNUNET_TRANSPORT_PROTOCOL_NUMBER_ANY)
protocol =
- host->
- protocols[GNUNET_random_u32
- (GNUNET_RANDOM_QUALITY_WEAK, host->protocolCount)];
+ host->protocols[GNUNET_random_u32
+ (GNUNET_RANDOM_QUALITY_WEAK, host->protocolCount)];
for (i = 0; i < host->helloCount; i++)
{
@@ -1458,9 +1457,8 @@
&identityHelloHandler);
coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_IDENTITY_REQUEST_HELLO,
&identityRequestHelloHandler);
- coreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_IDENTITY_REQUEST_SIGNATURE,
- &identityRequestSignatureHandler);
+ coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_IDENTITY_REQUEST_SIGNATURE,
+ &identityRequestSignatureHandler);
coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_IDENTITY_REQUEST_INFO,
&identityRequestInfoHandler);
for (i = 0; i < MAX_TEMP_HOSTS; i++)
Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/pingpong/pingpong.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -532,8 +532,8 @@
= stats->create (gettext_noop ("# plaintext PONG messages sent"));
stat_plaintextPongFailed
=
- stats->
- create (gettext_noop ("# plaintext PONG transmissions failed"));
+ stats->create (gettext_noop
+ ("# plaintext PONG transmissions failed"));
}
pingPongLock = capi->global_lock_get ();
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -1411,8 +1411,8 @@
if (type != 0)
stmt =
(vhash !=
- NULL) ? dbh->select_entry_by_hash_vhash_and_type : dbh->
- select_entry_by_hash_and_type;
+ NULL) ? dbh->select_entry_by_hash_vhash_and_type :
+ dbh->select_entry_by_hash_and_type;
else
stmt =
(vhash !=
Modified: GNUnet/src/applications/sqstore_mysql/mysqltest.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysqltest.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/sqstore_mysql/mysqltest.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -216,9 +216,8 @@
(GNUNET_DatastoreValueIterator) &
priorityCheck, &i));
ASSERT (1 ==
- api->
- iterateAllNow ((GNUNET_DatastoreValueIterator) & iteratePriority,
- api));
+ api->iterateAllNow ((GNUNET_DatastoreValueIterator) &
+ iteratePriority, api));
i += 4;
ASSERT (1 == api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY,
(GNUNET_DatastoreValueIterator) &
Modified: GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -226,9 +226,8 @@
(GNUNET_DatastoreValueIterator) &
priorityCheck, &i));
ASSERT (1 ==
- api->
- iterateAllNow ((GNUNET_DatastoreValueIterator) & iteratePriority,
- api));
+ api->iterateAllNow ((GNUNET_DatastoreValueIterator) &
+ iteratePriority, api));
i += 4;
ASSERT (1 == api->iterateExpirationTime (GNUNET_ECRS_BLOCKTYPE_ANY,
(GNUNET_DatastoreValueIterator) &
Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/stats/statistics.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -327,8 +327,8 @@
{
memcpy (&
((char
- *) (((CS_stats_reply_MESSAGE_GENERIC *) statMsg))->
- values)[mpos], entries[pos].description,
+ *) (((CS_stats_reply_MESSAGE_GENERIC *)
+ statMsg))->values)[mpos], entries[pos].description,
entries[pos].descStrLen + 1);
mpos += entries[pos].descStrLen + 1;
}
@@ -430,12 +430,10 @@
GNUNET_P2P_PROTO_NOISE);
capi->cs_handler_register (GNUNET_CS_PROTO_STATS_GET_STATISTICS,
&sendStatistics);
- capi->
- cs_handler_register
+ capi->cs_handler_register
(GNUNET_CS_PROTO_STATS_GET_P2P_MESSAGE_SUPPORTED,
&handleMessageSupported);
- capi->
- cs_handler_register
+ capi->cs_handler_register
(GNUNET_CS_PROTO_STATS_GET_CS_MESSAGE_SUPPORTED, &handleMessageSupported);
capi->cs_handler_register (GNUNET_CS_PROTO_TRAFFIC_COUNT,
&processGetConnectionCountRequest);
@@ -464,12 +462,10 @@
GNUNET_GE_ASSERT (NULL, myCoreAPI != NULL);
coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_STATS_GET_STATISTICS,
&sendStatistics);
- coreAPI->
- cs_handler_unregister
+ coreAPI->cs_handler_unregister
(GNUNET_CS_PROTO_STATS_GET_P2P_MESSAGE_SUPPORTED,
&handleMessageSupported);
- coreAPI->
- cs_handler_unregister
+ coreAPI->cs_handler_unregister
(GNUNET_CS_PROTO_STATS_GET_CS_MESSAGE_SUPPORTED, &handleMessageSupported);
coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_TRAFFIC_COUNT,
&processGetConnectionCountRequest);
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -228,10 +228,11 @@
fprintf (stderr, "connecting node %u to %u\n", i, nodeToConnect);
GNUNET_REMOTE_get_daemons_information (list_as_array[i]->hostname,
list_as_array[i]->port,
- list_as_array[nodeToConnect]->
- hostname,
- list_as_array[nodeToConnect]->
- port, &node1, &node2);
+ list_as_array
+ [nodeToConnect]->hostname,
+ list_as_array
+ [nodeToConnect]->port, &node1,
+ &node2);
node1temp = GNUNET_malloc (sizeof (struct GNUNET_REMOTE_friends_list));
node2temp = GNUNET_malloc (sizeof (struct GNUNET_REMOTE_friends_list));
Modified: GNUnet/src/applications/traffic/traffic.c
===================================================================
--- GNUnet/src/applications/traffic/traffic.c 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/applications/traffic/traffic.c 2008-05-31 20:00:22 UTC (rev
6951)
@@ -322,12 +322,12 @@
if (counters[i] != NULL)
{
if (counters[i]->send.slots != 0)
- buildSummary (&((CS_traffic_info_MESSAGE_GENERIC *) reply)->
- counters[count++], &counters[i]->send,
+ buildSummary (&((CS_traffic_info_MESSAGE_GENERIC *) reply)->counters
+ [count++], &counters[i]->send,
GNUNET_TRAFFIC_TYPE_SENT, countTimeUnits, i);
if (counters[i]->receive.slots != 0)
- buildSummary (&((CS_traffic_info_MESSAGE_GENERIC *) reply)->
- counters[count++], &counters[i]->receive,
+ buildSummary (&((CS_traffic_info_MESSAGE_GENERIC *) reply)->counters
+ [count++], &counters[i]->receive,
GNUNET_TRAFFIC_TYPE_RECEIVED, countTimeUnits, i);
}
@@ -662,9 +662,8 @@
GNUNET_GE_ASSERT (NULL, myCoreAPI != NULL);
GNUNET_GE_ASSERT (myCoreAPI->ectx,
GNUNET_SYSERR !=
- myCoreAPI->
- cs_handler_unregister (GNUNET_CS_PROTO_TRAFFIC_QUERY,
- &trafficQueryHandler));
+ myCoreAPI->cs_handler_unregister
+ (GNUNET_CS_PROTO_TRAFFIC_QUERY, &trafficQueryHandler));
myCoreAPI->service_release (myApi);
myApi = NULL;
myCoreAPI = NULL;
Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c 2008-05-31 19:53:36 UTC
(rev 6950)
+++ GNUnet/src/applications/transport/transport.c 2008-05-31 20:00:22 UTC
(rev 6951)
@@ -125,8 +125,7 @@
tapi->hello->header.type = htons (GNUNET_P2P_PROTO_HELLO);
tapi->hello->header.size = htons (GNUNET_sizeof_hello (tapi->hello));
if (GNUNET_SYSERR == identity->signData (&(tapi->hello)->senderIdentity,
- GNUNET_sizeof_hello (tapi->
- hello) -
+ GNUNET_sizeof_hello (tapi->hello) -
sizeof (GNUNET_RSA_Signature) -
sizeof (GNUNET_RSA_PublicKey) -
sizeof (GNUNET_MessageHeader),
Modified: GNUnet/src/applications/vpn/vpn.c
===================================================================
--- GNUnet/src/applications/vpn/vpn.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/applications/vpn/vpn.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -645,9 +645,10 @@
sizeof (struct tun_pi));
coreAPI->ciphertext_send (&((store1 + i)->peer), gp,
GNUNET_EXTREME_PRIORITY, 1);
- coreAPI->
- p2p_connection_preference_increase (&((store1 + i)->peer),
- 1000);
+ coreAPI->p2p_connection_preference_increase (&
+ ((store1 +
+ i)->peer),
+ 1000);
}
}
/* we do this here as we get a race if the p2p handler tries it */
Modified: GNUnet/src/include/gnunet_chat_lib.h
===================================================================
--- GNUnet/src/include/gnunet_chat_lib.h 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/include/gnunet_chat_lib.h 2008-05-31 20:00:22 UTC (rev
6951)
@@ -127,8 +127,9 @@
typedef int (*GNUNET_CHAT_MessageCallback) (void *cls,
struct GNUNET_CHAT_Room * room,
const GNUNET_HashCode * sender,
- const struct GNUNET_ECRS_MetaData
*member_info,
- const char *message,
+ const struct GNUNET_ECRS_MetaData
+ * member_info,
+ const char *message,
GNUNET_CHAT_MSG_OPTIONS options);
/**
@@ -189,6 +190,8 @@
struct GNUNET_ECRS_MetaData
*member_info,
const char *room_name,
+ GNUNET_CHAT_MSG_OPTIONS
+ msg_options,
GNUNET_CHAT_MessageCallback
messageCallback,
void *message_cls,
Modified: GNUnet/src/include/gnunet_collection_lib.h
===================================================================
--- GNUnet/src/include/gnunet_collection_lib.h 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/include/gnunet_collection_lib.h 2008-05-31 20:00:22 UTC (rev
6951)
@@ -71,8 +71,7 @@
*
* @return NULL if there is no collection, otherwise its metadata
*/
-struct GNUNET_ECRS_MetaData *
-GNUNET_CO_collection_get_name (void);
+struct GNUNET_ECRS_MetaData *GNUNET_CO_collection_get_name (void);
/**
* GNUNET_ND_UPLOAD an update of the current collection information to the
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-31 20:00:22 UTC (rev
6951)
@@ -392,9 +392,11 @@
* @return an ECRS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_keyword_string_to_uri (struct GNUNET_GE_Context *ectx,
- const char *keywords);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_keyword_string_to_uri (struct
+ GNUNET_GE_Context
+ *ectx,
+ const char
+ *keywords);
/**
* Create an ECRS URI from a user-supplied command line of keywords.
@@ -413,10 +415,13 @@
* @return an ECRS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_keyword_command_line_to_uri (struct GNUNET_GE_Context *ectx,
- unsigned int argc,
- const char**argv);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_keyword_command_line_to_uri (struct
+
GNUNET_GE_Context
+ *ectx,
+ unsigned int
+ argc,
+ const char
+ **argv);
/**
* Test if two URIs are equal.
@@ -544,18 +549,17 @@
* @return GNUNET_SYSERR if the upload failed (i.e. not enough space
* or gnunetd not running)
*/
-int GNUNET_ECRS_file_upload (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *filename,
- int doIndex,
- unsigned int anonymityLevel,
- unsigned int priority,
- GNUNET_CronTime expirationTime,
+int GNUNET_ECRS_file_upload (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const char *filename,
+ int doIndex,
+ unsigned int anonymityLevel,
+ unsigned int priority,
+ GNUNET_CronTime expirationTime,
GNUNET_ECRS_UploadProgressCallback upcb,
- void *upcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure,
- struct GNUNET_ECRS_URI **uri);
+ void *upcbClosure,
+ GNUNET_ECRS_TestTerminate tt,
+ void *ttClosure, struct GNUNET_ECRS_URI **uri);
/**
* Test if a file is indexed.
@@ -598,12 +602,11 @@
* @return GNUNET_SYSERR if the unindexing failed (i.e. not indexed)
*/
int GNUNET_ECRS_file_unindex (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *filename,
- GNUNET_ECRS_UploadProgressCallback upcb,
- void *upcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure);
+ struct GNUNET_GC_Configuration *cfg,
+ const char *filename,
+ GNUNET_ECRS_UploadProgressCallback upcb,
+ void *upcbClosure,
+ GNUNET_ECRS_TestTerminate tt, void *ttClosure);
/**
@@ -626,15 +629,24 @@
*
* @return URI on success, NULL on error (namespace already exists)
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_namespace_create (struct GNUNET_GE_Context*ectx,
- struct GNUNET_GC_Configuration*cfg,
- const struct GNUNET_ECRS_MetaData *meta,
- unsigned int anonymityLevel,
- unsigned int priority,
- GNUNET_CronTime expiration,
- const struct GNUNET_ECRS_URI *advertisementURI,
- const GNUNET_HashCode *rootEntry);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_namespace_create (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg,
+ const struct
+ GNUNET_ECRS_MetaData
+ *meta,
+ unsigned int
+ anonymityLevel,
+ unsigned int priority,
+ GNUNET_CronTime
+ expiration,
+ const struct
+ GNUNET_ECRS_URI
+ *advertisementURI,
+ const GNUNET_HashCode *
+ rootEntry);
/**
* Check if the given namespace exists (locally).
@@ -652,9 +664,9 @@
*
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_ECRS_namespace_delete (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pid);
+int GNUNET_ECRS_namespace_delete (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pid);
/**
* Callback with information about local (!) namespaces.
@@ -674,9 +686,9 @@
* @return GNUNET_SYSERR on error, otherwise the number of pseudonyms in list
*/
int GNUNET_ECRS_get_namespaces (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_ECRS_NamespaceInfoProcessor cb,
- void *cls);
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_ECRS_NamespaceInfoProcessor cb,
+ void *cls);
/**
* Add an entry into a namespace.
@@ -687,19 +699,37 @@
* entry?
* @return URI on success, NULL on error
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_namespace_add_content (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pid,
- unsigned int anonymityLevel,
- unsigned int priority,
- GNUNET_CronTime expirationTime,
- GNUNET_Int32Time creationTime,
- GNUNET_Int32Time updateInterval,
- const GNUNET_HashCode *thisId,
- const GNUNET_HashCode *nextId,
- const struct GNUNET_ECRS_URI *dst,
- const struct GNUNET_ECRS_MetaData *md);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_namespace_add_content (struct
+ GNUNET_GE_Context
+ *ectx,
+ struct
+
GNUNET_GC_Configuration
+ *cfg,
+ const
+ GNUNET_HashCode *
+ pid,
+ unsigned int
+ anonymityLevel,
+ unsigned int
+ priority,
+ GNUNET_CronTime
+ expirationTime,
+ GNUNET_Int32Time
+ creationTime,
+ GNUNET_Int32Time
+ updateInterval,
+ const
+ GNUNET_HashCode *
+ thisId,
+ const
+ GNUNET_HashCode *
+ nextId,
+ const struct
+ GNUNET_ECRS_URI
+ *dst,
+ const struct
+ GNUNET_ECRS_MetaData
+ *md);
/**
* Add an entry into the K-space (keyword space).
@@ -743,13 +773,21 @@
* this must be a simple URI (with a single
* keyword)
*/
-struct GNUNET_ECRS_SearchContext *
-GNUNET_ECRS_search_start (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const struct GNUNET_ECRS_URI *uri,
- unsigned int anonymityLevel,
- GNUNET_ECRS_SearchResultProcessor spcb,
- void *spcbClosure);
+struct GNUNET_ECRS_SearchContext *GNUNET_ECRS_search_start (struct
+ GNUNET_GE_Context
+ *ectx,
+ struct
+
GNUNET_GC_Configuration
+ *cfg,
+ const struct
+ GNUNET_ECRS_URI
+ *uri,
+ unsigned int
+ anonymityLevel,
+
GNUNET_ECRS_SearchResultProcessor
+ spcb,
+ void
+ *spcbClosure);
/**
* Stop search for content.
@@ -765,14 +803,13 @@
* @param uri specifies the search parameters
* @param uri set to the URI of the uploaded file
*/
-int GNUNET_ECRS_search (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const struct GNUNET_ECRS_URI *uri,
- unsigned int anonymityLevel,
- GNUNET_ECRS_SearchResultProcessor spcb,
- void *spcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure);
+int GNUNET_ECRS_search (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const struct GNUNET_ECRS_URI *uri,
+ unsigned int anonymityLevel,
+ GNUNET_ECRS_SearchResultProcessor spcb,
+ void *spcbClosure,
+ GNUNET_ECRS_TestTerminate tt, void *ttClosure);
/**
* Notification of ECRS to a client about the progress of an insertion
@@ -847,14 +884,13 @@
* @param filename where to store the file
*/
int GNUNET_ECRS_file_download (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const struct GNUNET_ECRS_URI *uri,
- const char *filename,
- unsigned int anonymityLevel,
- GNUNET_ECRS_DownloadProgressCallback dpcb,
- void *dpcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure);
+ struct GNUNET_GC_Configuration *cfg,
+ const struct GNUNET_ECRS_URI *uri,
+ const char *filename,
+ unsigned int anonymityLevel,
+ GNUNET_ECRS_DownloadProgressCallback dpcb,
+ void *dpcbClosure,
+ GNUNET_ECRS_TestTerminate tt, void *ttClosure);
/**
* DOWNLOAD parts of a file. Note that this will store
@@ -875,18 +911,18 @@
* @param start starting offset
* @param length length of the download (starting at offset)
*/
-int GNUNET_ECRS_file_download_partial (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const struct GNUNET_ECRS_URI *uri,
- const char *filename,
- unsigned long long offset,
- unsigned long long length,
- unsigned int anonymityLevel,
- int no_temporaries,
- GNUNET_ECRS_DownloadProgressCallback
dpcb,
- void *dpcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure);
+int GNUNET_ECRS_file_download_partial (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const struct GNUNET_ECRS_URI *uri,
+ const char *filename,
+ unsigned long long offset,
+ unsigned long long length,
+ unsigned int anonymityLevel,
+ int no_temporaries,
+ GNUNET_ECRS_DownloadProgressCallback
+ dpcb, void *dpcbClosure,
+ GNUNET_ECRS_TestTerminate tt,
+ void *ttClosure);
/**
* Iterate over all entries in a directory. Note that directories
@@ -903,11 +939,11 @@
* directory is malformed
*/
int GNUNET_ECRS_directory_list_contents (struct GNUNET_GE_Context *ectx,
- const char *data,
- unsigned long long len,
- struct GNUNET_ECRS_MetaData **md,
- GNUNET_ECRS_SearchResultProcessor
spcb,
- void *spcbClosure);
+ const char *data,
+ unsigned long long len,
+ struct GNUNET_ECRS_MetaData **md,
+ GNUNET_ECRS_SearchResultProcessor
+ spcb, void *spcbClosure);
/**
* Create a directory.
Modified: GNUnet/src/include/gnunet_namespace_lib.h
===================================================================
--- GNUnet/src/include/gnunet_namespace_lib.h 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/include/gnunet_namespace_lib.h 2008-05-31 20:00:22 UTC (rev
6951)
@@ -65,15 +65,25 @@
* @param meta meta-data about the namespace (maybe NULL)
* @return URI on success, NULL on error (namespace already exists)
*/
-struct GNUNET_ECRS_URI *
-GNUNET_NS_namespace_create (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- unsigned int anonymityLevel,
- unsigned int insertPriority,
- GNUNET_CronTime insertExpiration,
- const struct GNUNET_ECRS_MetaData *meta,
- const struct GNUNET_ECRS_URI*advertisementURI,
- const GNUNET_HashCode *rootEntry);
+struct GNUNET_ECRS_URI *GNUNET_NS_namespace_create (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg,
+ unsigned int
+ anonymityLevel,
+ unsigned int
+ insertPriority,
+ GNUNET_CronTime
+ insertExpiration,
+ const struct
+ GNUNET_ECRS_MetaData
+ *meta,
+ const struct
+ GNUNET_ECRS_URI
+ *advertisementURI,
+ const GNUNET_HashCode *
+ rootEntry);
/**
* Delete a local namespace. Only prevents future insertions into the
@@ -137,19 +147,31 @@
* entry?
* @return the resulting URI, NULL on error
*/
-struct GNUNET_ECRS_URI *
-GNUNET_NS_add_to_namespace (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- unsigned int anonymityLevel,
- unsigned int insertPriority,
- GNUNET_CronTime insertExpiration,
- const GNUNET_HashCode * nsid,
- GNUNET_Int32Time updateInterval,
- const GNUNET_HashCode * lastId,
- const GNUNET_HashCode * thisId,
- const GNUNET_HashCode * nextId,
- const struct GNUNET_ECRS_URI *dst,
- const struct GNUNET_ECRS_MetaData *md);
+struct GNUNET_ECRS_URI *GNUNET_NS_add_to_namespace (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg,
+ unsigned int
+ anonymityLevel,
+ unsigned int
+ insertPriority,
+ GNUNET_CronTime
+ insertExpiration,
+ const GNUNET_HashCode *
+ nsid,
+ GNUNET_Int32Time
+ updateInterval,
+ const GNUNET_HashCode *
+ lastId,
+ const GNUNET_HashCode *
+ thisId,
+ const GNUNET_HashCode *
+ nextId,
+ const struct
+ GNUNET_ECRS_URI *dst,
+ const struct
+ GNUNET_ECRS_MetaData *md);
/**
* Compute the next ID for peridodically updated content.
@@ -168,20 +190,23 @@
/**
* List all updateable content in a given namespace.
*/
-int GNUNET_NS_namespace_list_contents (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid,
- GNUNET_NS_UpdateIterator iterator,
- void *closure);
+int GNUNET_NS_namespace_list_contents (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid,
+ GNUNET_NS_UpdateIterator iterator,
+ void *closure);
/**
* Convert namespace URI to a human readable format
* (using the namespace description, if available).
*/
-char *
-GNUNET_NS_sks_uri_to_human_readable_string (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration*cfg,
- const struct GNUNET_ECRS_URI *uri);
+char *GNUNET_NS_sks_uri_to_human_readable_string (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg,
+ const struct GNUNET_ECRS_URI
+ *uri);
Modified: GNUnet/src/include/gnunet_protocols.h
===================================================================
--- GNUnet/src/include/gnunet_protocols.h 2008-05-31 19:53:36 UTC (rev
6950)
+++ GNUnet/src/include/gnunet_protocols.h 2008-05-31 20:00:22 UTC (rev
6951)
@@ -279,7 +279,7 @@
#define GNUNET_CS_PROTO_DHT_REQUEST_PUT 61
/**
* Client to CS: end get from table (ends request)
- */
+ */
#define GNUNET_CS_PROTO_DHT_REQUEST_GET_END 62
/* ************* CS VPN messages ************* */
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/server/connection.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -2569,7 +2569,8 @@
firstRound = GNUNET_YES;
for (u = 0; u < activePeerCount; u++)
{
- GNUNET_CORE_connection_reserve_downstream_bandwidth (&entries[u]->
+ GNUNET_CORE_connection_reserve_downstream_bandwidth (&entries
+ [u]->
session.sender, 0);
entries[u]->idealized_limit = 0;
}
@@ -2596,19 +2597,17 @@
if ((share < MIN_BPM_PER_PEER) &&
((minCon > 0) &&
((guardCon < minCon) ||
- (topology->
- isConnectionGuarded (&entries[u]->session.sender,
- &remaining_connection_iterator,
- &utl)))))
+ (topology->isConnectionGuarded
+ (&entries[u]->session.sender,
+ &remaining_connection_iterator, &utl)))))
{
/* use one of the minCon's to keep the connection! */
share += MIN_BPM_PER_PEER;
decrementSB -= MIN_BPM_PER_PEER; /* do not count */
minCon--;
- if (topology->
- isConnectionGuarded (&entries[u]->session.sender,
- &remaining_connection_iterator,
- &utl))
+ if (topology->isConnectionGuarded
+ (&entries[u]->session.sender,
+ &remaining_connection_iterator, &utl))
guardCon--;
}
if (share > entries[u]->idealized_limit)
@@ -3650,9 +3649,8 @@
next = be->overflowChain;
j =
- GNUNET_CORE_connection_compute_index_of_peer (&be->
- session.
- sender);
+ GNUNET_CORE_connection_compute_index_of_peer
+ (&be->session.sender);
be->overflowChain = newBuffer[j];
newBuffer[j] = be;
be = next;
@@ -3733,8 +3731,8 @@
= stats->create (gettext_noop ("# connections closed (HANGUP sent)"));
stat_closedTransport
=
- stats->
- create (gettext_noop ("# connections closed (transport issue)"));
+ stats->create (gettext_noop
+ ("# connections closed (transport issue)"));
stat_encrypted = stats->create (gettext_noop ( /* includes encrypted
but then
not transmitted
data */
"# bytes encrypted"));
@@ -3753,44 +3751,41 @@
=
stats->create (gettext_noop ("# total bytes per second send limit"));
stat_total_allowed_recv =
- stats->
- create (gettext_noop ("# total bytes per second receive limit"));
+ stats->create (gettext_noop
+ ("# total bytes per second receive limit"));
stat_total_send_buffer_size =
- stats->
- create (gettext_noop ("# total number of messages in send buffers"));
+ stats->create (gettext_noop
+ ("# total number of messages in send buffers"));
stat_total_lost_sent =
- stats->
- create (gettext_noop
- ("# total number of bytes we were allowed to send but did
not"));
+ stats->create (gettext_noop
+ ("# total number of bytes we were allowed to send but
did not"));
stat_total_allowed_inc =
- stats->
- create (gettext_noop
- ("# total number of bytes we were allowed to sent"));
+ stats->create (gettext_noop
+ ("# total number of bytes we were allowed to sent"));
stat_total_allowed_now =
- stats->
- create (gettext_noop
- ("# total number of bytes we are currently allowed to send"));
+ stats->create (gettext_noop
+ ("# total number of bytes we are currently allowed to
send"));
stat_transport_switches =
- stats->
- create (gettext_noop ("# transports switched to stream transport"));
+ stats->create (gettext_noop
+ ("# transports switched to stream transport"));
stat_avg_lifetime =
- stats->
- create (gettext_noop ("# average connection lifetime (in ms)"));
+ stats->create (gettext_noop
+ ("# average connection lifetime (in ms)"));
stat_shutdown_excessive_bandwidth =
- stats->
- create (gettext_noop ("# conn. shutdown: other peer sent too much"));
+ stats->create (gettext_noop
+ ("# conn. shutdown: other peer sent too much"));
stat_shutdown_insufficient_bandwidth =
- stats->
- create (gettext_noop ("# conn. shutdown: we lacked bandwidth"));
+ stats->create (gettext_noop
+ ("# conn. shutdown: we lacked bandwidth"));
stat_shutdown_timeout =
- stats->
- create (gettext_noop ("# conn. shutdown: other peer timed out"));
+ stats->create (gettext_noop
+ ("# conn. shutdown: other peer timed out"));
stat_shutdown_connect_timeout =
- stats->
- create (gettext_noop ("# conn. shutdown: timed out during connect"));
+ stats->create (gettext_noop
+ ("# conn. shutdown: timed out during connect"));
stat_shutdown_hangup_received =
- stats->
- create (gettext_noop ("# conn. shutdown: other peer requested it"));
+ stats->create (gettext_noop
+ ("# conn. shutdown: other peer requested it"));
}
transport->start (&GNUNET_CORE_p2p_receive);
EXIT ();
Modified: GNUnet/src/server/core.c
===================================================================
--- GNUnet/src/server/core.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/server/core.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -568,8 +568,7 @@
applicationCore.peer_send_notification_register =
&GNUNET_CORE_connection_register_send_notification_callback;
- applicationCore.
- peer_send_notification_unregister =
+ applicationCore.peer_send_notification_unregister =
&GNUNET_CORE_connection_unregister_send_notification_callback;
applicationCore.p2p_ciphertext_handler_register =
&GNUNET_CORE_p2p_register_handler; /* handler.c */
applicationCore.p2p_ciphertext_handler_unregister =
&GNUNET_CORE_p2p_unregister_handler; /* handler.c */
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/transports/http.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -1653,8 +1653,9 @@
getData->woff = 0;
}
/* append */
- hdr = (GNUNET_MessageHeader *) & getData->
- wbuff[getData->woff + getData->wpos];
+ hdr =
+ (GNUNET_MessageHeader *) & getData->wbuff[getData->woff +
+ getData->wpos];
hdr->size = htons (size);
hdr->type = htons (0);
memcpy (&hdr[1], msg, size - sizeof (GNUNET_MessageHeader));
Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/transports/smtp.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -423,9 +423,8 @@
maddr = (const EmailAddress *) &hello[1];
if ((ntohs (hello->header.size) !=
sizeof (GNUNET_MessageHello) + ntohs (hello->senderAddressSize)) ||
- (maddr->
- senderAddress[ntohs (hello->senderAddressSize) - 1 -
- FILTER_STRING_SIZE] != '\0'))
+ (maddr->senderAddress[ntohs (hello->senderAddressSize) - 1 -
+ FILTER_STRING_SIZE] != '\0'))
{
GNUNET_GE_BREAK (ectx, 0);
return GNUNET_SYSERR; /* obviously invalid */
Modified: GNUnet/src/util/os/semaphore.c
===================================================================
--- GNUnet/src/util/os/semaphore.c 2008-05-31 19:53:36 UTC (rev 6950)
+++ GNUnet/src/util/os/semaphore.c 2008-05-31 20:00:22 UTC (rev 6951)
@@ -96,15 +96,18 @@
{2, 1, SEM_UNDO} /* then increment [2] to 1 - this locks it */
/* UNDO to release the lock if processes exits *//* before explicitly
unlocking */
};
+
static struct sembuf op_unlock[1] = {
{2, -1, SEM_UNDO} /* decrement [2] (lock) back to 0 */
};
+
static struct sembuf op_endcreate[2] = {
{1, -1, SEM_UNDO}, /* decrement [1] (proc counter) with undo on
exit */
/* UNDO to adjust proc counter if process exits
before explicitly calling sem_close() */
{2, -1, SEM_UNDO} /* then decrement [2] (lock) back to 0 */
};
+
static struct sembuf op_close[3] = {
{2, 0, 0}, /* wait for [2] (lock) to equal 0 */
{2, 1, SEM_UNDO}, /* then increment [2] to 1 - this locks it */
@@ -136,6 +139,7 @@
}
fsync (fd);
}
+
static int
SEMA_LSEEK (int fd, off_t pos, int mode)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6951 - in GNUnet: libltdl src/applications/advertising src/applications/chat/lib src/applications/chat/module src/applications/chat/tools src/applications/dht/module src/applications/dht/tools src/applications/fragmentation src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/gap src/applications/fs/tools src/applications/identity src/applications/pingpong src/applications/sqstore_mysql src/applications/sqstore_sqlite src/applications/stats src/applications/testing src/applications/traffic src/applications/transport src/applications/vpn src/include src/server src/transports src/util/os,
gnunet <=