[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6982 - in GNUnet: libltdl src/applications/chat/lib src/ap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6982 - in GNUnet: libltdl src/applications/chat/lib src/applications/chat/module src/applications/chat/tools src/applications/datastore src/applications/dht/tools src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/gap src/applications/fs/namespace src/applications/fs/pseudonyms src/applications/fs/tools src/applications/sqstore_mysql src/applications/testing src/include src/server src/setup/lib src/setup/ncurses src/transports src/util/network_client |
Date: |
Sun, 1 Jun 2008 14:17:51 -0600 (MDT) |
Author: grothoff
Date: 2008-06-01 14:17:50 -0600 (Sun, 01 Jun 2008)
New Revision: 6982
Modified:
GNUnet/libltdl/ltdl.c
GNUnet/src/applications/chat/lib/loopback_test.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/datastore/datastore.c
GNUnet/src/applications/dht/tools/dht_loopback_test.c
GNUnet/src/applications/dht/tools/dht_multipeer_test.c
GNUnet/src/applications/dht/tools/dht_twopeer_test.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/gap/gap.c
GNUnet/src/applications/fs/namespace/namespace_infotest.c
GNUnet/src/applications/fs/pseudonyms/info_test.c
GNUnet/src/applications/fs/pseudonyms/names.c
GNUnet/src/applications/fs/tools/gnunet-unindex.c
GNUnet/src/applications/sqstore_mysql/mysql.c
GNUnet/src/applications/testing/remote.c
GNUnet/src/applications/testing/remotetopologies.c
GNUnet/src/applications/testing/testing.c
GNUnet/src/include/chat.h
GNUnet/src/include/gnunet_chat_lib.h
GNUnet/src/server/connection.c
GNUnet/src/setup/lib/gns.c
GNUnet/src/setup/ncurses/mconf.c
GNUnet/src/transports/http.c
GNUnet/src/util/network_client/tcpio.c
Log:
indenting
Modified: GNUnet/libltdl/ltdl.c
===================================================================
--- GNUnet/libltdl/ltdl.c 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/libltdl/ltdl.c 2008-06-01 20:17:50 UTC (rev 6982)
@@ -1770,9 +1770,9 @@
*) (((struct
dylib_command
*)
- lc)->
- dylib.name.
- offset +
+ lc)->dylib.
+ name.offset
+ +
(unsigned
long)
lc));
Modified: GNUnet/src/applications/chat/lib/loopback_test.c
===================================================================
--- GNUnet/src/applications/chat/lib/loopback_test.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/chat/lib/loopback_test.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -46,104 +46,101 @@
static unsigned int error;
-struct Wanted {
- struct GNUNET_ECRS_MetaData * meta;
+struct Wanted
+{
+ struct GNUNET_ECRS_MetaData *meta;
- GNUNET_HashCode * sender;
+ GNUNET_HashCode *sender;
- char * msg;
-
- const char * me;
+ char *msg;
- struct GNUNET_Semaphore * recv;
+ const char *me;
- struct GNUNET_Semaphore * pre;
+ struct GNUNET_Semaphore *recv;
+ struct GNUNET_Semaphore *pre;
+
GNUNET_CHAT_MSG_OPTIONS opt;
-
+
};
static int
receive_callback (void *cls,
- struct GNUNET_CHAT_Room *room,
- const GNUNET_HashCode * sender,
- const struct GNUNET_ECRS_MetaData * member_info,
- const char *message,
- GNUNET_CHAT_MSG_OPTIONS options)
+ struct GNUNET_CHAT_Room *room,
+ const GNUNET_HashCode * sender,
+ const struct GNUNET_ECRS_MetaData *member_info,
+ const char *message, GNUNET_CHAT_MSG_OPTIONS options)
{
- struct Wanted * want = cls;
+ struct Wanted *want = cls;
#if DEBUG
- fprintf(stderr, "%s - told that %s says %s\n",
- want->me,
- member_info == NULL ? NULL
- : GNUNET_ECRS_meta_data_get_by_type(member_info, EXTRACTOR_TITLE),
- message);
+ fprintf (stderr, "%s - told that %s says %s\n",
+ want->me,
+ member_info == NULL ? NULL
+ : GNUNET_ECRS_meta_data_get_by_type (member_info, EXTRACTOR_TITLE),
+ message);
#endif
- GNUNET_semaphore_down(want->pre, GNUNET_YES);
- if (! ( (0 == strcmp(message, want->msg)) &&
- ( ( (sender == NULL) && (want->sender == NULL) ) ||
- ( (sender != NULL) &&
- (want->sender != NULL) &&
- (0 == memcmp(sender, want->sender, sizeof(GNUNET_HashCode))) ) )
&&
- (GNUNET_ECRS_meta_data_test_equal(member_info,
- want->meta)) &&
- (options == want->opt) ) )
+ GNUNET_semaphore_down (want->pre, GNUNET_YES);
+ if (!((0 == strcmp (message, want->msg)) &&
+ (((sender == NULL) && (want->sender == NULL)) ||
+ ((sender != NULL) &&
+ (want->sender != NULL) &&
+ (0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) &&
+ (GNUNET_ECRS_meta_data_test_equal (member_info,
+ want->meta)) &&
+ (options == want->opt)))
{
- abort();
+ abort ();
error++;
}
- GNUNET_semaphore_up(want->recv);
+ GNUNET_semaphore_up (want->recv);
return GNUNET_OK;
}
static int
member_list_callback (void *cls,
- const struct GNUNET_ECRS_MetaData * member_info,
- const GNUNET_RSA_PublicKey * member_id,
- GNUNET_CHAT_MSG_OPTIONS options)
+ const struct GNUNET_ECRS_MetaData *member_info,
+ const GNUNET_RSA_PublicKey * member_id,
+ GNUNET_CHAT_MSG_OPTIONS options)
{
- struct Wanted * want = cls;
+ struct Wanted *want = cls;
GNUNET_HashCode sender;
#if DEBUG
- fprintf(stderr, "%s - told that %s joins\n",
- want->me,
- member_info == NULL ? NULL
- : GNUNET_ECRS_meta_data_get_by_type(member_info, EXTRACTOR_TITLE));
+ fprintf (stderr, "%s - told that %s joins\n",
+ want->me,
+ member_info == NULL ? NULL
+ : GNUNET_ECRS_meta_data_get_by_type (member_info,
+ EXTRACTOR_TITLE));
#endif
- GNUNET_semaphore_down(want->pre, GNUNET_YES);
- GNUNET_hash(member_id,
- sizeof(GNUNET_RSA_PublicKey),
- &sender);
- if (! ( (0 == memcmp(&sender, want->sender, sizeof(GNUNET_HashCode))) &&
- ( ( (member_info == NULL) &&
- (want->meta == NULL) ) ||
- ( (member_info != NULL) &&
- (want->meta != NULL) &&
- (GNUNET_ECRS_meta_data_test_equal(member_info,
- want->meta)) ) ) &&
- (options == want->opt) ) )
+ GNUNET_semaphore_down (want->pre, GNUNET_YES);
+ GNUNET_hash (member_id, sizeof (GNUNET_RSA_PublicKey), &sender);
+ if (!((0 == memcmp (&sender, want->sender, sizeof (GNUNET_HashCode))) &&
+ (((member_info == NULL) &&
+ (want->meta == NULL)) ||
+ ((member_info != NULL) &&
+ (want->meta != NULL) &&
+ (GNUNET_ECRS_meta_data_test_equal (member_info,
+ want->meta)))) &&
+ (options == want->opt)))
{
- abort();
+ abort ();
error++;
}
- GNUNET_semaphore_up(want->recv);
+ GNUNET_semaphore_up (want->recv);
return GNUNET_OK;
}
static void
-check_down(struct Wanted * want)
+check_down (struct Wanted *want)
{
int tries;
tries = 10;
while (tries > 0)
{
- if (GNUNET_SYSERR !=
- GNUNET_semaphore_down(want->recv,
- GNUNET_YES))
- break;
- GNUNET_thread_sleep(50 * GNUNET_CRON_MILLISECONDS);
+ if (GNUNET_SYSERR != GNUNET_semaphore_down (want->recv, GNUNET_YES))
+ break;
+ GNUNET_thread_sleep (50 * GNUNET_CRON_MILLISECONDS);
tries--;
}
if (tries == 0)
@@ -163,15 +160,15 @@
struct GNUNET_CHAT_Room *r1;
struct GNUNET_CHAT_Room *r2;
unsigned int seq;
- struct GNUNET_ECRS_MetaData * meta1;
- struct GNUNET_ECRS_MetaData * meta2;
+ struct GNUNET_ECRS_MetaData *meta1;
+ struct GNUNET_ECRS_MetaData *meta2;
GNUNET_HashCode alice;
GNUNET_HashCode bob;
struct Wanted alice_wanted;
struct Wanted bob_wanted;
- memset(&alice_wanted, 0, sizeof(struct Wanted));
- memset(&bob_wanted, 0, sizeof(struct Wanted));
+ memset (&alice_wanted, 0, sizeof (struct Wanted));
+ memset (&bob_wanted, 0, sizeof (struct Wanted));
alice_wanted.me = "Alice";
bob_wanted.me = "Bob";
ret = 0;
@@ -194,83 +191,74 @@
return -1;
}
#endif
- meta1 = GNUNET_ECRS_meta_data_create();
- GNUNET_ECRS_meta_data_insert(meta1,
- EXTRACTOR_TITLE,
- "Alice");
- meta2 = GNUNET_ECRS_meta_data_create();
- GNUNET_ECRS_meta_data_insert(meta2,
- EXTRACTOR_TITLE,
- "Bob");
+ meta1 = GNUNET_ECRS_meta_data_create ();
+ GNUNET_ECRS_meta_data_insert (meta1, EXTRACTOR_TITLE, "Alice");
+ meta2 = GNUNET_ECRS_meta_data_create ();
+ GNUNET_ECRS_meta_data_insert (meta2, EXTRACTOR_TITLE, "Bob");
/* alice joining */
#if DEBUG
- fprintf(stderr,
- "Alice joining\n");
+ fprintf (stderr, "Alice joining\n");
#endif
- alice_wanted.recv = GNUNET_semaphore_create(0);
- alice_wanted.pre = GNUNET_semaphore_create(1);
+ alice_wanted.recv = GNUNET_semaphore_create (0);
+ alice_wanted.pre = GNUNET_semaphore_create (1);
alice_wanted.meta = meta1;
alice_wanted.sender = &alice;
alice_wanted.msg = NULL;
alice_wanted.opt = -1;
r1 =
- GNUNET_CHAT_join_room (NULL, cfg, "alice",
- meta1, "test", -1,
- &receive_callback, &alice_wanted,
- &member_list_callback, &alice_wanted,
- NULL, NULL,
- &alice);
+ GNUNET_CHAT_join_room (NULL, cfg, "alice",
+ meta1, "test", -1,
+ &receive_callback, &alice_wanted,
+ &member_list_callback, &alice_wanted,
+ NULL, NULL, &alice);
if (r1 == NULL)
{
ret = 1;
goto CLEANUP;
}
- check_down(&alice_wanted);
+ check_down (&alice_wanted);
/* bob joining */
#if DEBUG
- fprintf(stderr,
- "Bob joining\n");
+ fprintf (stderr, "Bob joining\n");
#endif
alice_wanted.meta = meta2;
alice_wanted.sender = &bob;
alice_wanted.msg = NULL;
alice_wanted.opt = -1;
- GNUNET_semaphore_up(alice_wanted.pre);
+ GNUNET_semaphore_up (alice_wanted.pre);
- bob_wanted.recv = GNUNET_semaphore_create(0);
- bob_wanted.pre = GNUNET_semaphore_create(1);
+ bob_wanted.recv = GNUNET_semaphore_create (0);
+ bob_wanted.pre = GNUNET_semaphore_create (1);
bob_wanted.meta = meta2;
bob_wanted.sender = &bob;
bob_wanted.msg = NULL;
bob_wanted.opt = -1;
r2 =
GNUNET_CHAT_join_room (NULL, cfg, "bob",
- meta2, "test", -1,
- &receive_callback, &bob_wanted,
- &member_list_callback, &bob_wanted,
- NULL, NULL,
- &bob);
+ meta2, "test", -1,
+ &receive_callback, &bob_wanted,
+ &member_list_callback, &bob_wanted,
+ NULL, NULL, &bob);
if (r2 == NULL)
{
ret = 1;
goto CLEANUP;
}
- check_down(&alice_wanted);
- check_down(&bob_wanted);
+ check_down (&alice_wanted);
+ check_down (&bob_wanted);
bob_wanted.meta = meta1;
bob_wanted.sender = &alice;
bob_wanted.msg = NULL;
bob_wanted.opt = -1;
- GNUNET_semaphore_up(bob_wanted.pre);
- check_down(&bob_wanted);
+ GNUNET_semaphore_up (bob_wanted.pre);
+ check_down (&bob_wanted);
/* end of Bob joining */
/* alice to bob */
#if DEBUG
- fprintf(stderr,
- "Alice says 'Hi!'\n");
+ fprintf (stderr, "Alice says 'Hi!'\n");
#endif
GNUNET_CHAT_send_message (r1, "Hi!",
GNUNET_CHAT_MSG_OPTION_NONE, NULL, &seq);
@@ -278,40 +266,38 @@
alice_wanted.sender = &alice;
alice_wanted.msg = "Hi!";
alice_wanted.opt = 0;
- GNUNET_semaphore_up(alice_wanted.pre);
+ GNUNET_semaphore_up (alice_wanted.pre);
bob_wanted.meta = meta1;
bob_wanted.sender = &alice;
bob_wanted.msg = "Hi!";
bob_wanted.opt = 0;
- GNUNET_semaphore_up(bob_wanted.pre);
- check_down(&alice_wanted);
- check_down(&bob_wanted);
+ GNUNET_semaphore_up (bob_wanted.pre);
+ check_down (&alice_wanted);
+ check_down (&bob_wanted);
/* bob to alice */
#if DEBUG
- fprintf(stderr,
- "Bob says 'Rehi!'\n");
+ fprintf (stderr, "Bob says 'Rehi!'\n");
#endif
- GNUNET_CHAT_send_message (r2, "Rehi!",
+ GNUNET_CHAT_send_message (r2, "Rehi!",
GNUNET_CHAT_MSG_OPTION_NONE, NULL, &seq);
alice_wanted.meta = meta2;
alice_wanted.sender = &bob;
alice_wanted.msg = "Rehi!";
alice_wanted.opt = 0;
- GNUNET_semaphore_up(alice_wanted.pre);
+ GNUNET_semaphore_up (alice_wanted.pre);
bob_wanted.meta = meta2;
bob_wanted.sender = &bob;
bob_wanted.msg = "Rehi!";
bob_wanted.opt = 0;
- GNUNET_semaphore_up(bob_wanted.pre);
- check_down(&alice_wanted);
- check_down(&bob_wanted);
+ GNUNET_semaphore_up (bob_wanted.pre);
+ check_down (&alice_wanted);
+ check_down (&bob_wanted);
/* alice leaving */
#if DEBUG
- fprintf(stderr,
- "Alice is leaving.\n");
+ fprintf (stderr, "Alice is leaving.\n");
#endif
GNUNET_CHAT_leave_room (r1);
r1 = NULL;
@@ -319,30 +305,29 @@
bob_wanted.sender = &alice;
bob_wanted.msg = NULL;
bob_wanted.opt = 0;
- GNUNET_semaphore_up(bob_wanted.pre);
- check_down(&bob_wanted);
+ GNUNET_semaphore_up (bob_wanted.pre);
+ check_down (&bob_wanted);
/* bob leaving */
#if DEBUG
- fprintf(stderr,
- "Bob is leaving.\n");
+ fprintf (stderr, "Bob is leaving.\n");
#endif
GNUNET_CHAT_leave_room (r2);
r2 = NULL;
- CLEANUP:
+CLEANUP:
if (r1 != NULL)
GNUNET_CHAT_leave_room (r1);
if (r2 != NULL)
GNUNET_CHAT_leave_room (r2);
if (bob_wanted.pre != NULL)
- GNUNET_semaphore_destroy(bob_wanted.pre);
+ GNUNET_semaphore_destroy (bob_wanted.pre);
if (bob_wanted.recv != NULL)
- GNUNET_semaphore_destroy(bob_wanted.recv);
+ GNUNET_semaphore_destroy (bob_wanted.recv);
if (alice_wanted.pre != NULL)
- GNUNET_semaphore_destroy(alice_wanted.pre);
+ GNUNET_semaphore_destroy (alice_wanted.pre);
if (alice_wanted.recv != NULL)
- GNUNET_semaphore_destroy(alice_wanted.recv);
+ GNUNET_semaphore_destroy (alice_wanted.recv);
#if START_PEERS
GNUNET_TESTING_stop_daemons (peers);
Modified: GNUnet/src/applications/chat/lib/messaging.c
===================================================================
--- GNUnet/src/applications/chat/lib/messaging.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/chat/lib/messaging.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -106,8 +106,9 @@
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 + ntohs(chat_room->my_private_key->len) -
sizeof(GNUNET_RSA_PrivateKeyEncoded);
+ size_of_join = sizeof (CS_chat_MESSAGE_JoinRequest) + meta_len
+ + room_len + ntohs (chat_room->my_private_key->len) -
+ sizeof (GNUNET_RSA_PrivateKeyEncoded);
if (size_of_join >= GNUNET_MAX_BUFFER_SIZE - 8)
return GNUNET_SYSERR;
join_msg = GNUNET_malloc (size_of_join);
@@ -116,11 +117,12 @@
join_msg->msg_options = htonl (chat_room->msg_options);
join_msg->room_name_len = htons (room_len);
join_msg->reserved = htons (0);
- memcpy(&join_msg->private_key,
- chat_room->my_private_key,
- ntohs(chat_room->my_private_key->len));
+ memcpy (&join_msg->private_key,
+ chat_room->my_private_key, ntohs (chat_room->my_private_key->len));
room = (char *) &join_msg[1];
- room += ntohs(chat_room->my_private_key->len) -
sizeof(GNUNET_RSA_PrivateKeyEncoded);
+ room +=
+ ntohs (chat_room->my_private_key->len) -
+ sizeof (GNUNET_RSA_PrivateKeyEncoded);
memcpy (room, chat_room->room_name, room_len);
if (GNUNET_SYSERR ==
GNUNET_ECRS_meta_data_serialize (chat_room->ectx,
@@ -233,7 +235,7 @@
GNUNET_PSEUDO_add (room->ectx, room->cfg, &pos->id, meta);
room->member_list_callback (room->member_list_callback_cls,
meta, &join_msg->public_key,
- ntohl(join_msg->msg_options));
+ ntohl (join_msg->msg_options));
pos->next = members;
members = pos;
break;
@@ -246,15 +248,12 @@
leave_msg = (CS_chat_MESSAGE_LeaveNotification *) reply;
room->member_list_callback (room->member_list_callback_cls,
NULL, &leave_msg->user,
- GNUNET_CHAT_MSG_OPTION_NONE);
- GNUNET_hash(&leave_msg->user,
- sizeof(GNUNET_RSA_PublicKey),
- &id);
+ GNUNET_CHAT_MSG_OPTION_NONE);
+ GNUNET_hash (&leave_msg->user, sizeof (GNUNET_RSA_PublicKey), &id);
prev = NULL;
pos = members;
while ((pos != NULL) &&
- (0 != memcmp (&pos->id,
- &id, sizeof (GNUNET_HashCode))))
+ (0 != memcmp (&pos->id, &id, sizeof (GNUNET_HashCode))))
{
prev = pos;
pos = pos->next;
@@ -446,31 +445,27 @@
GNUNET_CHAT_MemberListCallback memberCallback,
void *member_cls,
GNUNET_CHAT_MessageConfirmation confirmationCallback,
- void *confirmation_cls,
- GNUNET_HashCode * me)
+ void *confirmation_cls, GNUNET_HashCode * me)
{
struct GNUNET_CHAT_Room *chat_room;
struct GNUNET_ClientServerConnection *sock;
GNUNET_RSA_PrivateKeyEncoded *key;
- struct GNUNET_RSA_PrivateKey * priv_key;
+ struct GNUNET_RSA_PrivateKey *priv_key;
GNUNET_RSA_PublicKey pub_key;
key = GNUNET_CHAT_initPrivateKey (ectx, cfg, nick_name);
if (key == NULL)
return NULL;
- priv_key = GNUNET_RSA_decode_key(key);
- GNUNET_RSA_get_public_key(priv_key,
- &pub_key);
- GNUNET_hash(&pub_key,
- sizeof(GNUNET_RSA_PublicKey),
- me);
- GNUNET_RSA_free_key(priv_key);
+ priv_key = GNUNET_RSA_decode_key (key);
+ GNUNET_RSA_get_public_key (priv_key, &pub_key);
+ GNUNET_hash (&pub_key, sizeof (GNUNET_RSA_PublicKey), me);
+ GNUNET_RSA_free_key (priv_key);
sock = GNUNET_client_connection_create (ectx, cfg);
if (sock == NULL)
{
GNUNET_free (key);
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);
Modified: GNUnet/src/applications/chat/module/chat.c
===================================================================
--- GNUnet/src/applications/chat/module/chat.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/applications/chat/module/chat.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -42,7 +42,7 @@
/**
* Linked list of our current clients.
*/
-struct GNUNET_CS_chat_client
+struct GNUNET_CS_chat_client
{
struct GNUNET_CS_chat_client *next;
@@ -187,17 +187,19 @@
cmsg = (const CS_chat_MESSAGE_JoinRequest *) message;
header_size = ntohs (cmsg->header.size);
room_name_len = ntohs (cmsg->room_name_len);
- if (header_size - sizeof (CS_chat_MESSAGE_JoinRequest) +
sizeof(GNUNET_RSA_PrivateKeyEncoded)
- <= room_name_len + ntohs(cmsg->private_key.len))
+ if (header_size - sizeof (CS_chat_MESSAGE_JoinRequest) +
+ sizeof (GNUNET_RSA_PrivateKeyEncoded) <=
+ room_name_len + ntohs (cmsg->private_key.len))
{
GNUNET_GE_BREAK (NULL, 0);
return GNUNET_SYSERR;
}
meta_len =
header_size - sizeof (CS_chat_MESSAGE_JoinRequest) - room_name_len
- - ntohs(cmsg->private_key.len) + sizeof(GNUNET_RSA_PrivateKeyEncoded);
+ - ntohs (cmsg->private_key.len) + sizeof (GNUNET_RSA_PrivateKeyEncoded);
roomptr = (const char *) &cmsg[1];
- roomptr += ntohs(cmsg->private_key.len) -
sizeof(GNUNET_RSA_PrivateKeyEncoded);
+ roomptr +=
+ ntohs (cmsg->private_key.len) - sizeof (GNUNET_RSA_PrivateKeyEncoded);
room_name = GNUNET_malloc (room_name_len + 1);
memcpy (room_name, roomptr, room_name_len);
room_name[room_name_len] = '\0';
@@ -210,10 +212,8 @@
entry->meta_len = meta_len;
if (meta_len > 0)
{
- entry->member_info = GNUNET_malloc(meta_len);
- memcpy(entry->member_info,
- &roomptr[room_name_len],
- meta_len);
+ entry->member_info = GNUNET_malloc (meta_len);
+ memcpy (entry->member_info, &roomptr[room_name_len], meta_len);
}
else
entry->member_info = NULL;
@@ -241,25 +241,26 @@
while (entry != NULL)
{
if (0 == strcmp (room_name, entry->room))
- {
- coreAPI->cs_send_message (entry->client, &nmsg->header, GNUNET_YES);
- if (entry->client != client)
- {
- emsg = GNUNET_malloc(sizeof(CS_chat_MESSAGE_JoinNotification) +
- entry->meta_len);
- emsg->header.type = htons
(GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION);
- emsg->header.size =
- htons (sizeof (CS_chat_MESSAGE_JoinNotification) +
entry->meta_len);
- emsg->msg_options = entry->msg_options;
- GNUNET_RSA_get_public_key (entry->private_key,
- &emsg->public_key);
- memcpy(&emsg[1],
- entry->member_info,
- entry->meta_len);
- coreAPI->cs_send_message (client, &emsg->header, GNUNET_YES);
- GNUNET_free(emsg);
- }
- }
+ {
+ coreAPI->cs_send_message (entry->client, &nmsg->header, GNUNET_YES);
+ if (entry->client != client)
+ {
+ emsg =
+ GNUNET_malloc (sizeof (CS_chat_MESSAGE_JoinNotification) +
+ entry->meta_len);
+ emsg->header.type =
+ htons (GNUNET_CS_PROTO_CHAT_JOIN_NOTIFICATION);
+ emsg->header.size =
+ htons (sizeof (CS_chat_MESSAGE_JoinNotification) +
+ entry->meta_len);
+ emsg->msg_options = entry->msg_options;
+ GNUNET_RSA_get_public_key (entry->private_key,
+ &emsg->public_key);
+ memcpy (&emsg[1], entry->member_info, entry->meta_len);
+ coreAPI->cs_send_message (client, &emsg->header, GNUNET_YES);
+ GNUNET_free (emsg);
+ }
+ }
entry = entry->next;
}
GNUNET_mutex_unlock (chatMutex);
Modified: GNUnet/src/applications/chat/tools/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -98,7 +98,7 @@
member_list_callback (void *cls,
const struct GNUNET_ECRS_MetaData *member_info,
const GNUNET_RSA_PublicKey * member_id,
- GNUNET_CHAT_MSG_OPTIONS options)
+ GNUNET_CHAT_MSG_OPTIONS options)
{
char *nick;
GNUNET_HashCode id;
@@ -148,7 +148,7 @@
struct GNUNET_RSA_PrivateKey *my_priv;
struct GNUNET_ECRS_MetaData *meta;
char message[MAX_MESSAGE_LENGTH + 1];
- char * my_name;
+ char *my_name;
unsigned int seq;
GNUNET_HashCode me;
@@ -172,11 +172,10 @@
nickname,
meta,
room_name,
- -1,
+ -1,
&receive_callback, NULL,
&member_list_callback, NULL,
- &confirmation_callback, NULL,
- &me);
+ &confirmation_callback, NULL, &me);
GNUNET_ECRS_meta_data_destroy (meta);
if (room == NULL)
{
@@ -185,14 +184,12 @@
GNUNET_fini (ectx, cfg);
return -1;
}
- my_name = GNUNET_PSEUDO_id_to_name(ectx, cfg, &me);
+ my_name = GNUNET_PSEUDO_id_to_name (ectx, cfg, &me);
fprintf (stdout,
_
("Joined room `%s' as user `%s'.\nType message and hit return to
send.\nType `%s' when ready to quit.\n"),
- room_name,
- my_name,
- QUIT_COMMAND);
- GNUNET_free(my_name);
+ room_name, my_name, QUIT_COMMAND);
+ GNUNET_free (my_name);
/* read messages from command line and send */
while ((0 != strcmp (message, QUIT_COMMAND)) &&
(GNUNET_shutdown_test () == GNUNET_NO))
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/datastore/datastore.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -389,9 +389,9 @@
stat_filter_failed =
stats->create (gettext_noop ("# bloom filter false positives"));
- stats->set (stats->
- create (gettext_noop ("# bytes allowed in datastore")),
- quota);
+ stats->
+ set (stats->create (gettext_noop ("# bytes allowed in datastore")),
+ quota);
}
state = capi->service_request ("state");
if (state != NULL)
Modified: GNUnet/src/applications/dht/tools/dht_loopback_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_loopback_test.c 2008-06-01
20:13:27 UTC (rev 6981)
+++ GNUnet/src/applications/dht/tools/dht_loopback_test.c 2008-06-01
20:17:50 UTC (rev 6982)
@@ -81,7 +81,7 @@
int left;
int i;
-
+
ectx = NULL;
cfg = GNUNET_GC_create ();
if (-1 == GNUNET_GC_parse_configuration (cfg, "check.conf"))
@@ -104,8 +104,8 @@
ectx,
"NETWORK", "HOST",
"localhost:2087");
- ctx = GNUNET_DHT_context_create(cfg,ectx,&result_callback,unused_cls);
-
+ ctx = GNUNET_DHT_context_create (cfg, ectx, &result_callback, unused_cls);
+ CHECK (ctx != NULL);
/* actual test code */
GNUNET_hash ("key2", 4, &key);
value = GNUNET_malloc (8);
@@ -117,8 +117,8 @@
8, value));
i = 'A';
CHECK (1 == GNUNET_DHT_get_start (ctx,
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key));
+ GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key));
CHECK (err == 0);
GNUNET_hash ("key", 3, &key);
value = GNUNET_malloc (8);
@@ -131,8 +131,8 @@
CHECK (err == 0);
i = 'B';
CHECK (1 == GNUNET_DHT_get_start (ctx,
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key));
+ GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key));
GNUNET_hash ("key2", 4, &key);
CHECK (err == 0);
left = 10;
@@ -141,8 +141,8 @@
fprintf (stderr, ".");
i = 'A';
if (1 == GNUNET_DHT_get_start (ctx,
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key))
+ GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key))
break;
CHECK (err == 0);
left--;
@@ -151,7 +151,7 @@
CHECK (left > 0);
/* end of actual test code */
-GNUNET_DHT_context_destroy(ctx);
+ GNUNET_DHT_context_destroy (ctx);
FAILURE:
#if START_PEERS
Modified: GNUnet/src/applications/dht/tools/dht_multipeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_multipeer_test.c 2008-06-01
20:13:27 UTC (rev 6981)
+++ GNUnet/src/applications/dht/tools/dht_multipeer_test.c 2008-06-01
20:17:50 UTC (rev 6982)
@@ -184,7 +184,8 @@
GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + i * 10);
GNUNET_GC_set_configuration_value_string (cfg,
ectx, "NETWORK", "HOST", buf);
- ctx_array[i] =
GNUNET_DHT_context_create(cfg,ectx,&result_callback,NULL);
+ ctx_array[i] =
+ GNUNET_DHT_context_create (cfg, ectx, &result_callback, NULL);
for (j = 0; j < NUM_PEERS; j++)
{
GNUNET_snprintf (buf, 128, "localhost:%u", 2087 + j * 10);
@@ -195,8 +196,8 @@
printf (".");
fflush (stdout);
if (0 < GNUNET_DHT_get_start (ctx_array[i],
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key))
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key))
break;
}
if (k < NUM_ROUNDS)
@@ -209,10 +210,10 @@
}
}
}
-
+
for (i = 0; i < NUM_PEERS; i++)
{
- GNUNET_DHT_context_destroy(ctx_array[i]);
+ GNUNET_DHT_context_destroy (ctx_array[i]);
}
/* end of actual test code */
printf ("Found %u out of %u attempts.\n", found, NUM_PEERS * NUM_PEERS);
Modified: GNUnet/src/applications/dht/tools/dht_twopeer_test.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_twopeer_test.c 2008-06-01
20:13:27 UTC (rev 6981)
+++ GNUnet/src/applications/dht/tools/dht_twopeer_test.c 2008-06-01
20:17:50 UTC (rev 6982)
@@ -54,8 +54,8 @@
static int
result_callback_peer1 (const GNUNET_HashCode * key,
- unsigned int type,
- unsigned int size, const char *data, void *cls)
+ unsigned int type,
+ unsigned int size, const char *data, void *cls)
{
int *i = cls;
char expect[8];
@@ -76,8 +76,8 @@
static int
result_callback_peer2 (const GNUNET_HashCode * key,
- unsigned int type,
- unsigned int size, const char *data, void *cls)
+ unsigned int type,
+ unsigned int size, const char *data, void *cls)
{
int *i = cls;
char expect[8];
@@ -144,11 +144,13 @@
}
/* wait for DHT's to find each other! */
- ctx_peer1 = GNUNET_DHT_context_create(cfg,ectx,&result_callback_peer1,NULL);
+ ctx_peer1 =
+ GNUNET_DHT_context_create (cfg, ectx, &result_callback_peer1, NULL);
left = 50; /* how many iterations should we wait? */
printf ("Waiting for peers to DHT-connect (1->2)");
while (GNUNET_OK ==
- GNUNET_STATS_get_statistics (NULL, ctx_peer1->sock, &waitForConnect,
NULL))
+ GNUNET_STATS_get_statistics (NULL, ctx_peer1->sock, &waitForConnect,
+ NULL))
{
printf (".");
fflush (stdout);
@@ -163,7 +165,7 @@
GNUNET_TESTING_stop_daemons (peers);
fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
GNUNET_GC_free (cfg);
- GNUNET_DHT_context_destroy(ctx_peer1);
+ GNUNET_DHT_context_destroy (ctx_peer1);
return -1;
}
@@ -174,11 +176,13 @@
"localhost:12087");
/* verify that peer2 also sees the other DHT! */
ok = 0;
- ctx_peer2 = GNUNET_DHT_context_create(cfg,ectx,&result_callback_peer2,NULL);
+ ctx_peer2 =
+ GNUNET_DHT_context_create (cfg, ectx, &result_callback_peer2, NULL);
left = 50; /* how many iterations should we wait? */
printf ("Waiting for peers to DHT-connect (2->1)");
while (GNUNET_OK ==
- GNUNET_STATS_get_statistics (NULL, ctx_peer2->sock, &waitForConnect,
NULL))
+ GNUNET_STATS_get_statistics (NULL, ctx_peer2->sock, &waitForConnect,
+ NULL))
{
printf (".");
fflush (stdout);
@@ -193,8 +197,8 @@
GNUNET_TESTING_stop_daemons (peers);
fprintf (stderr, "Peers' DHTs failed to DHT-connect!\n");
GNUNET_GC_free (cfg);
- GNUNET_DHT_context_destroy(ctx_peer1);
- GNUNET_DHT_context_destroy(ctx_peer2);
+ GNUNET_DHT_context_destroy (ctx_peer1);
+ GNUNET_DHT_context_destroy (ctx_peer2);
return -1;
}
@@ -229,8 +233,8 @@
printf (".");
fflush (stdout);
if (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer2,
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key))
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key))
break;
}
while (peer2count > 0);
@@ -245,8 +249,8 @@
printf (".");
fflush (stdout);
if (GNUNET_OK == GNUNET_DHT_get_start (ctx_peer1,
- GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
- &key))
+
GNUNET_ECRS_BLOCKTYPE_DHT_STRING2STRING,
+ &key))
break;
}
while (peer1count > 0);
@@ -259,8 +263,8 @@
GNUNET_TESTING_stop_daemons (peers);
#endif
GNUNET_GC_free (cfg);
- GNUNET_DHT_context_destroy(ctx_peer1);
- GNUNET_DHT_context_destroy(ctx_peer2);
+ GNUNET_DHT_context_destroy (ctx_peer1);
+ GNUNET_DHT_context_destroy (ctx_peer2);
return ret;
}
Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/fs/collection/collection.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -353,12 +353,12 @@
for (i = 0; i < collectionData->file_count; i++)
{
mlen =
- GNUNET_ECRS_meta_data_get_serialized_size (collectionData->files[i].
- meta, GNUNET_NO);
+ GNUNET_ECRS_meta_data_get_serialized_size (collectionData->
+ files[i].meta, GNUNET_NO);
buf = GNUNET_malloc (mlen);
if (mlen != GNUNET_ECRS_meta_data_serialize (ectx,
- collectionData->files[i].
- meta, buf, mlen,
+ collectionData->
+ files[i].meta, buf, mlen,
GNUNET_NO))
{
GNUNET_GE_BREAK (ectx, 0);
@@ -577,12 +577,9 @@
GNUNET_OK == GNUNET_ECRS_directory_create (ectx,
&dirData,
&dirLen,
- collectionData->
- file_count,
- collectionData->
- files,
- collectionData->
- meta));
+
collectionData->file_count,
+
collectionData->files,
+
collectionData->meta));
if (-1 == WRITE (fd, dirData, dirLen))
{
GNUNET_GE_LOG_STRERROR (ectx,
@@ -596,10 +593,10 @@
GNUNET_free (dirData);
CLOSE (fd);
if (GNUNET_OK != GNUNET_ECRS_file_upload (ectx, cfg, tmpName, GNUNET_NO,
/* indexing */
- ntohl (collectionData->data.
- anonymityLevel),
- ntohl (collectionData->data.
- priority),
+ ntohl (collectionData->
+ data.anonymityLevel),
+ ntohl (collectionData->
+ data.priority),
GNUNET_get_time () +
COLLECTION_ADV_LIFETIME, NULL,
NULL, NULL, NULL, &directoryURI))
@@ -614,14 +611,14 @@
uri = GNUNET_ECRS_namespace_add_content (ectx,
cfg,
&collectionData->data.pid,
- ntohl (collectionData->data.
- anonymityLevel),
- ntohl (collectionData->data.
- priority),
+ ntohl (collectionData->
+ data.anonymityLevel),
+ ntohl (collectionData->
+ data.priority),
GNUNET_get_time () +
COLLECTION_ADV_LIFETIME, now,
- ntohl (collectionData->data.
- updateInterval),
+ ntohl (collectionData->
+ data.updateInterval),
&collectionData->data.lastId,
&collectionData->data.nextId,
directoryURI,
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -309,8 +309,8 @@
(GNUNET_EC_NBlock) +
mdsize,
&knb->nblock,
- &knb->kblock.
- signature));
+ &knb->
+ kblock.signature));
/* extra check: verify sig */
GNUNET_RSA_free_key (pk);
if (GNUNET_OK != GNUNET_FS_insert (sock, knvalue))
Modified: GNUnet/src/applications/fs/gap/gap.c
===================================================================
--- GNUnet/src/applications/fs/gap/gap.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/applications/fs/gap/gap.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -469,17 +469,17 @@
GNUNET_GE_ASSERT (NULL, block_count <= MAX_ENTRIES_PER_SLOT);
blocked[block_count++] = rl->response_target;
GNUNET_FS_PT_change_rc (rl->response_target, 1);
-
- rl->value_offered = 0;
+
+ rl->value_offered = 0;
if (stats != NULL)
- stats->change (stat_trust_earned, rl->value_offered);
+ stats->change (stat_trust_earned, rl->value_offered);
if (rl->type != GNUNET_ECRS_BLOCKTYPE_DATA)
GNUNET_FS_SHARED_mark_response_seen (rl, &hc);
GNUNET_FS_PLAN_success (rid, NULL, rl->response_target, rl);
value += rl->value;
- rl_value = rl->value;
+ rl_value = rl->value;
rl->value = 0;
-
+
if (rl->type == GNUNET_ECRS_BLOCKTYPE_DATA)
{
if (prev == NULL)
@@ -495,8 +495,8 @@
}
/* queue response (do this last since ciphertext_send may
- cause the core to detect that the connection died which
- may result in changes to the request list!) */
+ cause the core to detect that the connection died which
+ may result in changes to the request list!) */
msg = GNUNET_malloc (sizeof (P2P_gap_reply_MESSAGE) + size);
msg->header.type = htons (GNUNET_P2P_PROTO_GAP_RESULT);
msg->header.size = htons (sizeof (P2P_gap_reply_MESSAGE) + size);
@@ -510,10 +510,10 @@
GNUNET_GAP_MAX_GAP_DELAY);
GNUNET_free (msg);
- /* since the linked list may have changed, start again
- from the beginning! */
- rl = table[index];
- continue;
+ /* since the linked list may have changed, start again
+ from the beginning! */
+ rl = table[index];
+ continue;
}
prev = rl;
rl = rl->next;
Modified: GNUnet/src/applications/fs/namespace/namespace_infotest.c
===================================================================
--- GNUnet/src/applications/fs/namespace/namespace_infotest.c 2008-06-01
20:13:27 UTC (rev 6981)
+++ GNUnet/src/applications/fs/namespace/namespace_infotest.c 2008-06-01
20:17:50 UTC (rev 6982)
@@ -22,6 +22,9 @@
* @file applications/fs/fsui/namespace_infotest.c
* @brief testcase for namespace_info.c
* @author Christian Grothoff
+ *
+ * TODO:
+ * - more comprehensive testcase!
*/
#include "platform.h"
Modified: GNUnet/src/applications/fs/pseudonyms/info_test.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/info_test.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/fs/pseudonyms/info_test.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -45,8 +45,8 @@
int newVal;
struct GNUNET_GC_Configuration *cfg;
struct GNUNET_GE_Context *ectx;
- char * name1;
- char * name2;
+ char *name1;
+ char *name2;
ok = GNUNET_YES;
GNUNET_disable_entropy_gathering ();
@@ -62,24 +62,24 @@
GNUNET_ECRS_meta_data_insert (meta, EXTRACTOR_TITLE, "test");
GNUNET_create_random_hash (&id1);
GNUNET_PSEUDO_add (ectx, cfg, &id1, meta);
- newVal = GNUNET_PSEUDO_list_all (ectx, cfg, NULL, NULL);
+ newVal = GNUNET_PSEUDO_list_all (ectx, cfg, NULL, NULL);
CHECK (old < newVal);
old = newVal;
- name1 = GNUNET_PSEUDO_id_to_name(ectx, cfg, &id1);
+ name1 = GNUNET_PSEUDO_id_to_name (ectx, cfg, &id1);
GNUNET_create_random_hash (&id2);
GNUNET_PSEUDO_add (ectx, cfg, &id2, meta);
newVal = GNUNET_PSEUDO_list_all (ectx, cfg, NULL, NULL);
CHECK (old < newVal);
- name2 = GNUNET_PSEUDO_id_to_name(ectx, cfg, &id2);
+ name2 = GNUNET_PSEUDO_id_to_name (ectx, cfg, &id2);
CHECK (name2 != NULL);
- name1 = GNUNET_PSEUDO_id_to_name(ectx, cfg, &id1);
+ name1 = GNUNET_PSEUDO_id_to_name (ectx, cfg, &id1);
CHECK (name1 != NULL);
- CHECK (GNUNET_OK == GNUNET_PSEUDO_name_to_id(ectx, cfg, name2, &rid2));
- CHECK (GNUNET_OK == GNUNET_PSEUDO_name_to_id(ectx, cfg, name1, &rid1));
- CHECK (0 == memcmp(&id1, &rid1, sizeof(GNUNET_HashCode)));
- CHECK (0 == memcmp(&id2, &rid2, sizeof(GNUNET_HashCode)));
- GNUNET_free(name1);
- GNUNET_free(name2);
+ CHECK (GNUNET_OK == GNUNET_PSEUDO_name_to_id (ectx, cfg, name2, &rid2));
+ CHECK (GNUNET_OK == GNUNET_PSEUDO_name_to_id (ectx, cfg, name1, &rid1));
+ CHECK (0 == memcmp (&id1, &rid1, sizeof (GNUNET_HashCode)));
+ CHECK (0 == memcmp (&id2, &rid2, sizeof (GNUNET_HashCode)));
+ GNUNET_free (name1);
+ GNUNET_free (name2);
/* END OF TEST CODE */
FAILURE:
GNUNET_ECRS_meta_data_destroy (meta);
Modified: GNUnet/src/applications/fs/pseudonyms/names.c
===================================================================
--- GNUnet/src/applications/fs/pseudonyms/names.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/fs/pseudonyms/names.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -135,7 +135,7 @@
if (slen == 0)
return GNUNET_SYSERR;
name = GNUNET_strdup (ns_uname);
- name[slen-1] = '\0';
+ name[slen - 1] = '\0';
GNUNET_hash (name, strlen (name), &nh);
GNUNET_free (name);
fn = GNUNET_PSEUDO_internal_get_data_filename_ (ectx,
Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -75,9 +75,9 @@
event->data.UnindexCompleted.total,
delta / GNUNET_CRON_SECONDS,
(delta ==
- 0) ? (double) (-1.0) : (double) (event->data.
- UnindexCompleted.total /
- 1024.0 *
+ 0) ? (double) (-1.0) : (double) (event->
+ data.UnindexCompleted.
+ total / 1024.0 *
GNUNET_CRON_SECONDS /
delta));
}
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -1273,8 +1273,8 @@
if (type != 0)
stmt =
(vhash !=
- NULL) ? dbh->count_entry_by_hash_vhash_and_type : dbh->
- count_entry_by_hash_and_type;
+ NULL) ? dbh->
+ count_entry_by_hash_vhash_and_type : dbh->count_entry_by_hash_and_type;
else
stmt =
(vhash !=
@@ -1416,8 +1416,8 @@
else
stmt =
(vhash !=
- NULL) ? dbh->select_entry_by_hash_and_vhash : dbh->
- select_entry_by_hash;
+ NULL) ? dbh->
+ select_entry_by_hash_and_vhash : dbh->select_entry_by_hash;
if (count == 0)
limit_off = off;
else
Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/applications/testing/remote.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -421,8 +421,7 @@
GNUNET_REMOTE_start_daemon (remote_gnunetd_path, "/tmp/",
temp, remote_config_path,
curr_host, ssh_username,
- temp_pos->
- remote_friend_file_path);
+
temp_pos->remote_friend_file_path);
GNUNET_GC_get_configuration_value_number (basecfg,
"NETWORK",
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-06-01 20:13:27 UTC
(rev 6981)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-06-01 20:17:50 UTC
(rev 6982)
@@ -370,15 +370,13 @@
{
fprintf (stderr, ".");
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock1,
- &h2->
-
senderIdentity))
+
&h2->senderIdentity))
{
ret = GNUNET_OK;
break;
}
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock2,
- &h1->
-
senderIdentity))
+
&h1->senderIdentity))
{
ret = GNUNET_OK;
break;
Modified: GNUnet/src/applications/testing/testing.c
===================================================================
--- GNUnet/src/applications/testing/testing.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/applications/testing/testing.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -277,8 +277,7 @@
{
fprintf (stderr, ".");
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock1,
- &h2->
-
senderIdentity))
+
&h2->senderIdentity))
{
ret = GNUNET_OK;
GNUNET_free_non_null (h1);
@@ -286,8 +285,7 @@
break;
}
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock2,
- &h1->
-
senderIdentity))
+
&h1->senderIdentity))
{
ret = GNUNET_OK;
GNUNET_free_non_null (h1);
Modified: GNUnet/src/include/chat.h
===================================================================
--- GNUnet/src/include/chat.h 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/src/include/chat.h 2008-06-01 20:17:50 UTC (rev 6982)
@@ -143,7 +143,7 @@
/**
* Reserved (should be zero).
- */
+ */
unsigned short reserved;
/**
Modified: GNUnet/src/include/gnunet_chat_lib.h
===================================================================
--- GNUnet/src/include/gnunet_chat_lib.h 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/include/gnunet_chat_lib.h 2008-06-01 20:17:50 UTC (rev
6982)
@@ -125,7 +125,8 @@
member_info,
const GNUNET_RSA_PublicKey *
member_id,
- GNUNET_CHAT_MSG_OPTIONS options);
+ GNUNET_CHAT_MSG_OPTIONS
+ options);
/**
@@ -187,7 +188,7 @@
GNUNET_CHAT_MessageConfirmation
confirmationCallback,
void *confirmation_cls,
- GNUNET_HashCode * pid);
+ GNUNET_HashCode * pid);
/**
* Leave a chat room.
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/src/server/connection.c 2008-06-01 20:17:50 UTC (rev 6982)
@@ -721,8 +721,8 @@
if (root->session.tsession != NULL)
GNUNET_GE_ASSERT (NULL,
GNUNET_OK ==
- transport->assert_associated (root->session.
- tsession,
+ transport->assert_associated (root->
+ session.tsession,
__FILE__));
root = root->overflowChain;
}
@@ -1903,8 +1903,8 @@
stats->change (stat_transmitted, p);
be->available_send_window -= p;
be->lastSequenceNumberSend++;
- GNUNET_CORE_connection_reserve_downstream_bandwidth (&be->session.
- sender, 0);
+ GNUNET_CORE_connection_reserve_downstream_bandwidth (&be->
+ session.sender, 0);
if (be->idealized_limit > be->max_transmitted_limit)
be->max_transmitted_limit = be->idealized_limit;
else /* age */
@@ -2484,8 +2484,8 @@
{
IF_GELOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_USER,
- GNUNET_hash_to_enc (&entries[u]->session.sender.
- hashPubKey, &enc));
+ GNUNET_hash_to_enc (&entries[u]->session.
+ sender.hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_USER,
"peer `%s' transmitted above limit: %llu bpm > %u
bpm\n",
@@ -2508,8 +2508,8 @@
#if DEBUG_CONNECTION
IF_GELOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK | GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&entries[u]->session.sender.
- hashPubKey, &enc));
+ GNUNET_hash_to_enc (&entries[u]->session.
+ sender.hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_INFO | GNUNET_GE_BULK |
GNUNET_GE_DEVELOPER,
@@ -2570,8 +2570,8 @@
for (u = 0; u < activePeerCount; u++)
{
GNUNET_CORE_connection_reserve_downstream_bandwidth (&entries
- [u]->
- session.sender, 0);
+ [u]->session.
+ sender, 0);
entries[u]->idealized_limit = 0;
}
while ((schedulableBandwidth > activePeerCount * 100) &&
@@ -2905,8 +2905,8 @@
IF_GELOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&root->session.sender.
- hashPubKey, &enc));
+ GNUNET_hash_to_enc (&root->session.
+ sender.hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
@@ -3009,8 +3009,8 @@
IF_GELOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
- GNUNET_hash_to_enc (&root->session.sender.
- hashPubKey, &enc));
+ GNUNET_hash_to_enc (&root->session.
+ sender.hashPubKey, &enc));
GNUNET_GE_LOG (ectx,
GNUNET_GE_DEBUG | GNUNET_GE_REQUEST |
GNUNET_GE_DEVELOPER,
Modified: GNUnet/src/setup/lib/gns.c
===================================================================
--- GNUnet/src/setup/lib/gns.c 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/src/setup/lib/gns.c 2008-06-01 20:17:50 UTC (rev 6982)
@@ -123,8 +123,8 @@
val = GNUNET_GC_get_configuration_value_yesno (cfg,
section,
option,
- pos->value.Boolean.
- def);
+ pos->value.
+ Boolean.def);
if (val == GNUNET_SYSERR)
{
return GNUNET_SYSERR;
@@ -139,18 +139,9 @@
if (GNUNET_SYSERR == GNUNET_GC_get_configuration_value_number (cfg,
section,
option,
- pos->
- value.
- UInt64.
- min,
- pos->
- value.
- UInt64.
- max,
- pos->
- value.
- UInt64.
- def,
+
pos->value.UInt64.min,
+
pos->value.UInt64.max,
+
pos->value.UInt64.def,
&val))
{
return GNUNET_SYSERR;
@@ -195,10 +186,7 @@
if (GNUNET_SYSERR == GNUNET_GC_get_configuration_value_string (cfg,
section,
option,
- pos->
- value.
- String.
- def,
+
pos->value.String.def,
&val))
return GNUNET_SYSERR;
GNUNET_free (pos->value.String.val);
@@ -215,14 +203,8 @@
(const
char
**)
- pos->
- value.
- String.
-
legalRange,
- pos->
- value.
- String.
- def,
+
pos->value.String.legalRange,
+
pos->value.String.def,
&ival))
return GNUNET_SYSERR;
GNUNET_free (pos->value.String.val);
Modified: GNUnet/src/setup/ncurses/mconf.c
===================================================================
--- GNUnet/src/setup/ncurses/mconf.c 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/src/setup/ncurses/mconf.c 2008-06-01 20:17:50 UTC (rev 6982)
@@ -179,10 +179,8 @@
case DLG_EXIT_CANCEL:
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
- pos->
- section,
- pos->
- option,
+
pos->section,
+
pos->option,
st ==
DLG_EXIT_OK
? "YES" :
@@ -217,12 +215,9 @@
case DLG_EXIT_OK:
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
- pos->
- section,
- pos->
- option,
- fitem.
- text))
+
pos->section,
+
pos->option,
+
fitem.text))
{
show_help (pos->option,
gettext_noop
@@ -284,13 +279,9 @@
case DLG_EXIT_OK:
if (0 != GNUNET_GC_set_configuration_value_choice (cfg,
ectx,
- pos->
- section,
- pos->
- option,
- val->
- String.
- legalRange
+
pos->section,
+
pos->option,
+
val->String.legalRange
[msel]))
{
show_help (pos->option,
@@ -369,10 +360,8 @@
tmp[strlen (tmp) - 1] = '\0';
if (0 != GNUNET_GC_set_configuration_value_choice (cfg,
ectx,
- pos->
- section,
- pos->
- option,
+
pos->section,
+
pos->option,
tmp))
{
GNUNET_free (tmp);
@@ -416,12 +405,9 @@
}
if (0 != GNUNET_GC_set_configuration_value_string (cfg,
ectx,
- pos->
- section,
- pos->
- option,
- fitem.
- text))
+
pos->section,
+
pos->option,
+
fitem.text))
{
show_help (pos->option,
gettext_noop
@@ -470,10 +456,8 @@
}
if (0 != GNUNET_GC_set_configuration_value_number (cfg,
ectx,
- pos->
-
section,
- pos->
-
option,
+
pos->section,
+
pos->option,
lval))
{
show_help (pos->option,
Modified: GNUnet/src/transports/http.c
===================================================================
--- GNUnet/src/transports/http.c 2008-06-01 20:13:27 UTC (rev 6981)
+++ GNUnet/src/transports/http.c 2008-06-01 20:17:50 UTC (rev 6982)
@@ -1049,8 +1049,9 @@
cpy = sizeof (GNUNET_MessageHeader) - httpSession->cs.client.rpos1;
if (cpy > have)
cpy = have;
- memcpy (&httpSession->cs.client.
- rbuff1[httpSession->cs.client.rpos1], &inbuf[poff], cpy);
+ memcpy (&httpSession->cs.
+ client.rbuff1[httpSession->cs.client.rpos1], &inbuf[poff],
+ cpy);
httpSession->cs.client.rpos1 += cpy;
have -= cpy;
poff += cpy;
@@ -1070,8 +1071,9 @@
httpSession->cs.client.rpos2;
if (cpy > have)
cpy = have;
- memcpy (&httpSession->cs.client.
- rbuff2[httpSession->cs.client.rpos2], &inbuf[poff], cpy);
+ memcpy (&httpSession->cs.
+ client.rbuff2[httpSession->cs.client.rpos2], &inbuf[poff],
+ cpy);
have -= cpy;
poff += cpy;
httpSession->cs.client.rpos2 += cpy;
Modified: GNUnet/src/util/network_client/tcpio.c
===================================================================
--- GNUnet/src/util/network_client/tcpio.c 2008-06-01 20:13:27 UTC (rev
6981)
+++ GNUnet/src/util/network_client/tcpio.c 2008-06-01 20:17:50 UTC (rev
6982)
@@ -274,7 +274,7 @@
GNUNET_get_ip_from_hostname (sock->ectx, host,
addr_families[af_index], &soaddr,
&socklen))
- continue;
+ continue;
GNUNET_mutex_lock (sock->destroylock);
if (sock->sock != NULL)
{
@@ -373,22 +373,21 @@
else
{
int soerr = 0;
- socklen_t soerrlen = sizeof(soerr);
+ socklen_t soerrlen = sizeof (soerr);
- ret = GETSOCKOPT(osock, SOL_SOCKET, SO_ERROR, &soerr, &soerrlen);
+ ret = GETSOCKOPT (osock, SOL_SOCKET, SO_ERROR, &soerr, &soerrlen);
if (ret != 0)
- GNUNET_GE_LOG_STRERROR (sock->ectx,
- GNUNET_GE_WARNING | GNUNET_GE_USER |
- GNUNET_GE_BULK, "getsockopt");
-
- if ((soerr != 0) ||
+ GNUNET_GE_LOG_STRERROR (sock->ectx,
+ GNUNET_GE_WARNING | GNUNET_GE_USER |
+ GNUNET_GE_BULK, "getsockopt");
+
+ if ((soerr != 0) ||
(ret != 0 && (errno == ENOTSOCK || errno == EBADF)))
{
GNUNET_GE_LOG (sock->ectx,
GNUNET_GE_DEBUG | GNUNET_GE_USER |
GNUNET_GE_BULK,
- _("Failed to connect to %s:%u\n"),
- host, port);
+ _("Failed to connect to %s:%u\n"), host, port);
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6982 - in GNUnet: libltdl src/applications/chat/lib src/applications/chat/module src/applications/chat/tools src/applications/datastore src/applications/dht/tools src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/gap src/applications/fs/namespace src/applications/fs/pseudonyms src/applications/fs/tools src/applications/sqstore_mysql src/applications/testing src/include src/server src/setup/lib src/setup/ncurses src/transports src/util/network_client,
gnunet <=