[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6931 - in GNUnet/src: applications/chat applications/dht/m
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6931 - in GNUnet/src: applications/chat applications/dht/module applications/dht/tools applications/dstore_sqlite applications/fs/ecrs applications/fs/fsui applications/fs/pseudonyms applications/fs/tools include util/network_client |
Date: |
Thu, 29 May 2008 23:20:36 -0600 (MDT) |
Author: grothoff
Date: 2008-05-29 23:20:36 -0600 (Thu, 29 May 2008)
New Revision: 6931
Modified:
GNUnet/src/applications/chat/chat.c
GNUnet/src/applications/chat/chat.h
GNUnet/src/applications/chat/clientapi.c
GNUnet/src/applications/chat/gnunet-chat.c
GNUnet/src/applications/dht/module/routing.c
GNUnet/src/applications/dht/tools/dht_api.c
GNUnet/src/applications/dstore_sqlite/dstore.c
GNUnet/src/applications/fs/ecrs/uri.c
GNUnet/src/applications/fs/fsui/deserialize.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/fsui/search.c
GNUnet/src/applications/fs/pseudonyms/common.c
GNUnet/src/applications/fs/pseudonyms/common.h
GNUnet/src/applications/fs/pseudonyms/info.c
GNUnet/src/applications/fs/pseudonyms/info.h
GNUnet/src/applications/fs/pseudonyms/info_test.c
GNUnet/src/applications/fs/pseudonyms/names.c
GNUnet/src/applications/fs/pseudonyms/notification.c
GNUnet/src/applications/fs/pseudonyms/notification.h
GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
GNUnet/src/include/gnunet_chat_lib.h
GNUnet/src/include/gnunet_dht_lib.h
GNUnet/src/include/gnunet_ecrs_lib.h
GNUnet/src/include/gnunet_fsui_lib.h
GNUnet/src/include/gnunet_namespace_lib.h
GNUnet/src/include/gnunet_pseudonym_lib.h
GNUnet/src/util/network_client/tcpio.c
Log:
indent+white
Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2008-05-30 05:18:54 UTC (rev 6930)
+++ GNUnet/src/applications/chat/chat.c 2008-05-30 05:20:36 UTC (rev 6931)
@@ -42,7 +42,7 @@
struct GNUNET_ClientHandle *client;
- struct GNUNET_RSA_PrivateKey * private_key;
+ struct GNUNET_RSA_PrivateKey *private_key;
char *room;
@@ -63,7 +63,7 @@
static int
csHandleTransmitRequest (struct GNUNET_ClientHandle *client,
- const GNUNET_MessageHeader * message)
+ const GNUNET_MessageHeader * message)
{
const CS_chat_MESSAGE_TransmitRequest *cmsg;
CS_chat_MESSAGE_ReceiveNotification *rmsg;
@@ -77,12 +77,12 @@
return GNUNET_SYSERR; /* invalid message */
}
cmsg = (const CS_chat_MESSAGE_TransmitRequest *) message;
- msg_len = ntohs(message->size) - sizeof(CS_chat_MESSAGE_TransmitRequest);
- rmsg = GNUNET_malloc(sizeof(CS_chat_MESSAGE_ReceiveNotification) +
- msg_len);
- rmsg->header.size = htons(sizeof(CS_chat_MESSAGE_ReceiveNotification) +
- msg_len);
- rmsg->header.type = htons(GNUNET_CS_PROTO_CHAT_MESSAGE_NOTIFICATION);
+ msg_len = ntohs (message->size) - sizeof (CS_chat_MESSAGE_TransmitRequest);
+ rmsg = GNUNET_malloc (sizeof (CS_chat_MESSAGE_ReceiveNotification) +
+ msg_len);
+ rmsg->header.size = htons (sizeof (CS_chat_MESSAGE_ReceiveNotification) +
+ msg_len);
+ rmsg->header.type = htons (GNUNET_CS_PROTO_CHAT_MESSAGE_NOTIFICATION);
rmsg->msg_options = cmsg->msg_options;
GNUNET_mutex_lock (chatMutex);
@@ -93,30 +93,27 @@
{
GNUNET_mutex_unlock (chatMutex);
GNUNET_GE_BREAK (NULL, 0);
- GNUNET_free(rmsg);
+ GNUNET_free (rmsg);
return GNUNET_SYSERR; /* not member of chat room! */
}
- room = pos->room;
- if ((ntohl(cmsg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS) == 0)
+ room = pos->room;
+ if ((ntohl (cmsg->msg_options) & GNUNET_CHAT_MSG_ANONYMOUS) == 0)
rmsg->sender = pos->id;
else
- memset(&rmsg->sender, 0, sizeof(GNUNET_HashCode));
+ memset (&rmsg->sender, 0, sizeof (GNUNET_HashCode));
pos = client_list_head;
- while (pos != NULL)
+ while (pos != NULL)
{
- if (0 == strcmp(room,
- pos->room))
- {
- /* FIXME: private msg delivery, blocking options,
- confirmation */
- coreAPI->cs_send_message (pos->client,
- &rmsg->header,
- GNUNET_YES);
- }
+ if (0 == strcmp (room, pos->room))
+ {
+ /* FIXME: private msg delivery, blocking options,
+ confirmation */
+ coreAPI->cs_send_message (pos->client, &rmsg->header, GNUNET_YES);
+ }
pos = pos->next;
}
GNUNET_mutex_unlock (chatMutex);
- GNUNET_free(rmsg);
+ GNUNET_free (rmsg);
return GNUNET_OK;
}
@@ -126,13 +123,13 @@
{
const CS_chat_MESSAGE_JoinRequest *cmsg;
char *room_name;
- const char * roomptr;
+ const char *roomptr;
unsigned int header_size;
unsigned int meta_len;
unsigned int room_name_len;
struct GNUNET_CS_chat_client *entry;
GNUNET_RSA_PublicKey pkey;
- CS_chat_MESSAGE_JoinNotification * nmsg;
+ CS_chat_MESSAGE_JoinNotification *nmsg;
if (ntohs (message->size) < sizeof (CS_chat_MESSAGE_JoinRequest))
{
@@ -141,61 +138,55 @@
}
cmsg = (const CS_chat_MESSAGE_JoinRequest *) message;
header_size = ntohs (cmsg->header.size);
- room_name_len = ntohs (cmsg->room_name_len);
+ room_name_len = ntohs (cmsg->room_name_len);
if (header_size - sizeof (CS_chat_MESSAGE_JoinRequest) <= room_name_len)
{
GNUNET_GE_BREAK (NULL, 0);
return GNUNET_SYSERR;
}
- meta_len = header_size - sizeof (CS_chat_MESSAGE_JoinRequest) -
room_name_len;
+ meta_len =
+ header_size - sizeof (CS_chat_MESSAGE_JoinRequest) - room_name_len;
- roomptr = (const char*) &cmsg[1];
+ roomptr = (const char *) &cmsg[1];
room_name = GNUNET_malloc (room_name_len + 1);
memcpy (room_name, roomptr, room_name_len);
room_name[room_name_len] = '\0';
-
+
entry = GNUNET_malloc (sizeof (struct GNUNET_CS_chat_client));
memset (entry, 0, sizeof (struct GNUNET_CS_chat_client));
entry->client = client;
- entry->room = room_name;
- entry->private_key = GNUNET_RSA_decode_key(&cmsg->private_key);
+ entry->room = room_name;
+ entry->private_key = GNUNET_RSA_decode_key (&cmsg->private_key);
if (entry->private_key == NULL)
{
- GNUNET_GE_BREAK(NULL, 0);
- GNUNET_free(room_name);
- GNUNET_free(entry);
+ GNUNET_GE_BREAK (NULL, 0);
+ GNUNET_free (room_name);
+ GNUNET_free (entry);
return GNUNET_SYSERR;
}
- GNUNET_RSA_get_public_key(entry->private_key,
- &pkey);
- GNUNET_hash(&pkey,
- sizeof(GNUNET_RSA_PublicKey),
- &entry->id);
- entry->msg_options = ntohl(cmsg->msg_options);
+ GNUNET_RSA_get_public_key (entry->private_key, &pkey);
+ GNUNET_hash (&pkey, sizeof (GNUNET_RSA_PublicKey), &entry->id);
+ entry->msg_options = ntohl (cmsg->msg_options);
- nmsg = GNUNET_malloc(sizeof(CS_chat_MESSAGE_JoinNotification) + meta_len);
- nmsg->header.type = htons(GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION);
- nmsg->header.size = htons(sizeof(CS_chat_MESSAGE_JoinNotification) +
meta_len);
+ nmsg = GNUNET_malloc (sizeof (CS_chat_MESSAGE_JoinNotification) + meta_len);
+ nmsg->header.type = htons (GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION);
+ nmsg->header.size =
+ htons (sizeof (CS_chat_MESSAGE_JoinNotification) + meta_len);
nmsg->msg_options = cmsg->msg_options;
nmsg->public_key = pkey;
- memcpy(&nmsg[1],
- &roomptr[room_name_len],
- meta_len);
+ memcpy (&nmsg[1], &roomptr[room_name_len], meta_len);
GNUNET_mutex_lock (chatMutex);
entry->next = client_list_head;
client_list_head = entry;
while (entry != NULL)
{
- if (0 == strcmp(room_name,
- entry->room))
- coreAPI->cs_send_message (entry->client,
- &nmsg->header,
- GNUNET_YES);
+ if (0 == strcmp (room_name, entry->room))
+ coreAPI->cs_send_message (entry->client, &nmsg->header, GNUNET_YES);
entry = entry->next;
}
GNUNET_mutex_unlock (chatMutex);
- GNUNET_free(nmsg);
+ GNUNET_free (nmsg);
return GNUNET_OK;
}
@@ -218,25 +209,21 @@
if (pos == NULL)
{
GNUNET_mutex_unlock (chatMutex);
- return; /* nothing to do */
+ return; /* nothing to do */
}
if (prev == NULL)
client_list_head = pos->next;
else
prev->next = pos->next;
entry = client_list_head;
- lmsg.header.size = htons(sizeof(CS_chat_MESSAGE_LeaveNotification));
- lmsg.header.type = htons(GNUNET_CS_PROTO_CHAT_LEAVE_NOTIFICATION);
- lmsg.reserved = htonl(0);
- GNUNET_RSA_get_public_key(pos->private_key,
- &lmsg.user);
- while (entry != NULL)
+ lmsg.header.size = htons (sizeof (CS_chat_MESSAGE_LeaveNotification));
+ lmsg.header.type = htons (GNUNET_CS_PROTO_CHAT_LEAVE_NOTIFICATION);
+ lmsg.reserved = htonl (0);
+ GNUNET_RSA_get_public_key (pos->private_key, &lmsg.user);
+ while (entry != NULL)
{
- if (0 == strcmp(entry->room,
- pos->room))
- coreAPI->cs_send_message (entry->client,
- &lmsg.header,
- GNUNET_YES);
+ if (0 == strcmp (entry->room, pos->room))
+ coreAPI->cs_send_message (entry->client, &lmsg.header, GNUNET_YES);
entry = entry->next;
}
GNUNET_mutex_unlock (chatMutex);
@@ -251,21 +238,23 @@
int ok = GNUNET_OK;
coreAPI = capi;
- GNUNET_GE_LOG (capi->ectx,
- GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
+ GNUNET_GE_LOG (capi->ectx,
+ GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_USER,
_("`%s' registering CS handlers %d and %d\n"),
- "chat",
- GNUNET_CS_PROTO_CHAT_JOIN_REQUEST,
GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST);
+ "chat",
+ GNUNET_CS_PROTO_CHAT_JOIN_REQUEST,
+ GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST);
if (GNUNET_SYSERR ==
capi->cs_disconnect_handler_register (&chatClientExitHandler))
- ok = GNUNET_SYSERR;
+ ok = GNUNET_SYSERR;
if (GNUNET_SYSERR ==
capi->cs_handler_register (GNUNET_CS_PROTO_CHAT_JOIN_REQUEST,
&csHandleChatJoinRequest))
ok = GNUNET_SYSERR;
- if (GNUNET_SYSERR == capi->cs_handler_register
(GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST,
- &csHandleTransmitRequest))
+ if (GNUNET_SYSERR ==
+ capi->cs_handler_register (GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST,
+ &csHandleTransmitRequest))
ok = GNUNET_SYSERR;
GNUNET_GE_ASSERT (capi->ectx,
0 == GNUNET_GC_set_configuration_value_string (capi->cfg,
@@ -282,7 +271,8 @@
done_module_chat ()
{
coreAPI->cs_disconnect_handler_unregister (&chatClientExitHandler);
- coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST,
&csHandleTransmitRequest);
+ coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST,
+ &csHandleTransmitRequest);
coreAPI->cs_handler_unregister (GNUNET_CS_PROTO_CHAT_JOIN_REQUEST,
&csHandleChatJoinRequest);
GNUNET_mutex_destroy (chatMutex);
Modified: GNUnet/src/applications/chat/chat.h
===================================================================
--- GNUnet/src/applications/chat/chat.h 2008-05-30 05:18:54 UTC (rev 6930)
+++ GNUnet/src/applications/chat/chat.h 2008-05-30 05:20:36 UTC (rev 6931)
@@ -157,7 +157,7 @@
typedef struct
{
GNUNET_MessageHeader header;
-
+
/**
* Options. Set to all options that the new user is willing to
* process. For example, if the client does not want to receive
@@ -176,18 +176,18 @@
/**
- * Message send by server to client to indicate
+ * Message send by server to client to indicate
* leaving of another room member.
*/
typedef struct
{
GNUNET_MessageHeader header;
-
+
/**
* Reserved (for alignment).
*/
unsigned int reserved;
-
+
/**
* Who is leaving?
*/
Modified: GNUnet/src/applications/chat/clientapi.c
===================================================================
--- GNUnet/src/applications/chat/clientapi.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/chat/clientapi.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -47,9 +47,9 @@
struct GNUNET_GC_Configuration *cfg;
- struct GNUNET_ECRS_MetaData * member_info;
+ struct GNUNET_ECRS_MetaData *member_info;
- char *nickname; /* not really required */
+ char *nickname; /* not really required */
char *room_name;
@@ -70,7 +70,7 @@
int shutdown_flag;
unsigned int sequence_number;
-
+
};
static int
@@ -80,40 +80,35 @@
unsigned int size_of_join;
unsigned int room_len;
unsigned int meta_len;
- char * room;
+ char *room;
- meta_len = GNUNET_ECRS_meta_data_get_serialized_size(chat_room->member_info,
- GNUNET_YES);
- room_len = strlen(chat_room->room_name);
- size_of_join =
- sizeof (CS_chat_MESSAGE_JoinRequest) + meta_len +
- room_len;
+ meta_len =
+ GNUNET_ECRS_meta_data_get_serialized_size (chat_room->member_info,
+ GNUNET_YES);
+ room_len = strlen (chat_room->room_name);
+ size_of_join = sizeof (CS_chat_MESSAGE_JoinRequest) + meta_len + room_len;
if (size_of_join >= GNUNET_MAX_BUFFER_SIZE - 8)
return GNUNET_SYSERR;
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->room_name_len = htons(room_len);
- room = (char*)&join_msg[1];
- memcpy (room,
- chat_room->room_name,
- room_len);
+ join_msg->room_name_len = htons (room_len);
+ room = (char *) &join_msg[1];
+ memcpy (room, chat_room->room_name, room_len);
if (GNUNET_SYSERR ==
- GNUNET_ECRS_meta_data_serialize(chat_room->ectx,
- chat_room->member_info,
- &room[room_len],
- meta_len,
- GNUNET_YES))
+ GNUNET_ECRS_meta_data_serialize (chat_room->ectx,
+ chat_room->member_info,
+ &room[room_len], meta_len, GNUNET_YES))
{
- GNUNET_free(join_msg);
+ GNUNET_free (join_msg);
return GNUNET_SYSERR;
- }
+ }
if (GNUNET_SYSERR ==
GNUNET_client_connection_write (chat_room->sock, &join_msg->header))
{
GNUNET_free (join_msg);
return GNUNET_SYSERR;
- }
+ }
GNUNET_free (join_msg);
return GNUNET_OK;
}
@@ -129,11 +124,11 @@
{
struct GNUNET_CHAT_Room *room = rcls;
GNUNET_MessageHeader *reply;
- CS_chat_MESSAGE_ConfirmationReceipt * receipt;
- CS_chat_MESSAGE_LeaveNotification * leave_msg;
- CS_chat_MESSAGE_JoinNotification * join_msg;
+ CS_chat_MESSAGE_ConfirmationReceipt *receipt;
+ CS_chat_MESSAGE_LeaveNotification *leave_msg;
+ CS_chat_MESSAGE_JoinNotification *join_msg;
CS_chat_MESSAGE_ReceiveNotification *received_msg;
- struct GNUNET_ECRS_MetaData * meta;
+ struct GNUNET_ECRS_MetaData *meta;
unsigned int size;
unsigned int meta_len;
unsigned int msg_len;
@@ -148,18 +143,18 @@
reply = NULL;
while ((ret == GNUNET_OK) && (room->shutdown_flag != GNUNET_YES))
{
- if (malformed)
- {
+ if (malformed)
+ {
GNUNET_GE_BREAK (NULL, 0);
GNUNET_client_connection_close_temporarily (room->sock);
disconnected = GNUNET_YES;
- malformed = GNUNET_NO;
- }
+ malformed = GNUNET_NO;
+ }
if (reply != NULL)
- {
- GNUNET_free(reply);
- reply = NULL;
- }
+ {
+ GNUNET_free (reply);
+ reply = NULL;
+ }
if (disconnected)
{
GNUNET_thread_sleep (15 * GNUNET_CRON_SECONDS);
@@ -183,79 +178,75 @@
size = ntohs (reply->size);
switch (ntohs (reply->type))
{
- case GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION:
- if (size < sizeof(CS_chat_MESSAGE_JoinNotification))
- {
- malformed = GNUNET_YES;
- continue;
- }
- join_msg = (CS_chat_MESSAGE_JoinNotification *) reply;
- meta_len = size - sizeof(CS_chat_MESSAGE_JoinNotification);
- meta = GNUNET_ECRS_meta_data_deserialize(room->ectx,
- (const char*)&join_msg[1],
- meta_len);
- if (meta == NULL)
- {
- malformed = GNUNET_YES;
- continue;
- }
- room->member_list_callback (room->member_list_callback_cls,
- meta,
- &join_msg->public_key);
- break;
- case GNUNET_CS_PROTO_CHAT_LEAVE_NOTIFICATION:
- if (size < sizeof(CS_chat_MESSAGE_LeaveNotification))
- {
- malformed = GNUNET_YES;
- continue;
- }
- leave_msg = (CS_chat_MESSAGE_LeaveNotification *) reply;
- room->member_list_callback (room->member_list_callback_cls,
- NULL,
- &leave_msg->user);
- break;
- case GNUNET_CS_PROTO_CHAT_MESSAGE_NOTIFICATION:
- if (size < sizeof(CS_chat_MESSAGE_ReceiveNotification))
- {
- malformed = GNUNET_YES;
- continue;
- }
- received_msg = (CS_chat_MESSAGE_ReceiveNotification *) reply;
- msg_len = size - sizeof(CS_chat_MESSAGE_ReceiveNotification);
- message_content = GNUNET_malloc (msg_len + 1);
- memcpy (message_content,
- &received_msg[1],
- msg_len);
- message_content[msg_len] = '\0';
- room->message_callback (room->message_callback_cls,
- room,
- &received_msg->sender,
- message_content,
- ntohl(received_msg->msg_options));
- GNUNET_free (message_content);
+ case GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION:
+ if (size < sizeof (CS_chat_MESSAGE_JoinNotification))
+ {
+ malformed = GNUNET_YES;
+ continue;
+ }
+ join_msg = (CS_chat_MESSAGE_JoinNotification *) reply;
+ meta_len = size - sizeof (CS_chat_MESSAGE_JoinNotification);
+ meta = GNUNET_ECRS_meta_data_deserialize (room->ectx,
+ (const char *)
+ &join_msg[1], meta_len);
+ if (meta == NULL)
+ {
+ malformed = GNUNET_YES;
+ continue;
+ }
+ room->member_list_callback (room->member_list_callback_cls,
+ meta, &join_msg->public_key);
break;
- case GNUNET_CS_PROTO_CHAT_CONFIRMATION_RECEIPT:
- if (size < sizeof(CS_chat_MESSAGE_ConfirmationReceipt))
- {
- malformed = GNUNET_YES;
- continue;
- }
- receipt = (CS_chat_MESSAGE_ConfirmationReceipt *) reply;
- if (room->confirmation_callback != NULL)
- room->confirmation_callback (room->confirmation_cls,
- room,
- ntohl(receipt->sequence_number),
- GNUNET_ntohll(receipt->timestamp),
- &receipt->target,
- &receipt->content,
- &receipt->signature);
- break;
+ case GNUNET_CS_PROTO_CHAT_LEAVE_NOTIFICATION:
+ if (size < sizeof (CS_chat_MESSAGE_LeaveNotification))
+ {
+ malformed = GNUNET_YES;
+ continue;
+ }
+ leave_msg = (CS_chat_MESSAGE_LeaveNotification *) reply;
+ room->member_list_callback (room->member_list_callback_cls,
+ NULL, &leave_msg->user);
+ break;
+ case GNUNET_CS_PROTO_CHAT_MESSAGE_NOTIFICATION:
+ if (size < sizeof (CS_chat_MESSAGE_ReceiveNotification))
+ {
+ malformed = GNUNET_YES;
+ continue;
+ }
+ received_msg = (CS_chat_MESSAGE_ReceiveNotification *) reply;
+ msg_len = size - sizeof (CS_chat_MESSAGE_ReceiveNotification);
+ message_content = GNUNET_malloc (msg_len + 1);
+ memcpy (message_content, &received_msg[1], msg_len);
+ message_content[msg_len] = '\0';
+ room->message_callback (room->message_callback_cls,
+ room,
+ &received_msg->sender,
+ message_content,
+ ntohl (received_msg->msg_options));
+ GNUNET_free (message_content);
+ break;
+ case GNUNET_CS_PROTO_CHAT_CONFIRMATION_RECEIPT:
+ if (size < sizeof (CS_chat_MESSAGE_ConfirmationReceipt))
+ {
+ malformed = GNUNET_YES;
+ continue;
+ }
+ receipt = (CS_chat_MESSAGE_ConfirmationReceipt *) reply;
+ if (room->confirmation_callback != NULL)
+ room->confirmation_callback (room->confirmation_cls,
+ room,
+ ntohl (receipt->sequence_number),
+ GNUNET_ntohll (receipt->timestamp),
+ &receipt->target,
+ &receipt->content,
+ &receipt->signature);
+ break;
default:
GNUNET_GE_BREAK (NULL, 0);
break;
}
}
- GNUNET_free_non_null(reply);
+ GNUNET_free_non_null (reply);
return NULL;
}
@@ -290,10 +281,10 @@
int res;
if (-1 == GNUNET_GC_get_configuration_value_filename (cfg,
- "PATHS",
- "GNUNET_HOME",
-
GNUNET_DEFAULT_HOME_DIRECTORY,
- &gnHome))
+ "PATHS",
+ "GNUNET_HOME",
+
GNUNET_DEFAULT_HOME_DIRECTORY,
+ &gnHome))
return NULL;
GNUNET_disk_directory_create (ectx, gnHome);
if (GNUNET_YES != GNUNET_disk_directory_test (ectx, gnHome))
@@ -303,7 +294,7 @@
GNUNET_GE_IMMEDIATE,
_("Failed to access GNUnet home directory `%s'\n"),
gnHome);
- GNUNET_free(gnHome);
+ GNUNET_free (gnHome);
return NULL;
}
@@ -322,8 +313,7 @@
if (GNUNET_YES == GNUNET_disk_file_test (ectx, keyfile))
{
res =
- GNUNET_disk_file_read (ectx, keyfile, sizeof (unsigned short),
- &len);
+ GNUNET_disk_file_read (ectx, keyfile, sizeof (unsigned short), &len);
}
encPrivateKey = NULL;
if (res == sizeof (unsigned short))
@@ -331,8 +321,7 @@
encPrivateKey =
(GNUNET_RSA_PrivateKeyEncoded *) GNUNET_malloc (ntohs (len));
if (ntohs (len) !=
- GNUNET_disk_file_read (ectx, keyfile, ntohs (len),
- encPrivateKey))
+ GNUNET_disk_file_read (ectx, keyfile, ntohs (len), encPrivateKey))
{
GNUNET_free (encPrivateKey);
GNUNET_GE_LOG (ectx,
@@ -348,7 +337,8 @@
{ /* make new hostkey */
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_USER | GNUNET_GE_BULK,
- _("Creating new key for this nickname (this may take a
while).\n"));
+ _
+ ("Creating new key for this nickname (this may take a
while).\n"));
privKey = GNUNET_RSA_create_key ();
GNUNET_GE_ASSERT (ectx, privKey != NULL);
encPrivateKey = GNUNET_RSA_encode_key (privKey);
@@ -357,7 +347,7 @@
keyfile,
encPrivateKey, ntohs (encPrivateKey->len),
"600");
- GNUNET_RSA_free_key(privKey);
+ GNUNET_RSA_free_key (privKey);
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_USER | GNUNET_GE_BULK,
_("Done creating key.\n"));
@@ -377,7 +367,7 @@
* @param member_info information about the joining member
* @param memberInfo public information about you
* @param messageCallback which function to call if a message has
- * been received?
+ * been received?
* @param message_cls argument to callback
* @param memberCallback which function to call for join/leave notifications
* @param confirmationCallback which function to call for confirmations (maybe
NULL)
@@ -385,34 +375,34 @@
*/
struct GNUNET_CHAT_Room *
GNUNET_CHAT_join_room (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration*cfg,
- const char *nick_name,
- struct GNUNET_ECRS_MetaData * member_info,
- const char *room_name,
- GNUNET_CHAT_MessageCallback messageCallback,
- void *message_cls,
- GNUNET_CHAT_MemberListCallback memberCallback,
- void *member_cls,
- GNUNET_CHAT_MessageConfirmation confirmationCallback,
- void *confirmation_cls)
+ struct GNUNET_GC_Configuration *cfg,
+ const char *nick_name,
+ struct GNUNET_ECRS_MetaData *member_info,
+ const char *room_name,
+ GNUNET_CHAT_MessageCallback messageCallback,
+ void *message_cls,
+ GNUNET_CHAT_MemberListCallback memberCallback,
+ void *member_cls,
+ GNUNET_CHAT_MessageConfirmation confirmationCallback,
+ void *confirmation_cls)
{
struct GNUNET_CHAT_Room *chat_room;
struct GNUNET_ClientServerConnection *sock;
GNUNET_RSA_PrivateKeyEncoded *key;
- key = GNUNET_CHAT_initPrivateKey(ectx, cfg, nick_name);
+ key = GNUNET_CHAT_initPrivateKey (ectx, cfg, nick_name);
if (key == NULL)
return NULL;
sock = GNUNET_client_connection_create (ectx, cfg);
if (sock == NULL)
{
- GNUNET_free(key);
+ GNUNET_free (key);
return NULL;
}
chat_room = GNUNET_malloc (sizeof (struct GNUNET_CHAT_Room));
chat_room->nickname = GNUNET_strdup (nick_name);
chat_room->room_name = GNUNET_strdup (room_name);
- chat_room->member_info = GNUNET_ECRS_meta_data_duplicate(member_info);
+ chat_room->member_info = GNUNET_ECRS_meta_data_duplicate (member_info);
chat_room->my_private_key = key;
chat_room->message_callback = messageCallback;
chat_room->message_callback_cls = message_cls;
@@ -427,18 +417,17 @@
GNUNET_thread_create (&poll_thread, chat_room, 1024 * 2);
if (chat_room->listen_thread == NULL)
{
- GNUNET_free(chat_room->nickname);
- GNUNET_free(chat_room->room_name);
+ GNUNET_free (chat_room->nickname);
+ GNUNET_free (chat_room->room_name);
GNUNET_client_connection_destroy (chat_room->sock);
- GNUNET_ECRS_meta_data_destroy(chat_room->member_info);
- GNUNET_free(chat_room);
- GNUNET_free(key);
+ GNUNET_ECRS_meta_data_destroy (chat_room->member_info);
+ GNUNET_free (chat_room);
+ GNUNET_free (key);
return NULL;
}
- if (GNUNET_SYSERR ==
- GNUNET_CHAT_rejoin_room(chat_room))
+ if (GNUNET_SYSERR == GNUNET_CHAT_rejoin_room (chat_room))
{
- GNUNET_CHAT_leave_room(chat_room);
+ GNUNET_CHAT_leave_room (chat_room);
return NULL;
}
return chat_room;
@@ -458,9 +447,9 @@
GNUNET_thread_join (chat_room->listen_thread, &unused);
GNUNET_free (chat_room->room_name);
GNUNET_free (chat_room->nickname);
- GNUNET_ECRS_meta_data_destroy(chat_room->member_info);
+ GNUNET_ECRS_meta_data_destroy (chat_room->member_info);
GNUNET_client_connection_destroy (chat_room->sock);
- GNUNET_free(chat_room->my_private_key);
+ GNUNET_free (chat_room->my_private_key);
GNUNET_free (chat_room);
}
@@ -475,33 +464,30 @@
const char *message,
GNUNET_CHAT_MSG_OPTIONS options,
const GNUNET_RSA_PublicKey * receiver,
- unsigned int * sequence_number)
+ unsigned int *sequence_number)
{
int ret = GNUNET_OK;
CS_chat_MESSAGE_TransmitRequest *msg_to_send;
unsigned int msg_size;
- msg_size = strlen(message) + sizeof(CS_chat_MESSAGE_TransmitRequest);
+ msg_size = strlen (message) + sizeof (CS_chat_MESSAGE_TransmitRequest);
if (msg_size > GNUNET_MAX_BUFFER_SIZE - 8)
return GNUNET_SYSERR;
msg_to_send = GNUNET_malloc (msg_size);
- msg_to_send->header.size = htons(msg_size);
- msg_to_send->header.type = htons(GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST);
- msg_to_send->msg_options = htonl(options);
+ msg_to_send->header.size = htons (msg_size);
+ msg_to_send->header.type = htons (GNUNET_CS_PROTO_CHAT_TRANSMIT_REQUEST);
+ msg_to_send->msg_options = htonl (options);
*sequence_number = room->sequence_number++;
- msg_to_send->sequence_number = htonl(*sequence_number);
- msg_to_send->reserved = htonl(0);
+ msg_to_send->sequence_number = htonl (*sequence_number);
+ msg_to_send->reserved = htonl (0);
if (receiver == NULL)
- memset(&msg_to_send->target, 0, sizeof(GNUNET_HashCode));
+ memset (&msg_to_send->target, 0, sizeof (GNUNET_HashCode));
else
- GNUNET_hash(receiver,
- sizeof(GNUNET_RSA_PublicKey),
- &msg_to_send->target);
- memcpy(&msg_to_send[1],
- message,
- strlen(message));
+ GNUNET_hash (receiver,
+ sizeof (GNUNET_RSA_PublicKey), &msg_to_send->target);
+ memcpy (&msg_to_send[1], message, strlen (message));
ret = GNUNET_client_connection_write (room->sock, &msg_to_send->header);
- GNUNET_free(msg_to_send);
+ GNUNET_free (msg_to_send);
return ret;
}
Modified: GNUnet/src/applications/chat/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/gnunet-chat.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/chat/gnunet-chat.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -82,16 +82,15 @@
receive_callback (void *cls,
struct GNUNET_CHAT_Room *room,
const GNUNET_HashCode * sender,
- const char *message,
- GNUNET_CHAT_MSG_OPTIONS options)
+ const char *message, GNUNET_CHAT_MSG_OPTIONS options)
{
fprintf (stdout, _("`%s' said: %s\n"), "FIXME", message);
return GNUNET_OK;
}
static int
-member_list_callback (void *cls,
- const struct GNUNET_ECRS_MetaData * member_info,
+member_list_callback (void *cls,
+ const struct GNUNET_ECRS_MetaData *member_info,
const GNUNET_RSA_PublicKey * member_id)
{
fprintf (stdout, member_info != NULL
@@ -114,11 +113,11 @@
static int
confirmation_callback (void *cls,
struct GNUNET_CHAT_Room *room,
- unsigned int orig_seq_number,
- GNUNET_CronTime timestamp,
+ unsigned int orig_seq_number,
+ GNUNET_CronTime timestamp,
const GNUNET_HashCode * receiver,
const GNUNET_HashCode * msg_hash,
- const GNUNET_RSA_Signature * receipt)
+ const GNUNET_RSA_Signature * receipt)
{
return GNUNET_OK;
}
@@ -135,7 +134,7 @@
{
struct GNUNET_CHAT_Room *room;
struct GNUNET_RSA_PrivateKey *my_priv;
- struct GNUNET_ECRS_MetaData * meta;
+ struct GNUNET_ECRS_MetaData *meta;
char message[MAX_MESSAGE_LENGTH + 1];
unsigned int seq;
@@ -152,19 +151,17 @@
return -1;
}
- meta = GNUNET_ECRS_meta_data_create();
- GNUNET_ECRS_meta_data_insert(meta,
- EXTRACTOR_TITLE,
- nickname);
+ meta = GNUNET_ECRS_meta_data_create ();
+ GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_TITLE, nickname);
room = GNUNET_CHAT_join_room (ectx,
cfg,
- nickname,
- meta,
- room_name,
+ nickname,
+ meta,
+ room_name,
&receive_callback,
NULL, &member_list_callback, NULL,
- &confirmation_callback, NULL);
- GNUNET_ECRS_meta_data_destroy(meta);
+ &confirmation_callback, NULL);
+ GNUNET_ECRS_meta_data_destroy (meta);
if (room == NULL)
{
fprintf (stderr, _("Failed to join room `%s'\n"), room_name);
@@ -190,8 +187,7 @@
if (GNUNET_OK != GNUNET_CHAT_send_message (room,
message,
GNUNET_CHAT_MSG_OPTION_NONE,
- NULL,
- &seq))
+ NULL, &seq))
fprintf (stderr, _("Failed to send message.\n"));
}
Modified: GNUnet/src/applications/dht/module/routing.c
===================================================================
--- GNUnet/src/applications/dht/module/routing.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/dht/module/routing.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -485,7 +485,7 @@
handleGet (const GNUNET_PeerIdentity * sender,
const GNUNET_MessageHeader * msg)
{
- GNUNET_PeerIdentity next[GET_TRIES+1];
+ GNUNET_PeerIdentity next[GET_TRIES + 1];
const DHT_MESSAGE *get;
DHT_MESSAGE aget;
unsigned int target_value;
@@ -548,7 +548,7 @@
target_value = GET_TRIES;
j = 0;
if (sender != NULL)
- next[j++] = *sender; /* do not send back to sender! */
+ next[j++] = *sender; /* do not send back to sender! */
for (i = 0; i < target_value; i++)
{
if (GNUNET_OK !=
@@ -559,7 +559,7 @@
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
"Failed to select peer for fowarding in round
%d/%d\n",
- i+1, GET_TRIES);
+ i + 1, GET_TRIES);
#endif
break;
}
@@ -584,7 +584,7 @@
handlePut (const GNUNET_PeerIdentity * sender,
const GNUNET_MessageHeader * msg)
{
- GNUNET_PeerIdentity next[PUT_TRIES+1];
+ GNUNET_PeerIdentity next[PUT_TRIES + 1];
const DHT_MESSAGE *put;
DHT_MESSAGE *aput;
GNUNET_CronTime now;
@@ -624,7 +624,7 @@
target_value = PUT_TRIES;
j = 0;
if (sender != NULL)
- next[j++] = *sender; /* do not send back to sender! */
+ next[j++] = *sender; /* do not send back to sender! */
for (i = 0; i < target_value; i++)
{
if (GNUNET_OK !=
@@ -635,7 +635,7 @@
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
"Failed to select peer for PUT fowarding in round
%d/%d\n",
- i+1, PUT_TRIES);
+ i + 1, PUT_TRIES);
#endif
store = 1;
continue;
Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -60,14 +60,14 @@
* connection or the processor callback requesting
* it).
*/
- struct GNUNET_ThreadHandle *parent;/*Poll thread instead..*/
+ struct GNUNET_ThreadHandle *parent; /*Poll thread instead.. */
/**
* Are we done (for whichever reason)?
*/
int aborted;
-} GetInfo;/*Change name*/
+} GetInfo; /*Change name */
static void *
@@ -137,7 +137,7 @@
GNUNET_CronTime timeout, GNUNET_ResultProcessor processor,
void *closure)
{
- /*Lots of changes, get rid of timeouts, split into requisite functions*/
+ /*Lots of changes, get rid of timeouts, split into requisite functions */
struct GNUNET_ClientServerConnection *sock;
CS_dht_request_get_MESSAGE req;
struct GNUNET_ThreadHandle *thread;
Modified: GNUnet/src/applications/dstore_sqlite/dstore.c
===================================================================
--- GNUnet/src/applications/dstore_sqlite/dstore.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/dstore_sqlite/dstore.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -545,8 +545,9 @@
cnt++;
#if DEBUG_DSTORE
GNUNET_GE_LOG (coreAPI->ectx,
- GNUNET_GE_DEBUG | GNUNET_GE_REQUEST | GNUNET_GE_DEVELOPER,
- "dstore found result for get: `%.*s\n", size, dat);
+ GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
+ GNUNET_GE_DEVELOPER,
+ "dstore found result for get: `%.*s\n", size, dat);
#endif
if ((handler != NULL) &&
(GNUNET_OK != handler (key, type, size, dat, closure)))
Modified: GNUnet/src/applications/fs/ecrs/uri.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/fs/ecrs/uri.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -304,7 +304,7 @@
if (NULL != strstr (&keyword[1], " "))
n += 2;
if (keyword[0] == '+')
- n++;
+ n++;
}
ret = GNUNET_malloc (n);
strcpy (ret, "");
@@ -314,20 +314,20 @@
if (NULL != strstr (&keyword[1], " "))
{
strcat (ret, "\"");
- if (keyword[0] == '+')
- strcat (ret, keyword);
- else
- strcat (ret, &keyword[1]);
+ if (keyword[0] == '+')
+ strcat (ret, keyword);
+ else
+ strcat (ret, &keyword[1]);
strcat (ret, "\"");
}
else
- {
- if (keyword[0] == '+')
- strcat (ret, keyword);
- else
- strcat (ret, &keyword[1]);
- }
- strcat(ret, " ");
+ {
+ if (keyword[0] == '+')
+ strcat (ret, keyword);
+ else
+ strcat (ret, &keyword[1]);
+ }
+ strcat (ret, " ");
}
return ret;
}
Modified: GNUnet/src/applications/fs/fsui/deserialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/deserialize.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/fsui/deserialize.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -529,15 +529,15 @@
ret->mandatoryMatchesRemaining = remaining;
ret->probeSuccess = probeSucc;
ret->probeFailure = probeFail;
- if ( (ret->probeSuccess + ret->probeFailure > GNUNET_FSUI_MAX_PROBES) ||
- (ret->probeSuccess > GNUNET_FSUI_MAX_PROBES) ||
- (ret->probeFailure > GNUNET_FSUI_MAX_PROBES) )
- {
- GNUNET_GE_BREAK(NULL, 0);
- /* try to recover */
- ret->probeSuccess = 0;
- ret->probeFailure = 0;
- }
+ if ((ret->probeSuccess + ret->probeFailure > GNUNET_FSUI_MAX_PROBES) ||
+ (ret->probeSuccess > GNUNET_FSUI_MAX_PROBES) ||
+ (ret->probeFailure > GNUNET_FSUI_MAX_PROBES))
+ {
+ GNUNET_GE_BREAK (NULL, 0);
+ /* try to recover */
+ ret->probeSuccess = 0;
+ ret->probeFailure = 0;
+ }
ret->test_download = NULL;
ret->next = NULL;
ret->matchingSearches = NULL;
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -113,10 +113,10 @@
event.data.SearchUpdate.searchURI = sl->uri;
event.data.SearchUpdate.availability_rank =
srl->probeSuccess - srl->probeFailure;
- event.data.SearchUpdate.availability_certainty =
- srl->probeSuccess + srl->probeFailure;
+ event.data.SearchUpdate.availability_certainty =
+ srl->probeSuccess + srl->probeFailure;
event.data.SearchUpdate.applicability_rank =
- srl->matchingSearchCount;
+ srl->matchingSearchCount;
ctx->ecb (ctx->ecbClosure, &event);
ctx->active_probes--;
srl->last_probe_time = now;
@@ -141,8 +141,8 @@
event.data.SearchUpdate.searchURI = sl->uri;
event.data.SearchUpdate.availability_rank =
srl->probeSuccess - srl->probeFailure;
- event.data.SearchUpdate.availability_certainty =
- srl->probeSuccess + srl->probeFailure;
+ event.data.SearchUpdate.availability_certainty =
+ srl->probeSuccess + srl->probeFailure;
event.data.SearchUpdate.applicability_rank =
srl->matchingSearchCount;
ctx->ecb (ctx->ecbClosure, &event);
@@ -186,11 +186,11 @@
GNUNET_YES,
&test_download_progress,
srl);
- if (srl->test_download != NULL)
- {
- srl->test_download_start_time = now;
- ctx->active_probes++;
- }
+ if (srl->test_download != NULL)
+ {
+ srl->test_download_start_time = now;
+ ctx->active_probes++;
+ }
}
}
Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/applications/fs/fsui/search.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -97,11 +97,8 @@
if (isRoot)
{
GNUNET_NS_namespace_set_root (ectx, pos->ctx->cfg, fi->uri);
- GNUNET_ECRS_uri_get_namespace_from_sks(fi->uri,
- &nsid);
- GNUNET_PSEUDO_add (ectx, pos->ctx->cfg,
- &nsid,
- fi->meta);
+ GNUNET_ECRS_uri_get_namespace_from_sks (fi->uri, &nsid);
+ GNUNET_PSEUDO_add (ectx, pos->ctx->cfg, &nsid, fi->meta);
return GNUNET_OK;
}
GNUNET_mutex_lock (pos->lock);
@@ -398,7 +395,7 @@
{
GNUNET_ECRS_file_download_partial_stop (srl->test_download);
srl->test_download = NULL;
- ctx->active_probes--;
+ ctx->active_probes--;
}
srl = srl->next;
}
@@ -447,7 +444,7 @@
{
GNUNET_ECRS_file_download_partial_stop (srl->test_download);
srl->test_download = NULL;
- ctx->active_probes--;
+ ctx->active_probes--;
}
srl = srl->next;
}
@@ -565,10 +562,10 @@
GNUNET_ECRS_uri_destroy (srl->fi.uri);
GNUNET_ECRS_meta_data_destroy (srl->fi.meta);
if (srl->test_download != NULL)
- {
- GNUNET_ECRS_file_download_partial_stop (srl->test_download);
- ctx->active_probes--;
- }
+ {
+ GNUNET_ECRS_file_download_partial_stop (srl->test_download);
+ ctx->active_probes--;
+ }
GNUNET_free (srl);
}
GNUNET_mutex_destroy (pos->lock);
Modified: GNUnet/src/applications/fs/pseudonyms/common.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/common.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/common.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -35,9 +35,9 @@
*/
char *
GNUNET_PSEUDO_internal_get_data_filename_ (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *prefix,
- const GNUNET_HashCode * psid)
+ struct GNUNET_GC_Configuration
+ *cfg, const char *prefix,
+ const GNUNET_HashCode * psid)
{
char *tmp;
char *ret;
Modified: GNUnet/src/applications/fs/pseudonyms/common.h
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/common.h 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/common.h 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -37,12 +37,15 @@
* Get the filename (or directory name) for the given
* pseudonym identifier and directory prefix.
*
- * @param prefix PS_METADATA_DIR or PS_NAMES_DIR
+ * @param prefix PS_METADATA_DIR or PS_NAMES_DIR
* @param psid maybe NULL
*/
-char *GNUNET_PSEUDO_internal_get_data_filename_ (struct GNUNET_GE_Context
*ectx,
- struct GNUNET_GC_Configuration
- *cfg, const char *prefix,
- const GNUNET_HashCode * psid);
+char *GNUNET_PSEUDO_internal_get_data_filename_ (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration *cfg,
+ const char *prefix,
+ const GNUNET_HashCode *
+ psid);
#endif
Modified: GNUnet/src/applications/fs/pseudonyms/info.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/info.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/info.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -38,8 +38,7 @@
struct GNUNET_GC_Configuration *cfg,
const GNUNET_HashCode * nsid,
const struct GNUNET_ECRS_MetaData *meta,
- int ranking,
- const char *ns_name)
+ int ranking, const char *ns_name)
{
unsigned int size;
unsigned int tag;
@@ -48,8 +47,7 @@
char *fn;
fn = GNUNET_PSEUDO_internal_get_data_filename_ (ectx,
- cfg,
- PS_METADATA_DIR, nsid);
+ cfg, PS_METADATA_DIR, nsid);
size =
GNUNET_ECRS_meta_data_get_serialized_size (meta,
GNUNET_ECRS_SERIALIZE_FULL);
@@ -87,10 +85,10 @@
int
GNUNET_PSEUDO_internal_read_info_ (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration
*cfg,
- const GNUNET_HashCode * nsid,
- struct GNUNET_ECRS_MetaData **meta,
- int *ranking, char **ns_name)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid,
+ struct GNUNET_ECRS_MetaData **meta,
+ int *ranking, char **ns_name)
{
unsigned long long len;
unsigned int size;
@@ -103,8 +101,7 @@
if (ns_name != NULL)
*ns_name = NULL;
fn = GNUNET_PSEUDO_internal_get_data_filename_ (ectx,
- cfg,
- PS_METADATA_DIR, nsid);
+ cfg, PS_METADATA_DIR, nsid);
if ((GNUNET_OK != GNUNET_disk_file_test (ectx,
fn) ||
(GNUNET_OK != GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES))))
@@ -180,7 +177,7 @@
static int
list_pseudonym_helper (const char *fn, const char *dirName, void *cls)
-{
+{
struct ListPseudonymClosure *c = cls;
int ret;
GNUNET_HashCode id;
@@ -192,7 +189,7 @@
return GNUNET_OK; /* invalid name */
if (GNUNET_OK !=
GNUNET_PSEUDO_internal_read_info_ (c->ectx, c->cfg, &id, &meta,
- &rating, NULL))
+ &rating, NULL))
return GNUNET_OK; /* ignore entry */
if (c->iterator != NULL)
ret = c->iterator (c->closure, &id, meta, rating);
@@ -205,9 +202,9 @@
*/
int
GNUNET_PSEUDO_list_all (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_PSEUDO_PseudonymIterator iterator,
- void *closure)
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_PSEUDO_PseudonymIterator iterator,
+ void *closure)
{
struct ListPseudonymClosure cls;
char *fn;
@@ -218,7 +215,8 @@
cls.ectx = ectx;
cls.cfg = cfg;
fn =
- GNUNET_PSEUDO_internal_get_data_filename_ (ectx, cfg, PS_METADATA_DIR,
NULL);
+ GNUNET_PSEUDO_internal_get_data_filename_ (ectx, cfg, PS_METADATA_DIR,
+ NULL);
GNUNET_disk_directory_create (ectx, fn);
ret = GNUNET_disk_directory_scan (ectx, fn, &list_pseudonym_helper, &cls);
GNUNET_free (fn);
@@ -235,8 +233,8 @@
*/
int
GNUNET_PSEUDO_rank (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid, int delta)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid, int delta)
{
struct GNUNET_ECRS_MetaData *meta;
int ret;
@@ -246,7 +244,7 @@
name = NULL;
ret =
GNUNET_PSEUDO_internal_read_info_ (ectx, cfg, nsid, &meta, &ranking,
- &name);
+ &name);
if (ret == GNUNET_SYSERR)
{
ranking = 0;
@@ -279,9 +277,9 @@
*/
void
GNUNET_PSEUDO_add (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode *id,
- const struct GNUNET_ECRS_MetaData *meta)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * id,
+ const struct GNUNET_ECRS_MetaData *meta)
{
char *name;
int ranking;
@@ -290,7 +288,7 @@
ranking = 0;
if (GNUNET_OK ==
GNUNET_PSEUDO_internal_read_info_ (ectx, cfg, id, &old, &ranking,
- &name))
+ &name))
{
GNUNET_ECRS_meta_data_get_contents (meta, &merge_meta_helper, old);
write_pseudonym_info (ectx, cfg, id, old, ranking, name);
Modified: GNUnet/src/applications/fs/pseudonyms/info.h
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/info.h 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/info.h 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -32,9 +32,9 @@
int
GNUNET_PSEUDO_internal_read_info_ (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid,
- struct GNUNET_ECRS_MetaData **meta,
- int *ranking, char **ns_name);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid,
+ struct GNUNET_ECRS_MetaData **meta,
+ int *ranking, char **ns_name);
#endif
Modified: GNUnet/src/applications/fs/pseudonyms/info_test.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/info_test.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/info_test.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -54,8 +54,8 @@
old = GNUNET_PSEUDO_list_all (ectx, cfg, NULL, NULL);
meta = GNUNET_ECRS_meta_data_create ();
GNUNET_ECRS_meta_data_insert (meta, 0, "test");
- GNUNET_create_random_hash (&id);
- GNUNET_PSEUDO_add(ectx, cfg, &id, meta);
+ GNUNET_create_random_hash (&id);
+ GNUNET_PSEUDO_add (ectx, cfg, &id, meta);
newVal = GNUNET_PSEUDO_list_all (ectx, cfg, NULL, NULL);
CHECK (old < newVal);
/* END OF TEST CODE */
Modified: GNUnet/src/applications/fs/pseudonyms/names.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/names.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/names.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -40,8 +40,8 @@
*/
char *
GNUNET_PSEUDO_id_to_name (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid)
{
struct GNUNET_ECRS_MetaData *meta;
char *name;
@@ -55,32 +55,31 @@
meta = NULL;
name = NULL;
- if (GNUNET_OK ==
- GNUNET_PSEUDO_internal_read_info_ (ectx, cfg, nsid, &meta, NULL,
- &name))
+ if (GNUNET_OK ==
+ GNUNET_PSEUDO_internal_read_info_ (ectx, cfg, nsid, &meta, NULL, &name))
{
if ((meta != NULL) && (name == NULL))
- name = GNUNET_ECRS_meta_data_get_first_by_types (meta,
- EXTRACTOR_TITLE,
- EXTRACTOR_FILENAME,
- EXTRACTOR_DESCRIPTION,
- EXTRACTOR_SUBJECT,
- EXTRACTOR_PUBLISHER,
- EXTRACTOR_AUTHOR,
- EXTRACTOR_COMMENT,
- EXTRACTOR_SUMMARY,
- EXTRACTOR_OWNER, -1);
+ name = GNUNET_ECRS_meta_data_get_first_by_types (meta,
+ EXTRACTOR_TITLE,
+ EXTRACTOR_FILENAME,
+ EXTRACTOR_DESCRIPTION,
+ EXTRACTOR_SUBJECT,
+ EXTRACTOR_PUBLISHER,
+ EXTRACTOR_AUTHOR,
+ EXTRACTOR_COMMENT,
+ EXTRACTOR_SUMMARY,
+ EXTRACTOR_OWNER, -1);
if (meta != NULL)
- {
- GNUNET_ECRS_meta_data_destroy (meta);
- meta = NULL;
- }
+ {
+ GNUNET_ECRS_meta_data_destroy (meta);
+ meta = NULL;
+ }
}
if (name == NULL)
name = GNUNET_strdup (_("no-name"));
GNUNET_hash (name, strlen (name), &nh);
fn = GNUNET_PSEUDO_internal_get_data_filename_ (ectx,
- cfg, PS_NAMES_DIR, &nh);
+ cfg, PS_NAMES_DIR, &nh);
if ((GNUNET_OK != GNUNET_disk_file_test (ectx,
fn) ||
(GNUNET_OK != GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES))))
@@ -123,8 +122,8 @@
*/
int
GNUNET_PSEUDO_name_to_id (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *ns_uname, GNUNET_HashCode * nsid)
+ struct GNUNET_GC_Configuration *cfg,
+ const char *ns_uname, GNUNET_HashCode * nsid)
{
size_t slen;
unsigned long long len;
@@ -145,7 +144,7 @@
GNUNET_hash (name, strlen (name), &nh);
GNUNET_free (name);
fn = GNUNET_PSEUDO_internal_get_data_filename_ (ectx,
- cfg, PS_NAMES_DIR, &nh);
+ cfg, PS_NAMES_DIR, &nh);
if ((GNUNET_OK != GNUNET_disk_file_test (ectx,
fn) ||
(GNUNET_OK != GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES))) ||
Modified: GNUnet/src/applications/fs/pseudonyms/notification.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/notification.c 2008-05-30
05:18:54 UTC (rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/notification.c 2008-05-30
05:20:36 UTC (rev 6931)
@@ -46,8 +46,8 @@
*/
void
GNUNET_PSEUDO_internal_notify_ (const GNUNET_HashCode * id,
- const struct GNUNET_ECRS_MetaData *md,
- int rating)
+ const struct GNUNET_ECRS_MetaData *md,
+ int rating)
{
struct DiscoveryCallback *pos;
@@ -69,9 +69,10 @@
*/
int
GNUNET_PSEUDO_register_discovery_callback (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_PSEUDO_PseudonymIterator
iterator,
- void *closure)
+ struct GNUNET_GC_Configuration
+ *cfg,
+ GNUNET_PSEUDO_PseudonymIterator
+ iterator, void *closure)
{
struct DiscoveryCallback *list;
@@ -90,8 +91,8 @@
* Unregister pseudonym discovery callback.
*/
int
-GNUNET_PSEUDO_unregister_discovery_callback (GNUNET_PSEUDO_PseudonymIterator
iterator,
- void *closure)
+GNUNET_PSEUDO_unregister_discovery_callback (GNUNET_PSEUDO_PseudonymIterator
+ iterator, void *closure)
{
struct DiscoveryCallback *prev;
struct DiscoveryCallback *pos;
Modified: GNUnet/src/applications/fs/pseudonyms/notification.h
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/notification.h 2008-05-30
05:18:54 UTC (rev 6930)
+++ GNUnet/src/applications/fs/pseudonyms/notification.h 2008-05-30
05:20:36 UTC (rev 6931)
@@ -35,7 +35,7 @@
*/
void
GNUNET_PSEUDO_internal_notify_ (const GNUNET_HashCode * id,
- const struct GNUNET_ECRS_MetaData *md,
- int rating);
+ const struct GNUNET_ECRS_MetaData *md,
+ int rating);
#endif
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2008-05-30 05:18:54 UTC
(rev 6930)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2008-05-30 05:20:36 UTC
(rev 6931)
@@ -136,7 +136,7 @@
int cpos;
char *namespaceName;
- namespaceName = GNUNET_PSEUDO_id_to_name(ectx, cfg, id);
+ namespaceName = GNUNET_PSEUDO_id_to_name (ectx, cfg, id);
GNUNET_hash_to_enc (id, &enc);
if (0 == strcmp (namespaceName, (char *) &enc))
printf (_("Namespace `%s' has rating %d.\n"), namespaceName, rating);
@@ -144,7 +144,7 @@
printf (_("Namespace `%s' (%s) has rating %d.\n"),
namespaceName, (char *) &enc, rating);
printMeta (md);
- GNUNET_free(namespaceName);
+ GNUNET_free (namespaceName);
if (set_rating != NULL)
{
int delta;
@@ -220,7 +220,8 @@
/* delete pseudonyms */
if (delete_name != NULL)
{
- if (GNUNET_OK == GNUNET_PSEUDO_name_to_id (ectx, cfg, delete_name,
&nsid))
+ if (GNUNET_OK ==
+ GNUNET_PSEUDO_name_to_id (ectx, cfg, delete_name, &nsid))
{
if (GNUNET_OK == GNUNET_NS_namespace_delete (ectx, cfg, &nsid))
{
Modified: GNUnet/src/include/gnunet_chat_lib.h
===================================================================
--- GNUnet/src/include/gnunet_chat_lib.h 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/include/gnunet_chat_lib.h 2008-05-30 05:20:36 UTC (rev
6931)
@@ -135,26 +135,33 @@
* @param member_id hash of public key of the user (for unique identification)
*/
typedef int (*GNUNET_CHAT_MemberListCallback) (void *cls,
- const struct
GNUNET_ECRS_MetaData* member_info,
- const GNUNET_RSA_PublicKey
*member_id);
+ const struct
+ GNUNET_ECRS_MetaData *
+ member_info,
+ const GNUNET_RSA_PublicKey *
+ member_id);
/**
* Callback used for message delivery confirmations.
*
* @param timestamp when was the message received?
- * @param msg_hash hash fo the original message
+ * @param msg_hash hash fo the original message
* @param room in which room was the message received?
* @param receipt signature confirming delivery
- * @return GNUNET_OK
+ * @return GNUNET_OK
*/
typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
- struct GNUNET_CHAT_Room *room,
+ struct GNUNET_CHAT_Room *
+ room,
unsigned int orig_seq_number,
GNUNET_CronTime timestamp,
- const GNUNET_HashCode *
receiver,
- const GNUNET_HashCode *
msg_hash,
- const GNUNET_RSA_Signature *
receipt);
+ const GNUNET_HashCode *
+ receiver,
+ const GNUNET_HashCode *
+ msg_hash,
+ const GNUNET_RSA_Signature *
+ receipt);
@@ -168,24 +175,28 @@
* @param member_info information about the joining member
* @param memberInfo public information about you
* @param messageCallback which function to call if a message has
- * been received?
+ * been received?
* @param message_cls argument to callback
* @param memberCallback which function to call for join/leave notifications
* @param confirmationCallback which function to call for confirmations (maybe
NULL)
* @return NULL on error
*/
-struct GNUNET_CHAT_Room *
-GNUNET_CHAT_join_room (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration*cfg,
- const char *nick_name,
- struct GNUNET_ECRS_MetaData * member_info,
- const char *room_name,
- GNUNET_CHAT_MessageCallback messageCallback,
- void *message_cls,
- GNUNET_CHAT_MemberListCallback memberCallback,
- void *member_cls,
- GNUNET_CHAT_MessageConfirmation confirmationCallback,
- void *confirmation_cls);
+struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (struct GNUNET_GE_Context
+ *ectx,
+ struct GNUNET_GC_Configuration
+ *cfg, const char *nick_name,
+ struct GNUNET_ECRS_MetaData
+ *member_info,
+ const char *room_name,
+ GNUNET_CHAT_MessageCallback
+ messageCallback,
+ void *message_cls,
+ GNUNET_CHAT_MemberListCallback
+ memberCallback,
+ void *member_cls,
+ GNUNET_CHAT_MessageConfirmation
+ confirmationCallback,
+ void *confirmation_cls);
/**
* Leave a chat room.
@@ -207,7 +218,7 @@
const char *message,
GNUNET_CHAT_MSG_OPTIONS options,
const GNUNET_RSA_PublicKey * receiver,
- unsigned int * sequence_number);
+ unsigned int *sequence_number);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: GNUnet/src/include/gnunet_dht_lib.h
===================================================================
--- GNUnet/src/include/gnunet_dht_lib.h 2008-05-30 05:18:54 UTC (rev 6930)
+++ GNUnet/src/include/gnunet_dht_lib.h 2008-05-30 05:20:36 UTC (rev 6931)
@@ -46,29 +46,32 @@
/**
* Set up a context for performing asynchronous DHT operations.
- *
+ *
* @param resultCallback function to call for results,
* the operation also aborts if the callback returns
* 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);
/**
* Start an asynchronous GET operation on the DHT looking for
* key.
- *
+ *
* @param type the type of key to look up
* @param key the key to look up
* @return GNUNET_OK on sucess, GNUNET_SYSERR on error
*/
int GNUNET_DHT_get_start (struct GNUNET_DHT_Context *ctx,
- unsigned int type,
- const GNUNET_HashCode * key);
+ unsigned int type, const GNUNET_HashCode * key);
/**
@@ -79,8 +82,7 @@
* @return GNUNET_OK on sucess, GNUNET_SYSERR on error
*/
int GNUNET_DHT_get_stop (struct GNUNET_DHT_Context *ctx,
- unsigned int type,
- const GNUNET_HashCode * key);
+ unsigned int type, const GNUNET_HashCode * key);
/**
* Destroy a previously created context for DHT operations.
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2008-05-30 05:20:36 UTC (rev
6931)
@@ -106,16 +106,14 @@
/**
* Create a fresh MetaData token.
*/
-struct GNUNET_ECRS_MetaData *
-GNUNET_ECRS_meta_data_create (void);
+struct GNUNET_ECRS_MetaData *GNUNET_ECRS_meta_data_create (void);
/**
* Duplicate a MetaData token.
*/
-struct GNUNET_ECRS_MetaData *
-GNUNET_ECRS_meta_data_duplicate (const struct
- GNUNET_ECRS_MetaData
- *meta);
+struct GNUNET_ECRS_MetaData *GNUNET_ECRS_meta_data_duplicate (const struct
+
GNUNET_ECRS_MetaData
+ *meta);
/**
* Free meta data.
@@ -242,10 +240,13 @@
* @return MD on success, NULL on error (i.e.
* bad format)
*/
-struct GNUNET_ECRS_MetaData *
-GNUNET_ECRS_meta_data_deserialize (struct GNUNET_GE_Context*ectx,
- const char *input,
- unsigned int size);
+struct GNUNET_ECRS_MetaData *GNUNET_ECRS_meta_data_deserialize (struct
+
GNUNET_GE_Context
+ *ectx,
+ const char
+ *input,
+ unsigned int
+ size);
/**
* Does the meta-data claim that this is a directory?
@@ -286,9 +287,8 @@
/**
* Convert a UTF-8 String to a URI.
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_string_to_uri (struct GNUNET_GE_Context *ectx,
- const char *uri);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_string_to_uri (struct GNUNET_GE_Context
+ *ectx, const char *uri);
/**
* Free URI.
@@ -326,8 +326,9 @@
*
* @return NULL if argument is not a location URI
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_uri_get_content_uri_from_loc (const struct GNUNET_ECRS_URI *uri);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_uri_get_content_uri_from_loc (const struct
+
GNUNET_ECRS_URI
+ *uri);
/**
* Function that produces a signature for
@@ -348,27 +349,33 @@
* RSA signatures for "sender".
* @return the location URI
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_location_to_uri (const struct GNUNET_ECRS_URI *baseUri,
- const GNUNET_RSA_PublicKey *peer,
- GNUNET_Int32Time expirationTime,
- GNUNET_ECRS_SignFunction signer,
- void *signer_cls);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_location_to_uri (const struct
+ GNUNET_ECRS_URI *baseUri,
+ const
+ GNUNET_RSA_PublicKey *
+ peer,
+ GNUNET_Int32Time
+ expirationTime,
+ GNUNET_ECRS_SignFunction
+ signer,
+ void *signer_cls);
/**
* Duplicate URI.
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_uri_duplicate (const struct GNUNET_ECRS_URI *uri);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_uri_duplicate (const struct
+ GNUNET_ECRS_URI *uri);
/**
* Expand a keyword-URI by duplicating all keywords,
* adding the current date (YYYY-MM-DD) after each
* keyword.
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_uri_expand_keywords_with_date (const struct GNUNET_ECRS_URI *uri);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_uri_expand_keywords_with_date (const
+ struct
+
GNUNET_ECRS_URI
+ *uri);
/**
* Create an ECRS URI from a single user-supplied string of keywords.
@@ -385,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.
@@ -406,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.
@@ -464,8 +476,9 @@
* in the meta-data and construct one large keyword URI
* that lists all keywords that can be found in the meta-data).
*/
-struct GNUNET_ECRS_URI *
-GNUNET_ECRS_meta_data_to_uri (const struct GNUNET_ECRS_MetaData *md);
+struct GNUNET_ECRS_URI *GNUNET_ECRS_meta_data_to_uri (const struct
+ GNUNET_ECRS_MetaData
+ *md);
typedef struct
@@ -536,18 +549,8 @@
* @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, /* absolute
time */
- GNUNET_ECRS_UploadProgressCallback upcb,
- void *upcbClosure,
- GNUNET_ECRS_TestTerminate tt,
- void *ttClosure,
- struct GNUNET_ECRS_URI **uri); /* upload.c */
+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,
/* absolute time */
+ GNUNET_ECRS_UploadProgressCallback upcb, void
*upcbClosure, GNUNET_ECRS_TestTerminate tt, void *ttClosure, struct
GNUNET_ECRS_URI **uri); /* upload.c */
/**
* Test if a file is indexed.
@@ -589,13 +592,7 @@
*
* @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); /* unindex.c */
+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); /* unindex.c */
/**
@@ -618,16 +615,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 char *name,
- 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 char *name,
+ 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);
/* namespace.c */
/**
@@ -648,9 +653,7 @@
*
* @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 char *namespaceName); /*
namespace.c */
+int GNUNET_ECRS_namespace_delete (struct GNUNET_GE_Context *ectx, struct
GNUNET_GC_Configuration *cfg, const char *namespaceName); /* namespace.c */
/**
* Callback with information about local (!) namespaces.
@@ -669,10 +672,7 @@
* @param list where to store the names (is allocated, caller frees)
* @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); /* namespace.c */
+int GNUNET_ECRS_get_namespaces (struct GNUNET_GE_Context *ectx, struct
GNUNET_GC_Configuration *cfg, GNUNET_ECRS_NamespaceInfoProcessor cb, void
*cls); /* namespace.c */
/**
* Add an entry into a namespace.
@@ -684,19 +684,35 @@
* 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 char *name,
- 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 char *name,
+ 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);
/* namespace.c */
/**
@@ -742,13 +758,7 @@
* 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); /* search.c */
+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); /* search.c */
/**
* Stop search for content.
@@ -764,14 +774,7 @@
* @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); /* search.c */
+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); /* search.c */
/**
* Notification of ECRS to a client about the progress of an insertion
@@ -845,15 +848,7 @@
* @param uri the URI of the file (determines what to download)
* @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); /* download.c */
+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); /*
download.c */
/**
* DOWNLOAD parts of a file. Note that this will store
@@ -874,18 +869,7 @@
* @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); /* download.c */
+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); /*
download.c */
/**
* Iterate over all entries in a directory. Note that directories
@@ -901,12 +885,7 @@
* @return number of entries on success, GNUNET_SYSERR if the
* 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); /*
directory.c */
+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); /*
directory.c */
/**
* Create a directory.
Modified: GNUnet/src/include/gnunet_fsui_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fsui_lib.h 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/include/gnunet_fsui_lib.h 2008-05-30 05:20:36 UTC (rev
6931)
@@ -924,14 +924,7 @@
* @param closure extra argument to cb
* @return NULL on error
*/
-struct GNUNET_FSUI_Context *
-GNUNET_FSUI_start (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *name,
- unsigned int threadPoolSize,
- int doResume,
- GNUNET_FSUI_EventProcessor cb,
- void *closure); /* fsui.c */
+struct GNUNET_FSUI_Context *GNUNET_FSUI_start (struct GNUNET_GE_Context *ectx,
struct GNUNET_GC_Configuration *cfg, const char *name, unsigned int
threadPoolSize, int doResume, GNUNET_FSUI_EventProcessor cb, void *closure); /*
fsui.c */
/**
* Stop all processes under FSUI control (may serialize
@@ -946,10 +939,7 @@
*
* @return NULL on error
*/
-struct GNUNET_FSUI_SearchList *
-GNUNET_FSUI_search_start (struct GNUNET_FSUI_Context *ctx,
- unsigned int anonymityLevel,
- const struct GNUNET_ECRS_URI *uri); /* search.c
*/
+struct GNUNET_FSUI_SearchList *GNUNET_FSUI_search_start (struct
GNUNET_FSUI_Context *ctx, unsigned int anonymityLevel, const struct
GNUNET_ECRS_URI *uri); /* search.c */
/**
* Abort a search.
@@ -984,15 +974,7 @@
*
* @return NULL on error
*/
-struct GNUNET_FSUI_DownloadList *
-GNUNET_FSUI_download_start (struct GNUNET_FSUI_Context *ctx,
- unsigned int anonymityLevel,
- int doRecursive,
- const struct GNUNET_ECRS_URI *uri,
- const struct GNUNET_ECRS_MetaData *meta,
- const char *filename,
- struct GNUNET_FSUI_SearchList *parentSearch,
- struct GNUNET_FSUI_DownloadList *parentDownload);
/* download.c */
+struct GNUNET_FSUI_DownloadList *GNUNET_FSUI_download_start (struct
GNUNET_FSUI_Context *ctx, unsigned int anonymityLevel, int doRecursive, const
struct GNUNET_ECRS_URI *uri, const struct GNUNET_ECRS_MetaData *meta, const
char *filename, struct GNUNET_FSUI_SearchList *parentSearch, struct
GNUNET_FSUI_DownloadList *parentDownload); /* download.c */
/**
* Abort a download. If the dl is for a recursive download, all
@@ -1042,20 +1024,32 @@
* @param keyURI keywords for top-level file
* @return NULL on error
*/
-struct GNUNET_FSUI_UploadList *
-GNUNET_FSUI_upload_start (struct GNUNET_FSUI_Context *ctx,
- const char *filename,
- GNUNET_FSUI_DirectoryScanCallback dsc,
- void *dscClosure,
- unsigned int anonymityLevel,
- unsigned int priority,
- int doIndex,
- int doExtract,
- int individualKeywords,
- GNUNET_CronTime expiration,
- const struct GNUNET_ECRS_MetaData *topLevelMetaData,
- const struct GNUNET_ECRS_URI *globalURI,
- const struct GNUNET_ECRS_URI*keyUri);
+struct GNUNET_FSUI_UploadList *GNUNET_FSUI_upload_start (struct
+ GNUNET_FSUI_Context
+ *ctx,
+ const char *filename,
+
GNUNET_FSUI_DirectoryScanCallback
+ dsc,
+ void *dscClosure,
+ unsigned int
+ anonymityLevel,
+ unsigned int
+ priority,
+ int doIndex,
+ int doExtract,
+ int
+ individualKeywords,
+ GNUNET_CronTime
+ expiration,
+ const struct
+ GNUNET_ECRS_MetaData
+ *topLevelMetaData,
+ const struct
+ GNUNET_ECRS_URI
+ *globalURI,
+ const struct
+ GNUNET_ECRS_URI
+ *keyUri);
/**
@@ -1081,9 +1075,11 @@
*
* @return NULL on error
*/
-struct GNUNET_FSUI_UnindexList *
-GNUNET_FSUI_unindex_start (struct GNUNET_FSUI_Context *ctx,
- const char *filename);
+struct GNUNET_FSUI_UnindexList *GNUNET_FSUI_unindex_start (struct
+ GNUNET_FSUI_Context
+ *ctx,
+ const char
+ *filename);
/**
Modified: GNUnet/src/include/gnunet_namespace_lib.h
===================================================================
--- GNUnet/src/include/gnunet_namespace_lib.h 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/include/gnunet_namespace_lib.h 2008-05-30 05:20:36 UTC (rev
6931)
@@ -65,16 +65,26 @@
* @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 char *namespaceName,
- 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 char *namespaceName,
+ 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
@@ -83,8 +93,8 @@
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
int GNUNET_NS_namespace_delete (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid);
/**
* Get the root of the namespace (if we have one).
@@ -138,19 +148,7 @@
* 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); /*
update_info.c */
+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); /*
update_info.c */
/**
* Compute the next ID for peridodically updated content.
@@ -169,11 +167,7 @@
/**
* 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); /* namespace_info.c */
+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); /* namespace_info.c */
/**
* Convert namespace URI to a human readable format
Modified: GNUnet/src/include/gnunet_pseudonym_lib.h
===================================================================
--- GNUnet/src/include/gnunet_pseudonym_lib.h 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/include/gnunet_pseudonym_lib.h 2008-05-30 05:20:36 UTC (rev
6931)
@@ -44,9 +44,11 @@
* @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_PSEUDO_PseudonymIterator) (void *cls,
- const GNUNET_HashCode
*pseudonym,
- const struct
GNUNET_ECRS_MetaData *md,
- int rating);
+ const GNUNET_HashCode *
+ pseudonym,
+ const struct
+ GNUNET_ECRS_MetaData * md,
+ int rating);
/**
* Change the ranking of a pseudonym.
@@ -55,10 +57,9 @@
* @param delta by how much should the rating be changed?
* @return new rating of the namespace
*/
-int GNUNET_PSEUDO_rank (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode *pseudonym,
- int delta);
+int GNUNET_PSEUDO_rank (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pseudonym, int delta);
/**
* Add a pseudonym to the set of known pseudonyms.
@@ -66,33 +67,35 @@
* @param pseudonym the pseudonym's identifier
*/
void GNUNET_PSEUDO_add (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pseudo,
- const struct GNUNET_ECRS_MetaData *meta);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pseudo,
+ const struct GNUNET_ECRS_MetaData *meta);
/**
* List all known pseudonyms.
*/
int GNUNET_PSEUDO_list_all (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_PSEUDO_PseudonymIterator iterator,
- void *closure);
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_PSEUDO_PseudonymIterator iterator,
+ void *closure);
/**
* Register callback to be invoked whenever we discover
* a new pseudonym.
*/
int GNUNET_PSEUDO_register_discovery_callback (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration
*cfg,
- GNUNET_PSEUDO_PseudonymIterator
iterator,
- void *closure);
+ struct GNUNET_GC_Configuration
+ *cfg,
+ GNUNET_PSEUDO_PseudonymIterator
+ iterator, void *closure);
/**
* Unregister namespace discovery callback.
*/
-int GNUNET_PSEUDO_unregister_discovery_callback
(GNUNET_PSEUDO_PseudonymIterator iterator,
- void *closure);
+int
+GNUNET_PSEUDO_unregister_discovery_callback (GNUNET_PSEUDO_PseudonymIterator
+ iterator, void *closure);
/**
* Return the unique, human readable name for the given pseudonym.
@@ -100,8 +103,8 @@
* @return NULL on failure (should never happen)
*/
char *GNUNET_PSEUDO_id_to_name (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pseudo);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pseudo);
/**
* Get the pseudonym ID belonging to the given human readable name.
@@ -109,9 +112,8 @@
* @return GNUNET_OK on success
*/
int GNUNET_PSEUDO_name_to_id (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const char *hname,
- GNUNET_HashCode * psid);
+ struct GNUNET_GC_Configuration *cfg,
+ const char *hname, GNUNET_HashCode * psid);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: GNUnet/src/util/network_client/tcpio.c
===================================================================
--- GNUnet/src/util/network_client/tcpio.c 2008-05-30 05:18:54 UTC (rev
6930)
+++ GNUnet/src/util/network_client/tcpio.c 2008-05-30 05:20:36 UTC (rev
6931)
@@ -392,7 +392,7 @@
slen = sizeof (struct sockaddr_in6);
}
GNUNET_free (soaddr);
- if (GETPEERNAME(osock, sa, &slen) != 0)
+ if (GETPEERNAME (osock, sa, &slen) != 0)
{
GNUNET_GE_LOG (sock->ectx,
GNUNET_GE_WARNING | GNUNET_GE_USER |
@@ -408,7 +408,7 @@
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
- continue;
+ continue;
}
GNUNET_free (sa);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6931 - in GNUnet/src: applications/chat applications/dht/module applications/dht/tools applications/dstore_sqlite applications/fs/ecrs applications/fs/fsui applications/fs/pseudonyms applications/fs/tools include util/network_client,
gnunet <=