[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7046 - in GNUnet: libltdl src/applications/chat/lib src/ap
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7046 - in GNUnet: libltdl src/applications/chat/lib src/applications/chat/tools src/applications/datastore src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/namespace src/applications/fs/tools src/applications/fs/uritrack src/applications/sqstore_mysql src/applications/testing src/include src/server src/setup/lib src/setup/ncurses src/transports src/util/containers src/util/network_client src/util/pseudonym |
Date: |
Tue, 3 Jun 2008 23:58:02 -0600 (MDT) |
Author: grothoff
Date: 2008-06-03 23:58:01 -0600 (Tue, 03 Jun 2008)
New Revision: 7046
Modified:
GNUnet/libltdl/ltdl.c
GNUnet/src/applications/chat/lib/loopback_test.c
GNUnet/src/applications/chat/lib/messaging.c
GNUnet/src/applications/chat/tools/gnunet-chat.c
GNUnet/src/applications/datastore/datastore.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/directory.c
GNUnet/src/applications/fs/ecrs/directorytest.c
GNUnet/src/applications/fs/ecrs/helper.c
GNUnet/src/applications/fs/ecrs/keyspace.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/ecrs/parser.c
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/uri.c
GNUnet/src/applications/fs/fsui/recursive_download_persistence_test.c
GNUnet/src/applications/fs/fsui/search_linked_download_persistence_test.c
GNUnet/src/applications/fs/fsui/serialize.c
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/fs/namespace/update_info.c
GNUnet/src/applications/fs/tools/gnunet-download.c
GNUnet/src/applications/fs/tools/gnunet-insert.c
GNUnet/src/applications/fs/tools/gnunet-search.c
GNUnet/src/applications/fs/tools/gnunet-unindex.c
GNUnet/src/applications/fs/uritrack/file_info.c
GNUnet/src/applications/fs/uritrack/tracktest.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/gnunet_ecrs_lib.h
GNUnet/src/include/gnunet_fsui_lib.h
GNUnet/src/include/gnunet_util_containers.h
GNUnet/src/include/gnunet_util_pseudonym.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/containers/meta.c
GNUnet/src/util/containers/metatest.c
GNUnet/src/util/network_client/tcpio.c
GNUnet/src/util/pseudonym/common.c
GNUnet/src/util/pseudonym/common.h
GNUnet/src/util/pseudonym/info.c
GNUnet/src/util/pseudonym/info.h
GNUnet/src/util/pseudonym/names.c
GNUnet/src/util/pseudonym/notification.c
GNUnet/src/util/pseudonym/notification.h
Log:
re-indenting
Modified: GNUnet/libltdl/ltdl.c
===================================================================
--- GNUnet/libltdl/ltdl.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/libltdl/ltdl.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -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-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/chat/lib/loopback_test.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -86,8 +86,7 @@
(want->sender != NULL) &&
(0 == memcmp (sender, want->sender, sizeof (GNUNET_HashCode))))) &&
(GNUNET_meta_data_test_equal (member_info,
- want->meta)) &&
- (options == want->opt)))
+ want->meta)) && (options == want->opt)))
{
abort ();
error++;
@@ -109,8 +108,7 @@
fprintf (stderr, "%s - told that %s joins\n",
want->me,
member_info == NULL ? NULL
- : GNUNET_meta_data_get_by_type (member_info,
- EXTRACTOR_TITLE));
+ : GNUNET_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);
@@ -120,7 +118,7 @@
((member_info != NULL) &&
(want->meta != NULL) &&
(GNUNET_meta_data_test_equal (member_info,
- want->meta)))) &&
+ want->meta)))) &&
(options == want->opt)))
{
abort ();
Modified: GNUnet/src/applications/chat/lib/messaging.c
===================================================================
--- GNUnet/src/applications/chat/lib/messaging.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/chat/lib/messaging.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -102,8 +102,7 @@
char *room;
meta_len =
- GNUNET_meta_data_get_serialized_size (chat_room->member_info,
- GNUNET_YES);
+ GNUNET_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) -
@@ -125,8 +124,8 @@
memcpy (room, chat_room->room_name, room_len);
if (GNUNET_SYSERR ==
GNUNET_meta_data_serialize (chat_room->ectx,
- chat_room->member_info,
- &room[room_len], meta_len, GNUNET_YES))
+ chat_room->member_info,
+ &room[room_len], meta_len, GNUNET_YES))
{
GNUNET_free (join_msg);
return GNUNET_SYSERR;
@@ -220,8 +219,8 @@
join_msg = (CS_chat_MESSAGE_JoinNotification *) reply;
meta_len = size - sizeof (CS_chat_MESSAGE_JoinNotification);
meta = GNUNET_meta_data_deserialize (room->ectx,
- (const char *)
- &join_msg[1], meta_len);
+ (const char *)
+ &join_msg[1], meta_len);
if (meta == NULL)
{
malformed = GNUNET_YES;
@@ -455,7 +454,7 @@
key = GNUNET_CHAT_initPrivateKey (ectx, cfg, nick_name);
if (key == NULL)
return NULL;
- priv_key = GNUNET_RSA_decode_key (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_pseudonym_add (ectx, cfg, me, member_info);
Modified: GNUnet/src/applications/chat/tools/gnunet-chat.c
===================================================================
--- GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/chat/tools/gnunet-chat.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -42,34 +42,36 @@
static char *room_name;
-static struct GNUNET_Mutex * lock;
+static struct GNUNET_Mutex *lock;
static struct GNUNET_CHAT_Room *room;
static struct GNUNET_MetaData *meta;
-struct UserList {
- struct UserList * next;
+struct UserList
+{
+ struct UserList *next;
GNUNET_RSA_PublicKey pkey;
int ignored;
};
-static struct UserList * users;
+static struct UserList *users;
-struct ChatCommand {
- const char * command;
- int (*Action)(const char * arguments,
- const void * xtra);
- const char * helptext;
+struct ChatCommand
+{
+ const char *command;
+ int (*Action) (const char *arguments, const void *xtra);
+ const char *helptext;
};
-static void free_user_list()
+static void
+free_user_list ()
{
- struct UserList * next;
+ struct UserList *next;
while (users != NULL)
{
next = users->next;
- GNUNET_free(users);
+ GNUNET_free (users);
users = next;
}
}
@@ -97,14 +99,14 @@
const char *message, GNUNET_CHAT_MSG_OPTIONS options)
{
char *nick;
- const char * fmt;
+ const char *fmt;
if (sender != NULL)
nick = GNUNET_pseudonym_id_to_name (ectx, cfg, sender);
else
- nick = GNUNET_strdup(_("anonymous"));
- fmt = NULL;
- switch (options)
+ nick = GNUNET_strdup (_("anonymous"));
+ fmt = NULL;
+ switch (options)
{
case GNUNET_CHAT_MSG_OPTION_NONE:
case GNUNET_CHAT_MSG_ANONYMOUS:
@@ -113,26 +115,28 @@
case GNUNET_CHAT_MSG_PRIVATE:
fmt = _("`%s' said to you: %s\n");
break;
- case GNUNET_CHAT_MSG_PRIVATE|GNUNET_CHAT_MSG_ANONYMOUS:
+ case GNUNET_CHAT_MSG_PRIVATE | GNUNET_CHAT_MSG_ANONYMOUS:
fmt = _("`%s' said to you: %s\n");
break;
case GNUNET_CHAT_MSG_AUTHENTICATED:
fmt = _("`%s' said for sure: %s\n");
break;
- case GNUNET_CHAT_MSG_PRIVATE|GNUNET_CHAT_MSG_AUTHENTICATED:
+ case GNUNET_CHAT_MSG_PRIVATE | GNUNET_CHAT_MSG_AUTHENTICATED:
fmt = _("`%s' said to you for sure: %s\n");
break;
case GNUNET_CHAT_MSG_ACKNOWLEDGED:
fmt = _("`%s' was confirmed that you received: %s\n");
break;
- case GNUNET_CHAT_MSG_PRIVATE|GNUNET_CHAT_MSG_ACKNOWLEDGED:
+ case GNUNET_CHAT_MSG_PRIVATE | GNUNET_CHAT_MSG_ACKNOWLEDGED:
fmt = _("`%s' was confirmed that you and only you received: %s\n");
break;
- case GNUNET_CHAT_MSG_AUTHENTICATED|GNUNET_CHAT_MSG_ACKNOWLEDGED:
+ case GNUNET_CHAT_MSG_AUTHENTICATED | GNUNET_CHAT_MSG_ACKNOWLEDGED:
fmt = _("`%s' was confirmed that you received from him or her: %s\n");
break;
- case
GNUNET_CHAT_MSG_AUTHENTICATED|GNUNET_CHAT_MSG_PRIVATE|GNUNET_CHAT_MSG_ACKNOWLEDGED:
- fmt = _("`%s' was confirmed that you and only you received from him or
her: %s\n");
+ case GNUNET_CHAT_MSG_AUTHENTICATED | GNUNET_CHAT_MSG_PRIVATE |
GNUNET_CHAT_MSG_ACKNOWLEDGED:
+ fmt =
+ _
+ ("`%s' was confirmed that you and only you received from him or her:
%s\n");
break;
case GNUNET_CHAT_MSG_OFF_THE_RECORD:
fmt = _("`%s' said off the record: %s\n");
@@ -141,10 +145,7 @@
fmt = _("<%s> said using an unknown message type: %s\n");
break;
}
- fprintf (stdout,
- fmt,
- nick,
- message);
+ fprintf (stdout, fmt, nick, message);
GNUNET_free (nick);
return GNUNET_OK;
}
@@ -157,19 +158,19 @@
{
char *nick;
GNUNET_HashCode id;
- struct UserList * pos;
- struct UserList * prev;
+ struct UserList *pos;
+ struct UserList *prev;
GNUNET_hash (member_id, sizeof (GNUNET_RSA_PublicKey), &id);
nick = GNUNET_pseudonym_id_to_name (ectx, cfg, &id);
fprintf (stdout, member_info != NULL
? _("`%s' entered the room\n") : _("`%s' left the room\n"), nick);
GNUNET_free (nick);
- GNUNET_mutex_lock(lock);
+ GNUNET_mutex_lock (lock);
if (member_info != NULL)
{
/* user joining */
- pos = GNUNET_malloc(sizeof(struct UserList));
+ pos = GNUNET_malloc (sizeof (struct UserList));
pos->next = users;
pos->pkey = *member_id;
pos->ignored = GNUNET_NO;
@@ -180,28 +181,27 @@
/* user leaving */
prev = NULL;
pos = users;
- while ( (pos != NULL) &&
- (0 != memcmp(&pos->pkey,
- member_id,
- sizeof(GNUNET_RSA_PublicKey))) )
- {
- prev = pos;
- pos = pos->next;
- }
+ while ((pos != NULL) &&
+ (0 != memcmp (&pos->pkey,
+ member_id, sizeof (GNUNET_RSA_PublicKey))))
+ {
+ prev = pos;
+ pos = pos->next;
+ }
if (pos == NULL)
- {
- GNUNET_GE_BREAK(NULL, 0);
- }
+ {
+ GNUNET_GE_BREAK (NULL, 0);
+ }
else
- {
- if (prev == NULL)
- users = pos->next;
- else
- prev->next = pos->next;
- GNUNET_free(pos);
- }
+ {
+ if (prev == NULL)
+ users = pos->next;
+ else
+ prev->next = pos->next;
+ GNUNET_free (pos);
+ }
}
- GNUNET_mutex_unlock(lock);
+ GNUNET_mutex_unlock (lock);
return GNUNET_OK;
}
@@ -228,29 +228,30 @@
return GNUNET_OK;
}
-static int do_transmit(const char * msg,
- const void * xtra) {
+static int
+do_transmit (const char *msg, const void *xtra)
+{
unsigned int seq;
if (GNUNET_OK != GNUNET_CHAT_send_message (room,
- msg,
- GNUNET_CHAT_MSG_OPTION_NONE,
- NULL,
- &seq))
+ msg,
+ GNUNET_CHAT_MSG_OPTION_NONE,
+ NULL, &seq))
fprintf (stderr, _("Failed to send message.\n"));
return GNUNET_OK;
}
-static int do_join(const char * arg,
- const void * xtra) {
- char * my_name;
+static int
+do_join (const char *arg, const void *xtra)
+{
+ char *my_name;
GNUNET_HashCode me;
if (arg[0] == '#')
- arg++; /* ignore first hash */
- GNUNET_CHAT_leave_room(room);
- free_user_list();
- GNUNET_free(room_name);
- room_name = GNUNET_strdup(arg);
+ arg++; /* ignore first hash */
+ GNUNET_CHAT_leave_room (room);
+ free_user_list ();
+ GNUNET_free (room_name);
+ room_name = GNUNET_strdup (arg);
room = GNUNET_CHAT_join_room (ectx,
cfg,
nickname,
@@ -261,23 +262,22 @@
&member_list_callback, NULL,
&confirmation_callback, NULL, &me);
my_name = GNUNET_pseudonym_id_to_name (ectx, cfg, &me);
- fprintf (stdout,
- _("Joined room `%s' as user `%s'.\n"),
- room_name, my_name);
- GNUNET_free(my_name);
+ fprintf (stdout, _("Joined room `%s' as user `%s'.\n"), room_name, my_name);
+ GNUNET_free (my_name);
return GNUNET_OK;
}
-static int do_nick(const char * msg,
- const void * xtra) {
+static int
+do_nick (const char *msg, const void *xtra)
+{
char *my_name;
GNUNET_HashCode me;
- GNUNET_CHAT_leave_room(room);
- free_user_list();
- GNUNET_free(nickname);
- GNUNET_meta_data_destroy(meta);
- nickname = GNUNET_strdup(msg);
+ GNUNET_CHAT_leave_room (room);
+ free_user_list ();
+ GNUNET_free (nickname);
+ GNUNET_meta_data_destroy (meta);
+ nickname = GNUNET_strdup (msg);
meta = GNUNET_meta_data_create ();
GNUNET_meta_data_insert (meta, EXTRACTOR_TITLE, nickname);
room = GNUNET_CHAT_join_room (ectx,
@@ -290,180 +290,160 @@
&member_list_callback, NULL,
&confirmation_callback, NULL, &me);
my_name = GNUNET_pseudonym_id_to_name (ectx, cfg, &me);
- fprintf (stdout,
- _("Changed username to `%s'.\n"),
- my_name);
- GNUNET_free(my_name);
+ fprintf (stdout, _("Changed username to `%s'.\n"), my_name);
+ GNUNET_free (my_name);
return GNUNET_OK;
}
-static int do_unknown(const char * msg,
- const void * xtra) {
- fprintf (stderr, _("Unknown command `%s'.\n"),
- msg);
+static int
+do_unknown (const char *msg, const void *xtra)
+{
+ fprintf (stderr, _("Unknown command `%s'.\n"), msg);
return GNUNET_OK;
}
-static int do_pm(const char * msg,
- const void * xtra) {
- char * user;
+static int
+do_pm (const char *msg, const void *xtra)
+{
+ char *user;
GNUNET_HashCode uid;
GNUNET_HashCode pid;
unsigned int seq;
- struct UserList * pos;
+ struct UserList *pos;
- if (NULL == strstr(msg, " "))
+ if (NULL == strstr (msg, " "))
{
- fprintf(stderr,
- _("Syntax: /msg USERNAME MESSAGE"));
+ fprintf (stderr, _("Syntax: /msg USERNAME MESSAGE"));
return GNUNET_OK;
}
- user = GNUNET_strdup(msg);
- strstr(user, " ")[0] = '\0';
- msg += strlen(user) + 1;
- if (GNUNET_OK !=
- GNUNET_pseudonym_name_to_id(ectx,
- cfg,
- user,
- &uid))
+ user = GNUNET_strdup (msg);
+ strstr (user, " ")[0] = '\0';
+ msg += strlen (user) + 1;
+ if (GNUNET_OK != GNUNET_pseudonym_name_to_id (ectx, cfg, user, &uid))
{
- fprintf(stderr,
- _("Unknown user `%s'\n"),
- user);
- GNUNET_free(user);
+ fprintf (stderr, _("Unknown user `%s'\n"), user);
+ GNUNET_free (user);
return GNUNET_OK;
}
- GNUNET_mutex_lock(lock);
+ GNUNET_mutex_lock (lock);
pos = users;
while (pos != NULL)
{
- GNUNET_hash(&pos->pkey,
- sizeof(GNUNET_RSA_PublicKey),
- &pid);
- if (0 == memcmp(&pid,
- &uid,
- sizeof(GNUNET_HashCode)))
- break;
+ GNUNET_hash (&pos->pkey, sizeof (GNUNET_RSA_PublicKey), &pid);
+ if (0 == memcmp (&pid, &uid, sizeof (GNUNET_HashCode)))
+ break;
pos = pos->next;
}
if (pos == NULL)
{
- fprintf(stderr,
- _("User `%s' is currently not in the room!\n"),
- user);
- GNUNET_free(user);
- GNUNET_mutex_unlock(lock);
+ fprintf (stderr, _("User `%s' is currently not in the room!\n"), user);
+ GNUNET_free (user);
+ GNUNET_mutex_unlock (lock);
return GNUNET_OK;
- }
+ }
if (GNUNET_OK != GNUNET_CHAT_send_message (room,
- msg,
- GNUNET_CHAT_MSG_PRIVATE,
- &pos->pkey,
- &seq))
+ msg,
+ GNUNET_CHAT_MSG_PRIVATE,
+ &pos->pkey, &seq))
fprintf (stderr, _("Failed to send message.\n"));
- GNUNET_mutex_unlock(lock);
+ GNUNET_mutex_unlock (lock);
return GNUNET_OK;
}
-static int do_names(const char * msg,
- const void * xtra) {
- char * name;
- struct UserList * pos;
+static int
+do_names (const char *msg, const void *xtra)
+{
+ char *name;
+ struct UserList *pos;
GNUNET_HashCode pid;
- GNUNET_mutex_lock(lock);
- fprintf(stdout,
- _("Users in room `%s': "),
- room_name);
+ GNUNET_mutex_lock (lock);
+ fprintf (stdout, _("Users in room `%s': "), room_name);
pos = users;
while (pos != NULL)
{
- GNUNET_hash(&pos->pkey,
- sizeof(GNUNET_RSA_PublicKey),
- &pid);
- name = GNUNET_pseudonym_id_to_name(ectx, cfg, &pid);
- fprintf(stdout, "`%s' ", name);
- GNUNET_free(name);
+ GNUNET_hash (&pos->pkey, sizeof (GNUNET_RSA_PublicKey), &pid);
+ name = GNUNET_pseudonym_id_to_name (ectx, cfg, &pid);
+ fprintf (stdout, "`%s' ", name);
+ GNUNET_free (name);
pos = pos->next;
}
- fprintf(stdout, "\n");
- GNUNET_mutex_unlock(lock);
+ fprintf (stdout, "\n");
+ GNUNET_mutex_unlock (lock);
return GNUNET_OK;
}
-static int do_quit(const char * args,
- const void * xtra) {
+static int
+do_quit (const char *args, const void *xtra)
+{
return GNUNET_SYSERR;
}
-static int do_help(const char * args,
- const void * xtra);
+static int do_help (const char *args, const void *xtra);
/**
* List of supported IRC commands. The order matters!
*/
static struct ChatCommand commands[] = {
- { "/join ", &do_join,
- gettext_noop("Use `/join #roomname' to join a chat room. Joining a room
will cause you to leave the current room") },
- { "/nick ", &do_nick,
- gettext_noop("Use `/nick nickname' to change your nickname. This will
cause you to leave the current room and immediately rejoin it with the new
name.") },
- { "/msg ", &do_pm,
- gettext_noop("Use `/msg nickname message' to send a private message to the
specified user") },
- { "/notice ", &do_pm,
- gettext_noop("The `/notice' command is an alias for `/msg'") },
- { "/query ", &do_pm,
- gettext_noop("The `/query' command is an alias for `/msg'") },
- { "/quit", &do_quit,
- gettext_noop("Use `/quit' to terminate gnunet-chat") },
- { "/leave", &do_quit,
- gettext_noop("The `/leave' command is an alias for `/quit'") },
- { "/names", &do_names,
- gettext_noop("Use `/names' to list all of the current members in the chat
room") },
- { "/help", &do_help,
- gettext_noop("Use `/help command' to get help for a specific command") },
+ {"/join ", &do_join,
+ gettext_noop
+ ("Use `/join #roomname' to join a chat room. Joining a room will cause you
to leave the current room")},
+ {"/nick ", &do_nick,
+ gettext_noop
+ ("Use `/nick nickname' to change your nickname. This will cause you to
leave the current room and immediately rejoin it with the new name.")},
+ {"/msg ", &do_pm,
+ gettext_noop
+ ("Use `/msg nickname message' to send a private message to the specified
user")},
+ {"/notice ", &do_pm,
+ gettext_noop ("The `/notice' command is an alias for `/msg'")},
+ {"/query ", &do_pm,
+ gettext_noop ("The `/query' command is an alias for `/msg'")},
+ {"/quit", &do_quit,
+ gettext_noop ("Use `/quit' to terminate gnunet-chat")},
+ {"/leave", &do_quit,
+ gettext_noop ("The `/leave' command is an alias for `/quit'")},
+ {"/names", &do_names,
+ gettext_noop
+ ("Use `/names' to list all of the current members in the chat room")},
+ {"/help", &do_help,
+ gettext_noop ("Use `/help command' to get help for a specific command")},
/* Add standard commands:
/help (print help texts),
/whois (print metadata),
- /ignore (set flag, check on receive!)*/
+ /ignore (set flag, check on receive!) */
/* Add special commands (currently supported):
+ anonymous msgs
+ authenticated msgs
- */
+ */
/* the following three commands must be last! */
- { "/", &do_unknown, NULL },
- { "", &do_transmit, NULL },
- { NULL, NULL, NULL },
+ {"/", &do_unknown, NULL},
+ {"", &do_transmit, NULL},
+ {NULL, NULL, NULL},
};
-static int do_help(const char * args,
- const void * xtra) {
+static int
+do_help (const char *args, const void *xtra)
+{
int i;
i = 0;
while (commands[i].Action != &do_help)
{
- if (0 == strcasecmp(xtra,
- commands[i].command))
- {
- fprintf(stdout,
- "%s\n",
- gettext(commands[i].helptext));
- return GNUNET_OK;
- }
+ if (0 == strcasecmp (xtra, commands[i].command))
+ {
+ fprintf (stdout, "%s\n", gettext (commands[i].helptext));
+ return GNUNET_OK;
+ }
i++;
}
i = 0;
- fprintf(stdout, "Available commands:");
+ fprintf (stdout, "Available commands:");
while (commands[i].Action != &do_help)
{
- fprintf(stdout,
- " %s",
- gettext(commands[i].command));
+ fprintf (stdout, " %s", gettext (commands[i].command));
i++;
}
- fprintf(stdout, "\n");
- fprintf(stdout,
- "%s\n",
- gettext(commands[i].helptext));
+ fprintf (stdout, "\n");
+ fprintf (stdout, "%s\n", gettext (commands[i].helptext));
return GNUNET_OK;
}
@@ -514,11 +494,11 @@
GNUNET_fini (ectx, cfg);
return -1;
}
- lock = GNUNET_mutex_create(GNUNET_NO);
+ lock = GNUNET_mutex_create (GNUNET_NO);
if (room_name == NULL)
- room_name = GNUNET_strdup("gnunet");
+ room_name = GNUNET_strdup ("gnunet");
meta = GNUNET_meta_data_create ();
- GNUNET_meta_data_insert (meta, EXTRACTOR_TITLE, nickname);
+ GNUNET_meta_data_insert (meta, EXTRACTOR_TITLE, nickname);
room = GNUNET_CHAT_join_room (ectx,
cfg,
nickname,
@@ -534,15 +514,12 @@
GNUNET_free (room_name);
GNUNET_free (nickname);
GNUNET_meta_data_destroy (meta);
- GNUNET_mutex_destroy(lock);
+ GNUNET_mutex_destroy (lock);
GNUNET_fini (ectx, cfg);
return -1;
}
my_name = GNUNET_pseudonym_id_to_name (ectx, cfg, &me);
- fprintf (stdout,
- _
- ("Joined room `%s' as user `%s'.\n"),
- room_name, my_name);
+ fprintf (stdout, _("Joined room `%s' as user `%s'.\n"), room_name, my_name);
GNUNET_free (my_name);
/* read messages from command line and send */
while (GNUNET_shutdown_test () == GNUNET_NO)
@@ -550,30 +527,28 @@
memset (message, 0, MAX_MESSAGE_LENGTH + 1);
if (NULL == fgets (message, MAX_MESSAGE_LENGTH, stdin))
break;
- if (strlen(message) == 0)
- continue;
+ if (strlen (message) == 0)
+ continue;
if (message[strlen (message) - 1] == '\n')
message[strlen (message) - 1] = '\0';
- if (strlen(message) == 0)
- continue;
+ if (strlen (message) == 0)
+ continue;
i = 0;
- while ( (commands[i].command != NULL) &&
- (0 != strncasecmp(commands[i].command,
- message,
- strlen(commands[i].command))) )
- i++;
- if (GNUNET_OK !=
- commands[i].Action(&message[strlen(commands[i].command)],
- NULL))
- break;
+ while ((commands[i].command != NULL) &&
+ (0 != strncasecmp (commands[i].command,
+ message, strlen (commands[i].command))))
+ i++;
+ if (GNUNET_OK !=
+ commands[i].Action (&message[strlen (commands[i].command)], NULL))
+ break;
}
- GNUNET_CHAT_leave_room (room);
- free_user_list();
+ GNUNET_CHAT_leave_room (room);
+ free_user_list ();
GNUNET_meta_data_destroy (meta);
GNUNET_free (room_name);
GNUNET_free (nickname);
GNUNET_fini (ectx, cfg);
- GNUNET_mutex_destroy(lock);
+ GNUNET_mutex_destroy (lock);
return 0;
}
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/datastore/datastore.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -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/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/collection/collection.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -318,12 +318,11 @@
/* write collection data */
mlen =
- GNUNET_meta_data_get_serialized_size (collectionData->meta,
- GNUNET_NO);
+ GNUNET_meta_data_get_serialized_size (collectionData->meta, GNUNET_NO);
buf = GNUNET_malloc (mlen);
if (mlen != GNUNET_meta_data_serialize (ectx,
- collectionData->meta, buf,
- mlen, GNUNET_NO))
+ collectionData->meta, buf,
+ mlen, GNUNET_NO))
{
GNUNET_GE_BREAK (ectx, 0);
GNUNET_free (buf);
@@ -353,13 +352,12 @@
for (i = 0; i < collectionData->file_count; i++)
{
mlen =
- GNUNET_meta_data_get_serialized_size (collectionData->files[i].
- meta, GNUNET_NO);
+ GNUNET_meta_data_get_serialized_size (collectionData->files[i].meta,
+ GNUNET_NO);
buf = GNUNET_malloc (mlen);
if (mlen != GNUNET_meta_data_serialize (ectx,
- collectionData->files[i].
- meta, buf, mlen,
- GNUNET_NO))
+ collectionData->files[i].meta,
+ buf, mlen, GNUNET_NO))
{
GNUNET_GE_BREAK (ectx, 0);
GNUNET_free (buf);
@@ -577,12 +575,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 +591,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 +609,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/directory.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directory.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/directory.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -76,9 +76,9 @@
if (mdSize > len - 8 - sizeof (unsigned int))
return GNUNET_SYSERR; /* invalid size */
*md = GNUNET_meta_data_deserialize (ectx,
- &data[8 +
- sizeof (unsigned int)],
- mdSize);
+ &data[8 +
+ sizeof (unsigned int)],
+ mdSize);
if (*md == NULL)
{
GNUNET_GE_BREAK (ectx, 0);
@@ -293,9 +293,7 @@
}
ucs = GNUNET_malloc (sizeof (char *) * count);
size = 8 + sizeof (unsigned int);
- size +=
- GNUNET_meta_data_get_serialized_size (meta,
- GNUNET_SERIALIZE_FULL);
+ size += GNUNET_meta_data_get_serialized_size (meta, GNUNET_SERIALIZE_FULL);
sizes = GNUNET_malloc (count * sizeof (unsigned long long));
perm = GNUNET_malloc (count * sizeof (int));
for (i = 0; i < count; i++)
@@ -305,7 +303,7 @@
GNUNET_GE_ASSERT (ectx, ucs[i] != NULL);
psize =
GNUNET_meta_data_get_serialized_size (fis[i].meta,
- GNUNET_SERIALIZE_FULL);
+ GNUNET_SERIALIZE_FULL);
if (psize == -1)
{
GNUNET_GE_BREAK (ectx, 0);
@@ -336,11 +334,11 @@
memcpy (*data, GNUNET_DIRECTORY_MAGIC, 8);
ret = GNUNET_meta_data_serialize (ectx,
- meta,
- &(*data)[pos +
- sizeof (unsigned int)],
- size - pos - sizeof (unsigned int),
- GNUNET_SERIALIZE_FULL);
+ meta,
+ &(*data)[pos +
+ sizeof (unsigned int)],
+ size - pos - sizeof (unsigned int),
+ GNUNET_SERIALIZE_FULL);
GNUNET_GE_ASSERT (ectx, ret != GNUNET_SYSERR);
ret = htonl (ret);
memcpy (&(*data)[pos], &ret, sizeof (unsigned int));
@@ -357,12 +355,12 @@
pos += strlen (ucs[i]) + 1;
GNUNET_free (ucs[i]);
ret = GNUNET_meta_data_serialize (ectx,
- fis[i].meta,
- &(*data)[pos +
- sizeof (unsigned int)],
- size - pos -
- sizeof (unsigned int),
- GNUNET_SERIALIZE_FULL);
+ fis[i].meta,
+ &(*data)[pos +
+ sizeof (unsigned int)],
+ size - pos -
+ sizeof (unsigned int),
+ GNUNET_SERIALIZE_FULL);
GNUNET_GE_ASSERT (ectx, ret != GNUNET_SYSERR);
ret = htonl (ret);
memcpy (&(*data)[pos], &ret, sizeof (unsigned int));
Modified: GNUnet/src/applications/fs/ecrs/directorytest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/directorytest.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/ecrs/directorytest.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -49,7 +49,7 @@
for (i = 0; i < p->max; i++)
{
if (GNUNET_meta_data_test_equal (p->fi[i].meta,
- fi->meta) &&
+ fi->meta) &&
GNUNET_ECRS_uri_test_equal (p->fi[i].uri, fi->uri))
{
p->pos++;
@@ -84,9 +84,9 @@
{
GNUNET_snprintf (txt, 128, "%u -- %u\n", p, q);
GNUNET_meta_data_insert (fis[p].meta,
- q %
- EXTRACTOR_getHighestKeywordTypeNumber
- (), txt);
+ q %
+ EXTRACTOR_getHighestKeywordTypeNumber
+ (), txt);
}
GNUNET_snprintf (uri,
512,
Modified: GNUnet/src/applications/fs/ecrs/helper.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/helper.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/helper.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -406,19 +406,19 @@
* Checks if the mime-type is that of a GNUnet directory.
*/
int
-GNUNET_meta_data_test_for_directory (const struct GNUNET_MetaData * md)
+GNUNET_meta_data_test_for_directory (const struct GNUNET_MetaData *md)
{
- char * mime;
+ char *mime;
int ret;
- mime = GNUNET_meta_data_get_by_type(md, EXTRACTOR_MIMETYPE);
+ mime = GNUNET_meta_data_get_by_type (md, EXTRACTOR_MIMETYPE);
if (mime == NULL)
return GNUNET_SYSERR;
if (0 == strcmp (mime, GNUNET_DIRECTORY_MIME))
ret = GNUNET_YES;
else
ret = GNUNET_NO;
- GNUNET_free(mime);
+ GNUNET_free (mime);
return ret;
}
Modified: GNUnet/src/applications/fs/ecrs/keyspace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/keyspace.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/keyspace.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -87,8 +87,7 @@
dstURI = (const char *) &kb[1];
j++;
fi.meta = GNUNET_meta_data_deserialize (ectx,
- &((const char *) kb)[j],
- size - j);
+ &((const char *) kb)[j], size - j);
if (fi.meta == NULL)
{
GNUNET_GE_BREAK (ectx, 0); /* kblock malformed */
@@ -155,9 +154,7 @@
GNUNET_GE_BREAK (ectx, 0);
return GNUNET_SYSERR;
}
- mdsize =
- GNUNET_meta_data_get_serialized_size (md,
- GNUNET_SERIALIZE_PART);
+ mdsize = GNUNET_meta_data_get_serialized_size (md, GNUNET_SERIALIZE_PART);
dstURI = GNUNET_ECRS_uri_to_string (dst);
size = mdsize + sizeof (GNUNET_EC_KBlock) + strlen (dstURI) + 1;
if (size > MAX_KBLOCK_SIZE)
@@ -169,11 +166,11 @@
memcpy (&kb[1], dstURI, strlen (dstURI) + 1);
mdsize = size - sizeof (GNUNET_EC_KBlock) - strlen (dstURI) - 1;
mdsize = GNUNET_meta_data_serialize (ectx,
- md,
- &((char *)
- &kb[1])[strlen (dstURI) +
- 1], mdsize,
- GNUNET_SERIALIZE_PART);
+ md,
+ &((char *)
+ &kb[1])[strlen (dstURI) +
+ 1], mdsize,
+ GNUNET_SERIALIZE_PART);
if (mdsize == -1)
{
GNUNET_GE_BREAK (ectx, 0);
@@ -192,12 +189,12 @@
GNUNET_GE_ASSERT (ectx,
mdsize ==
GNUNET_meta_data_serialize (ectx,
- md,
- &((char *)
- &kb[1])[strlen
- (dstURI) +
- 1], mdsize,
- GNUNET_SERIALIZE_FULL));
+ md,
+ &((char *)
+ &kb[1])[strlen
+ (dstURI) +
+ 1], mdsize,
+ GNUNET_SERIALIZE_FULL));
}
value->size = htonl (sizeof (GNUNET_DatastoreValue) + size);
value->type = htonl (GNUNET_ECRS_BLOCKTYPE_KEYWORD);
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -196,9 +196,7 @@
GNUNET_free (dst);
/* create advertisements */
- mdsize =
- GNUNET_meta_data_get_serialized_size (meta,
- GNUNET_SERIALIZE_PART);
+ mdsize = GNUNET_meta_data_get_serialized_size (meta, GNUNET_SERIALIZE_PART);
size = mdsize + sizeof (GNUNET_EC_NBlock);
if (size > MAX_NBLOCK_SIZE)
{
@@ -208,10 +206,9 @@
nb->type = htonl (GNUNET_ECRS_BLOCKTYPE_NAMESPACE);
mdsize = size - sizeof (GNUNET_EC_NBlock);
mdsize = GNUNET_meta_data_serialize (ectx,
- meta,
- (char *) &nb[1],
- mdsize,
- GNUNET_SERIALIZE_PART);
+ meta,
+ (char *) &nb[1],
+ mdsize, GNUNET_SERIALIZE_PART);
if (mdsize == -1)
{
GNUNET_GE_BREAK (ectx, 0);
@@ -227,9 +224,9 @@
nb = (GNUNET_EC_NBlock *) & value[1];
nb->type = htonl (GNUNET_ECRS_BLOCKTYPE_NAMESPACE);
GNUNET_meta_data_serialize (ectx,
- meta,
- (char *) &nb[1], mdsize,
- GNUNET_SERIALIZE_FULL);
+ meta,
+ (char *) &nb[1], mdsize,
+ GNUNET_SERIALIZE_FULL);
}
value->size = htonl (sizeof (GNUNET_DatastoreValue) + size);
value->type = htonl (GNUNET_ECRS_BLOCKTYPE_NAMESPACE);
@@ -309,8 +306,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))
@@ -415,9 +412,7 @@
/* THEN: construct GNUNET_EC_SBlock */
dstURI = GNUNET_ECRS_uri_to_string (dstU);
- mdsize =
- GNUNET_meta_data_get_serialized_size (md,
- GNUNET_SERIALIZE_PART);
+ mdsize = GNUNET_meta_data_get_serialized_size (md, GNUNET_SERIALIZE_PART);
size = mdsize + sizeof (GNUNET_EC_SBlock) + strlen (dstURI) + 1;
if (size > MAX_SBLOCK_SIZE)
{
@@ -429,10 +424,9 @@
memcpy (destPos, dstURI, strlen (dstURI) + 1);
mdsize = size - sizeof (GNUNET_EC_SBlock) - strlen (dstURI) - 1;
mdsize = GNUNET_meta_data_serialize (ectx,
- md,
- &destPos[strlen (dstURI) + 1],
- mdsize,
- GNUNET_SERIALIZE_PART);
+ md,
+ &destPos[strlen (dstURI) + 1],
+ mdsize, GNUNET_SERIALIZE_PART);
if (mdsize == -1)
{
GNUNET_GE_BREAK (ectx, 0);
@@ -451,9 +445,9 @@
destPos = (char *) &sb[1];
memcpy (destPos, dstURI, strlen (dstURI) + 1);
GNUNET_meta_data_serialize (ectx,
- md,
- &destPos[strlen (dstURI) + 1],
- mdsize, GNUNET_SERIALIZE_FULL);
+ md,
+ &destPos[strlen (dstURI) + 1],
+ mdsize, GNUNET_SERIALIZE_FULL);
}
value->size = htonl (sizeof (GNUNET_DatastoreValue) + size);
value->type = htonl (GNUNET_ECRS_BLOCKTYPE_SIGNED);
Modified: GNUnet/src/applications/fs/ecrs/parser.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/parser.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/parser.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -141,8 +141,7 @@
(tmp[strlen (typename)] == ':') &&
(0 == strncmp (typename, tmp, strlen (typename))))
{
- GNUNET_meta_data_insert (meta, type,
- &tmp[strlen (typename) + 1]);
+ GNUNET_meta_data_insert (meta, type, &tmp[strlen (typename) + 1]);
GNUNET_free (tmp);
tmp = NULL;
break;
@@ -152,7 +151,7 @@
(0 == strncmp (typename_i18n, tmp, strlen (typename_i18n))))
{
GNUNET_meta_data_insert (meta, type,
- &tmp[strlen (typename_i18n) + 1]);
+ &tmp[strlen (typename_i18n) + 1]);
GNUNET_free (tmp);
tmp = NULL;
break;
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/search.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -274,9 +274,8 @@
int ret;
fi.meta = GNUNET_meta_data_deserialize (ectx,
- (const char *) &nb[1],
- size -
- sizeof (GNUNET_EC_NBlock));
+ (const char *) &nb[1],
+ size - sizeof (GNUNET_EC_NBlock));
if (fi.meta == NULL)
{
GNUNET_GE_BREAK (ectx, 0); /* nblock malformed */
@@ -390,8 +389,8 @@
dstURI = (const char *) &kb[1];
j++;
fi.meta = GNUNET_meta_data_deserialize (ectx,
- &((const char *)
- kb)[j], size - j);
+ &((const char *)
+ kb)[j], size - j);
if (fi.meta == NULL)
{
GNUNET_GE_BREAK (ectx, 0); /* kblock malformed */
@@ -482,10 +481,9 @@
j++;
/* j == strlen(dstURI) + 1 */
fi.meta = GNUNET_meta_data_deserialize (ectx,
- &dstURI[j],
- size - j -
- sizeof
- (GNUNET_EC_SBlock));
+ &dstURI[j],
+ size - j -
+ sizeof (GNUNET_EC_SBlock));
if (fi.meta == NULL)
{
GNUNET_GE_BREAK (ectx, 0); /* sblock malformed */
Modified: GNUnet/src/applications/fs/ecrs/uri.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/uri.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/ecrs/uri.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -903,7 +903,7 @@
GNUNET_strdup (uri->data.ksk.keywords[i]);
}
else
- ret->data.ksk.keywords = NULL; /* just to be sure */
+ ret->data.ksk.keywords = NULL; /* just to be sure */
break;
case loc:
break;
@@ -964,20 +964,17 @@
}
static int
-gather_uri_data(EXTRACTOR_KeywordType type,
- const char * data,
- void * cls)
+gather_uri_data (EXTRACTOR_KeywordType type, const char *data, void *cls)
{
- URI * uri = cls;
- char * nkword;
+ URI *uri = cls;
+ char *nkword;
int j;
for (j = uri->data.ksk.keywordCount - 1; j >= 0; j--)
- if (0 == strcmp (&uri->data.ksk.keywords[j][1],
- data))
+ if (0 == strcmp (&uri->data.ksk.keywords[j][1], data))
return GNUNET_OK;
nkword = GNUNET_malloc (strlen (data) + 2);
- strcpy (nkword, " "); /* not mandatory */
+ strcpy (nkword, " "); /* not mandatory */
strcat (nkword, data);
uri->data.ksk.keywords[uri->data.ksk.keywordCount++] = nkword;
return GNUNET_OK;
@@ -999,14 +996,10 @@
ret->type = ksk;
ret->data.ksk.keywordCount = 0;
ret->data.ksk.keywords = NULL;
- ret->data.ksk.keywords
- = GNUNET_malloc(sizeof(char*) *
- GNUNET_meta_data_get_contents(md,
- NULL,
- NULL));
- GNUNET_meta_data_get_contents(md,
- &gather_uri_data,
- ret);
+ ret->data.ksk.keywords
+ = GNUNET_malloc (sizeof (char *) *
+ GNUNET_meta_data_get_contents (md, NULL, NULL));
+ GNUNET_meta_data_get_contents (md, &gather_uri_data, ret);
return ret;
}
Modified: GNUnet/src/applications/fs/fsui/recursive_download_persistence_test.c
===================================================================
--- GNUnet/src/applications/fs/fsui/recursive_download_persistence_test.c
2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/applications/fs/fsui/recursive_download_persistence_test.c
2008-06-04 05:58:01 UTC (rev 7046)
@@ -342,8 +342,7 @@
kuri =
GNUNET_ECRS_keyword_command_line_to_uri (ectx, 2,
(const char **) keywords);
- GNUNET_meta_data_insert (meta, EXTRACTOR_MIMETYPE,
- GNUNET_DIRECTORY_MIME);
+ GNUNET_meta_data_insert (meta, EXTRACTOR_MIMETYPE, GNUNET_DIRECTORY_MIME);
upload =
GNUNET_FSUI_upload_start (ctx, UPLOAD_PREFIX,
(GNUNET_FSUI_DirectoryScanCallback) &
Modified:
GNUnet/src/applications/fs/fsui/search_linked_download_persistence_test.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search_linked_download_persistence_test.c
2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/applications/fs/fsui/search_linked_download_persistence_test.c
2008-06-04 05:58:01 UTC (rev 7046)
@@ -371,8 +371,7 @@
kuri =
GNUNET_ECRS_keyword_command_line_to_uri (ectx, 2,
(const char **) keywords);
- GNUNET_meta_data_insert (meta, EXTRACTOR_MIMETYPE,
- GNUNET_DIRECTORY_MIME);
+ GNUNET_meta_data_insert (meta, EXTRACTOR_MIMETYPE, GNUNET_DIRECTORY_MIME);
upload =
GNUNET_FSUI_upload_start (ctx, UPLOAD_PREFIX,
(GNUNET_FSUI_DirectoryScanCallback) &
Modified: GNUnet/src/applications/fs/fsui/serialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/serialize.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/fsui/serialize.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -121,18 +121,18 @@
char *buf;
size = GNUNET_meta_data_get_serialized_size (meta,
- GNUNET_SERIALIZE_FULL
- |
- GNUNET_SERIALIZE_NO_COMPRESS);
+ GNUNET_SERIALIZE_FULL
+ |
+ GNUNET_SERIALIZE_NO_COMPRESS);
if (size > 1024 * 1024)
size = 1024 * 1024;
buf = GNUNET_malloc (size);
GNUNET_meta_data_serialize (ectx,
- meta,
- buf,
- size,
- GNUNET_SERIALIZE_PART |
- GNUNET_SERIALIZE_NO_COMPRESS);
+ meta,
+ buf,
+ size,
+ GNUNET_SERIALIZE_PART |
+ GNUNET_SERIALIZE_NO_COMPRESS);
WRITEINT (wb, size);
write_buffered (wb, buf, size);
GNUNET_free (buf);
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/fs/fsui/upload.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -391,11 +391,10 @@
{
if (utc->child == NULL)
GNUNET_meta_data_extract_from_file (utc->shared->ctx->ectx,
- utc->meta, utc->filename,
- utc->shared->extractors);
+ utc->meta, utc->filename,
+ utc->shared->extractors);
while (GNUNET_OK ==
- GNUNET_meta_data_delete (utc->meta, EXTRACTOR_FILENAME,
- NULL));
+ GNUNET_meta_data_delete (utc->meta, EXTRACTOR_FILENAME, NULL));
/* only publish the last part of the path
-- we do not want to publish $HOME or similar
trivially deanonymizing information */
@@ -426,8 +425,7 @@
pfn = GNUNET_malloc (tend - tpos + 1);
pfn[tend - tpos] = '\0';
memcpy (pfn, &utc->filename[tpos + 1], tend - tpos);
- GNUNET_meta_data_insert (utc->meta, EXTRACTOR_RELATION,
- pfn);
+ GNUNET_meta_data_insert (utc->meta, EXTRACTOR_RELATION, pfn);
GNUNET_free (pfn);
}
}
@@ -469,8 +467,7 @@
while (GNUNET_OK ==
GNUNET_meta_data_delete (utc->meta, EXTRACTOR_SPLIT, NULL));
while (GNUNET_OK ==
- GNUNET_meta_data_delete (utc->meta, EXTRACTOR_LOWERCASE,
- NULL));
+ GNUNET_meta_data_delete (utc->meta, EXTRACTOR_LOWERCASE, NULL));
if (utc->shared->global_keywords != NULL)
GNUNET_ECRS_publish_under_keyword (ectx,
utc->shared->ctx->cfg,
@@ -663,8 +660,7 @@
}
utc->meta =
(md ==
- NULL) ? GNUNET_meta_data_create () :
- GNUNET_meta_data_duplicate (md);
+ NULL) ? GNUNET_meta_data_create () : GNUNET_meta_data_duplicate (md);
}
else
{
@@ -680,8 +676,7 @@
}
utc->meta = GNUNET_meta_data_duplicate (md);
GNUNET_meta_data_insert (utc->meta,
- EXTRACTOR_MIMETYPE,
- GNUNET_DIRECTORY_MIME);
+ EXTRACTOR_MIMETYPE, GNUNET_DIRECTORY_MIME);
}
if (keywords != NULL)
utc->keywords = GNUNET_ECRS_uri_duplicate (keywords);
@@ -848,7 +843,7 @@
event.data.UploadAborted.uc.cctx = ul->cctx;
event.data.UploadAborted.uc.ppos = ul->parent;
event.data.UploadAborted.uc.pcctx = ul->parent->cctx;
- ctx->ecb (ctx->ecbClosure, &event);
+ ctx->ecb (ctx->ecbClosure, &event);
}
else
{
@@ -858,35 +853,35 @@
{
GNUNET_FSUI_upload_abort (c);
c = c->next;
- }
+ }
event.type = GNUNET_FSUI_upload_aborted;
event.data.UploadAborted.uc.pos = ul;
event.data.UploadAborted.uc.cctx = ul->cctx;
event.data.UploadAborted.uc.ppos = ul->parent;
event.data.UploadAborted.uc.pcctx = ul->parent->cctx;
- ctx->ecb (ctx->ecbClosure, &event);
+ ctx->ecb (ctx->ecbClosure, &event);
}
- if (! ul->is_directory)
+ if (!ul->is_directory)
{
/* reduce total size of all parents accordingly
- and generate progress events */
+ and generate progress events */
p = ul->parent;
while (p != &ctx->activeUploads)
- {
- p->total -= ul->total;
- event.type = GNUNET_FSUI_upload_progress;
- event.data.UploadProgress.uc.pos = p;
- event.data.UploadProgress.uc.cctx = p->cctx;
- event.data.UploadProgress.uc.ppos = p->parent;
- event.data.UploadProgress.uc.pcctx = p->parent->cctx;
- event.data.UploadProgress.completed = p->completed;
+ {
+ p->total -= ul->total;
+ event.type = GNUNET_FSUI_upload_progress;
+ event.data.UploadProgress.uc.pos = p;
+ event.data.UploadProgress.uc.cctx = p->cctx;
+ event.data.UploadProgress.uc.ppos = p->parent;
+ event.data.UploadProgress.uc.pcctx = p->parent->cctx;
+ event.data.UploadProgress.completed = p->completed;
event.data.UploadProgress.total = p->total;
- /* use "now" for ETA, given that the user is aborting stuff */
- event.data.UploadProgress.eta = GNUNET_get_time();
- event.data.UploadProgress.filename = p->filename;
- ctx->ecb (ctx->ecbClosure, &event);
- p = p->parent;
- }
+ /* use "now" for ETA, given that the user is aborting stuff */
+ event.data.UploadProgress.eta = GNUNET_get_time ();
+ event.data.UploadProgress.filename = p->filename;
+ ctx->ecb (ctx->ecbClosure, &event);
+ p = p->parent;
+ }
}
return GNUNET_OK;
}
Modified: GNUnet/src/applications/fs/namespace/update_info.c
===================================================================
--- GNUnet/src/applications/fs/namespace/update_info.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/namespace/update_info.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -152,8 +152,7 @@
uri = GNUNET_ECRS_uri_to_string (fi->uri);
metaSize =
- GNUNET_meta_data_get_serialized_size (fi->meta,
- GNUNET_SERIALIZE_FULL);
+ GNUNET_meta_data_get_serialized_size (fi->meta, GNUNET_SERIALIZE_FULL);
size = sizeof (struct UpdateData) + metaSize + strlen (uri) + 1;
buf = GNUNET_malloc (size);
buf->nextId = *nextId;
@@ -164,11 +163,11 @@
GNUNET_GE_ASSERT (ectx,
metaSize ==
GNUNET_meta_data_serialize (ectx,
- fi->meta,
- &((char *)
- &buf[1])[strlen (uri) +
- 1], metaSize,
- GNUNET_SERIALIZE_FULL));
+ fi->meta,
+ &((char *)
+ &buf[1])[strlen (uri) +
+ 1], metaSize,
+ GNUNET_SERIALIZE_FULL));
GNUNET_free (uri);
fn = GNUNET_NS_internal_get_data_filename_ (ectx,
cfg,
Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -179,14 +179,14 @@
char *f;
f = GNUNET_meta_data_get_first_by_types (fi->meta,
- EXTRACTOR_FILENAME,
- EXTRACTOR_TITLE,
- EXTRACTOR_ARTIST,
- EXTRACTOR_AUTHOR,
- EXTRACTOR_PUBLISHER,
- EXTRACTOR_CREATOR,
- EXTRACTOR_PRODUCER,
- EXTRACTOR_UNKNOWN, -1);
+ EXTRACTOR_FILENAME,
+ EXTRACTOR_TITLE,
+ EXTRACTOR_ARTIST,
+ EXTRACTOR_AUTHOR,
+ EXTRACTOR_PUBLISHER,
+ EXTRACTOR_CREATOR,
+ EXTRACTOR_PRODUCER,
+ EXTRACTOR_UNKNOWN, -1);
if (f == NULL)
f = GNUNET_strdup (_("no name given"));
fn = GNUNET_malloc (strlen (filename) + strlen (f) + 4);
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -451,7 +451,7 @@
{
if ((GNUNET_OK !=
GNUNET_pseudonym_name_to_id (ectx, cfg,
- pseudonym, &pid)) ||
+ pseudonym, &pid)) ||
(GNUNET_OK != GNUNET_ECRS_namespace_test_exists (ectx, cfg, &pid)))
{
printf (_("Could not access namespace `%s' (does not exist?).\n"),
Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -89,7 +89,7 @@
printf ("%s:\n", uri);
filename =
GNUNET_meta_data_get_by_type (event->data.SearchResult.fi.meta,
- EXTRACTOR_FILENAME);
+ EXTRACTOR_FILENAME);
if (filename != NULL)
{
char *dotdot;
Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -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/fs/uritrack/file_info.c
===================================================================
--- GNUnet/src/applications/fs/uritrack/file_info.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/uritrack/file_info.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -185,18 +185,18 @@
if (cpc.present == 1)
return;
size = GNUNET_meta_data_get_serialized_size (fi->meta,
- GNUNET_SERIALIZE_FULL
- |
- GNUNET_SERIALIZE_NO_COMPRESS);
+ GNUNET_SERIALIZE_FULL
+ |
+ GNUNET_SERIALIZE_NO_COMPRESS);
data = GNUNET_malloc (size);
GNUNET_GE_ASSERT (ectx,
size == GNUNET_meta_data_serialize (ectx,
- fi->meta,
- data,
- size,
- GNUNET_SERIALIZE_FULL
- |
-
GNUNET_SERIALIZE_NO_COMPRESS));
+ fi->meta,
+ data,
+ size,
+ GNUNET_SERIALIZE_FULL
+ |
+
GNUNET_SERIALIZE_NO_COMPRESS));
size = htonl (size);
suri = GNUNET_ECRS_uri_to_string (fi->uri);
sem = createIPC (ectx, cfg);
@@ -362,8 +362,7 @@
}
if (need_metadata == GNUNET_YES)
{
- fi.meta =
- GNUNET_meta_data_deserialize (ectx, &result[spos], msize);
+ fi.meta = GNUNET_meta_data_deserialize (ectx, &result[spos], msize);
if (fi.meta == NULL)
{
GNUNET_GE_BREAK (ectx, 0);
Modified: GNUnet/src/applications/fs/uritrack/tracktest.c
===================================================================
--- GNUnet/src/applications/fs/uritrack/tracktest.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/fs/uritrack/tracktest.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -46,7 +46,7 @@
if ((fi1.meta != NULL) &&
(fi1.uri != NULL) &&
(GNUNET_meta_data_test_equal (fi->meta,
- fi1.meta))
+ fi1.meta))
&& (GNUNET_ECRS_uri_test_equal (fi->uri, fi1.uri)))
{
notifications++;
@@ -55,7 +55,7 @@
if ((fi2.meta != NULL) &&
(fi2.uri != NULL) &&
(GNUNET_meta_data_test_equal (fi->meta,
- fi2.meta))
+ fi2.meta))
&& (GNUNET_ECRS_uri_test_equal (fi->uri, fi2.uri)))
{
notifications++;
@@ -71,7 +71,7 @@
if ((fi1.meta != NULL) &&
(fi1.uri != NULL) &&
(GNUNET_meta_data_test_equal (fi->meta,
- fi1.meta))
+ fi1.meta))
&& (GNUNET_ECRS_uri_test_equal (fi->uri, fi1.uri)))
{
GNUNET_ECRS_uri_destroy (fi1.uri);
@@ -83,7 +83,7 @@
if ((fi2.meta != NULL) &&
(fi2.uri != NULL) &&
(GNUNET_meta_data_test_equal (fi->meta,
- fi2.meta))
+ fi2.meta))
&& (GNUNET_ECRS_uri_test_equal (fi->uri, fi2.uri)))
{
GNUNET_ECRS_uri_destroy (fi2.uri);
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2008-06-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -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-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/testing/remote.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -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-04 05:57:24 UTC
(rev 7045)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-06-04 05:58:01 UTC
(rev 7046)
@@ -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-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/applications/testing/testing.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -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/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2008-06-04 05:58:01 UTC (rev
7046)
@@ -95,8 +95,7 @@
* @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
* we have no mime-type information (treat as 'GNUNET_NO')
*/
-int GNUNET_meta_data_test_for_directory (const struct
- GNUNET_MetaData *md);
+int GNUNET_meta_data_test_for_directory (const struct GNUNET_MetaData *md);
/**
* Suggest a better filename for a file (and do the
@@ -317,8 +316,7 @@
* that lists all keywords that can be found in the meta-data).
*/
struct GNUNET_ECRS_URI *GNUNET_meta_data_to_uri (const struct
- GNUNET_MetaData
- *md);
+ GNUNET_MetaData *md);
typedef struct
Modified: GNUnet/src/include/gnunet_fsui_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fsui_lib.h 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/include/gnunet_fsui_lib.h 2008-06-04 05:58:01 UTC (rev
7046)
@@ -974,7 +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_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_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
Modified: GNUnet/src/include/gnunet_util_containers.h
===================================================================
--- GNUnet/src/include/gnunet_util_containers.h 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/include/gnunet_util_containers.h 2008-06-04 05:58:01 UTC (rev
7046)
@@ -183,8 +183,7 @@
* @return GNUNET_OK to continue to iterate, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_MetaDataProcessor) (EXTRACTOR_KeywordType type,
- const char *data,
- void *closure);
+ const char *data, void *closure);
/**
* Create a fresh MetaData token.
@@ -195,8 +194,7 @@
* Duplicate a MetaData token.
*/
struct GNUNET_MetaData *GNUNET_meta_data_duplicate (const struct
- GNUNET_MetaData
- *meta);
+ GNUNET_MetaData *meta);
/**
* Free meta data.
@@ -207,7 +205,7 @@
* Test if two MDs are equal.
*/
int GNUNET_meta_data_test_equal (const struct GNUNET_MetaData *md1,
- const struct GNUNET_MetaData *md2);
+ const struct GNUNET_MetaData *md2);
/**
@@ -215,23 +213,20 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists
*/
int GNUNET_meta_data_insert (struct GNUNET_MetaData *md,
- EXTRACTOR_KeywordType type,
- const char *data);
+ EXTRACTOR_KeywordType type, const char *data);
/**
* Remove an item.
* @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md
*/
int GNUNET_meta_data_delete (struct GNUNET_MetaData *md,
- EXTRACTOR_KeywordType type,
- const char *data);
+ EXTRACTOR_KeywordType type, const char *data);
/**
* Add the current time as the publication date
* to the meta-data.
*/
-void GNUNET_meta_data_add_publication_date (struct GNUNET_MetaData
- *md);
+void GNUNET_meta_data_add_publication_date (struct GNUNET_MetaData *md);
/**
* Iterate over MD entries, excluding thumbnails.
@@ -239,8 +234,8 @@
* @return number of entries
*/
int GNUNET_meta_data_get_contents (const struct GNUNET_MetaData *md,
- GNUNET_MetaDataProcessor
- iterator, void *closure);
+ GNUNET_MetaDataProcessor
+ iterator, void *closure);
/**
* Get the first MD entry of the given type.
@@ -248,7 +243,7 @@
* otherwise client is responsible for freeing the value!
*/
char *GNUNET_meta_data_get_by_type (const struct GNUNET_MetaData
- *md, EXTRACTOR_KeywordType type);
+ *md, EXTRACTOR_KeywordType type);
/**
* Get the first matching MD entry of the given types.
@@ -257,8 +252,7 @@
* otherwise client is responsible for freeing the value!
*/
char *GNUNET_meta_data_get_first_by_types (const struct
- GNUNET_MetaData *md,
- ...);
+ GNUNET_MetaData *md, ...);
/**
* Get a thumbnail from the meta-data (if present).
@@ -268,7 +262,7 @@
* @return number of bytes in thumbnail, 0 if not available
*/
size_t GNUNET_meta_data_get_thumbnail (const struct GNUNET_MetaData
- *md, unsigned char **thumb);
+ *md, unsigned char **thumb);
/**
* Extract meta-data from a file.
@@ -277,10 +271,9 @@
* of meta-data items obtained
*/
int GNUNET_meta_data_extract_from_file (struct GNUNET_GE_Context *ectx,
- struct GNUNET_MetaData *md,
- const char *filename,
- EXTRACTOR_ExtractorList *
- extractors);
+ struct GNUNET_MetaData *md,
+ const char *filename,
+ EXTRACTOR_ExtractorList * extractors);
/* = 0 */
#define GNUNET_SERIALIZE_FULL GNUNET_NO
@@ -304,9 +297,8 @@
* space)
*/
int GNUNET_meta_data_serialize (struct GNUNET_GE_Context *ectx,
- const struct GNUNET_MetaData *md,
- char *target, unsigned int size,
- int part);
+ const struct GNUNET_MetaData *md,
+ char *target, unsigned int size, int part);
/**
* Compute size of the meta-data in
@@ -314,8 +306,8 @@
* @part flags (partial ok, may compress?)
*/
unsigned int GNUNET_meta_data_get_serialized_size (const struct
- GNUNET_MetaData
- *md, int part);
+ GNUNET_MetaData
+ *md, int part);
/**
* Deserialize meta-data. Initializes md.
@@ -324,12 +316,11 @@
* bad format)
*/
struct GNUNET_MetaData *GNUNET_meta_data_deserialize (struct
-
GNUNET_GE_Context
- *ectx,
- const char
- *input,
- unsigned int
- size);
+ GNUNET_GE_Context
+ *ectx,
+ const char
+ *input,
+ unsigned int size);
/**
* Does the meta-data claim that this is a directory?
@@ -338,8 +329,7 @@
* @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
* we have no mime-type information (treat as 'GNUNET_NO')
*/
-int GNUNET_meta_data_test_for_directory (const struct
- GNUNET_MetaData *md);
+int GNUNET_meta_data_test_for_directory (const struct GNUNET_MetaData *md);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: GNUnet/src/include/gnunet_util_pseudonym.h
===================================================================
--- GNUnet/src/include/gnunet_util_pseudonym.h 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/include/gnunet_util_pseudonym.h 2008-06-04 05:58:01 UTC (rev
7046)
@@ -44,11 +44,10 @@
* @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
*/
typedef int (*GNUNET_PseudonymIterator) (void *cls,
- const GNUNET_HashCode *
- pseudonym,
- const struct
- GNUNET_MetaData * md,
- int rating);
+ const GNUNET_HashCode *
+ pseudonym,
+ const struct
+ GNUNET_MetaData * md, int rating);
/**
* Change the ranking of a pseudonym.
@@ -58,8 +57,8 @@
* @return new rating of the namespace
*/
int GNUNET_pseudonym_rank (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pseudonym, int delta);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pseudonym, int delta);
/**
* Add a pseudonym to the set of known pseudonyms.
@@ -67,35 +66,37 @@
* @param pseudonym the pseudonym's identifier
*/
void GNUNET_pseudonym_add (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * pseudo,
- const struct GNUNET_MetaData *meta);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * pseudo,
+ const struct GNUNET_MetaData *meta);
/**
* List all known pseudonyms.
*/
int GNUNET_pseudonym_list_all (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_PseudonymIterator iterator,
- void *closure);
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_PseudonymIterator iterator,
+ void *closure);
/**
* Register callback to be invoked whenever we discover
* a new pseudonym.
*/
-int GNUNET_pseudonym_register_discovery_callback (struct GNUNET_GE_Context
*ectx,
- struct GNUNET_GC_Configuration
- *cfg,
- GNUNET_PseudonymIterator
- iterator, void *closure);
+int GNUNET_pseudonym_register_discovery_callback (struct GNUNET_GE_Context
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg,
+ GNUNET_PseudonymIterator
+ iterator, void *closure);
/**
* Unregister namespace discovery callback.
*/
int
GNUNET_pseudonym_unregister_discovery_callback (GNUNET_PseudonymIterator
- iterator, void *closure);
+ iterator, void *closure);
/**
* Return the unique, human readable name for the given pseudonym.
@@ -103,8 +104,8 @@
* @return NULL on failure (should never happen)
*/
char *GNUNET_pseudonym_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.
@@ -112,8 +113,8 @@
* @return GNUNET_OK on success
*/
int GNUNET_pseudonym_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/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/server/connection.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -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-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/setup/lib/gns.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -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-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/setup/ncurses/mconf.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -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-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/transports/http.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -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/containers/meta.c
===================================================================
--- GNUnet/src/util/containers/meta.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/containers/meta.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -94,7 +94,7 @@
*/
int
GNUNET_meta_data_insert (MetaData * md,
- EXTRACTOR_KeywordType type, const char *data)
+ EXTRACTOR_KeywordType type, const char *data)
{
int idx;
char *p;
@@ -127,7 +127,7 @@
*/
int
GNUNET_meta_data_delete (MetaData * md,
- EXTRACTOR_KeywordType type, const char *data)
+ EXTRACTOR_KeywordType type, const char *data)
{
int idx;
int ret = GNUNET_SYSERR;
@@ -157,8 +157,8 @@
*/
int
GNUNET_meta_data_get_contents (const MetaData * md,
- GNUNET_MetaDataProcessor iterator,
- void *closure)
+ GNUNET_MetaDataProcessor iterator,
+ void *closure)
{
int i;
int sub;
@@ -166,7 +166,7 @@
sub = 0;
for (i = md->itemCount - 1; i >= 0; i--)
{
- if (! EXTRACTOR_isBinaryType(md->items[i].type))
+ if (!EXTRACTOR_isBinaryType (md->items[i].type))
{
if ((iterator != NULL) &&
(GNUNET_OK != iterator (md->items[i].type,
@@ -185,8 +185,7 @@
* @return number of entries
*/
char *
-GNUNET_meta_data_get_by_type (const MetaData * md,
- EXTRACTOR_KeywordType type)
+GNUNET_meta_data_get_by_type (const MetaData * md, EXTRACTOR_KeywordType type)
{
int i;
@@ -278,7 +277,7 @@
*/
size_t
GNUNET_meta_data_get_thumbnail (const struct GNUNET_MetaData * md,
- unsigned char **thumb)
+ unsigned char **thumb)
{
char *encoded;
int ret;
@@ -326,9 +325,9 @@
*/
int
GNUNET_meta_data_extract_from_file (struct GNUNET_GE_Context *ectx,
- MetaData * md,
- const char *filename,
- EXTRACTOR_ExtractorList * extractors)
+ MetaData * md,
+ const char *filename,
+ EXTRACTOR_ExtractorList * extractors)
{
EXTRACTOR_KeywordList *head;
EXTRACTOR_KeywordList *pos;
@@ -461,8 +460,8 @@
*/
int
GNUNET_meta_data_serialize (struct GNUNET_GE_Context *ectx,
- const MetaData * md,
- char *target, unsigned int max, int part)
+ const MetaData * md,
+ char *target, unsigned int max, int part)
{
MetaDataHeader *hdr;
size_t size;
@@ -602,7 +601,7 @@
*/
struct GNUNET_MetaData *
GNUNET_meta_data_deserialize (struct GNUNET_GE_Context *ectx,
- const char *input, unsigned int size)
+ const char *input, unsigned int size)
{
MetaData *md;
const MetaDataHeader *hdr;
@@ -694,7 +693,7 @@
*/
int
GNUNET_meta_data_test_equal (const struct GNUNET_MetaData *md1,
- const struct GNUNET_MetaData *md2)
+ const struct GNUNET_MetaData *md2)
{
int i;
int j;
Modified: GNUnet/src/util/containers/metatest.c
===================================================================
--- GNUnet/src/util/containers/metatest.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/util/containers/metatest.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -39,29 +39,25 @@
unsigned int size;
m = GNUNET_meta_data_create ();
- if (GNUNET_OK !=
- GNUNET_meta_data_insert (m, EXTRACTOR_TITLE, "TestTitle"))
+ if (GNUNET_OK != GNUNET_meta_data_insert (m, EXTRACTOR_TITLE, "TestTitle"))
ABORT (m);
- if (GNUNET_OK !=
- GNUNET_meta_data_insert (m, EXTRACTOR_AUTHOR, "TestTitle"))
+ if (GNUNET_OK != GNUNET_meta_data_insert (m, EXTRACTOR_AUTHOR, "TestTitle"))
ABORT (m);
- if (GNUNET_OK == GNUNET_meta_data_insert (m, EXTRACTOR_TITLE, "TestTitle"))
/* dup! */
+ if (GNUNET_OK == GNUNET_meta_data_insert (m, EXTRACTOR_TITLE, "TestTitle"))
/* dup! */
ABORT (m);
- if (GNUNET_OK == GNUNET_meta_data_insert (m, EXTRACTOR_AUTHOR, "TestTitle"))
/* dup! */
+ if (GNUNET_OK == GNUNET_meta_data_insert (m, EXTRACTOR_AUTHOR, "TestTitle"))
/* dup! */
ABORT (m);
if (2 != GNUNET_meta_data_get_contents (m, NULL, NULL))
ABORT (m);
- if (GNUNET_OK !=
- GNUNET_meta_data_delete (m, EXTRACTOR_AUTHOR, "TestTitle"))
+ if (GNUNET_OK != GNUNET_meta_data_delete (m, EXTRACTOR_AUTHOR, "TestTitle"))
ABORT (m);
- if (GNUNET_OK == GNUNET_meta_data_delete (m, EXTRACTOR_AUTHOR, "TestTitle"))
/* already gone */
+ if (GNUNET_OK == GNUNET_meta_data_delete (m, EXTRACTOR_AUTHOR, "TestTitle"))
/* already gone */
ABORT (m);
if (1 != GNUNET_meta_data_get_contents (m, NULL, NULL))
ABORT (m);
- if (GNUNET_OK !=
- GNUNET_meta_data_delete (m, EXTRACTOR_TITLE, "TestTitle"))
+ if (GNUNET_OK != GNUNET_meta_data_delete (m, EXTRACTOR_TITLE, "TestTitle"))
ABORT (m);
- if (GNUNET_OK == GNUNET_meta_data_delete (m, EXTRACTOR_TITLE, "TestTitle"))
/* already gone */
+ if (GNUNET_OK == GNUNET_meta_data_delete (m, EXTRACTOR_TITLE, "TestTitle"))
/* already gone */
ABORT (m);
if (0 != GNUNET_meta_data_get_contents (m, NULL, NULL))
ABORT (m);
@@ -70,8 +66,7 @@
{
GNUNET_snprintf (val, 256, "%s.%d",
"A teststring that should compress well.", j);
- if (GNUNET_OK !=
- GNUNET_meta_data_insert (m, EXTRACTOR_UNKNOWN, val))
+ if (GNUNET_OK != GNUNET_meta_data_insert (m, EXTRACTOR_UNKNOWN, val))
{
GNUNET_free (val);
ABORT (m);
@@ -81,12 +76,11 @@
if (i != GNUNET_meta_data_get_contents (m, NULL, NULL))
ABORT (m);
- size =
- GNUNET_meta_data_get_serialized_size (m, GNUNET_SERIALIZE_FULL);
+ size = GNUNET_meta_data_get_serialized_size (m, GNUNET_SERIALIZE_FULL);
val = GNUNET_malloc (size);
if (size != GNUNET_meta_data_serialize (NULL,
- m, val, size,
- GNUNET_SERIALIZE_FULL))
+ m, val, size,
+ GNUNET_SERIALIZE_FULL))
{
GNUNET_free (val);
ABORT (m);
@@ -101,8 +95,7 @@
{
GNUNET_snprintf (val, 256, "%s.%d",
"A teststring that should compress well.", j);
- if (GNUNET_OK !=
- GNUNET_meta_data_delete (m, EXTRACTOR_UNKNOWN, val))
+ if (GNUNET_OK != GNUNET_meta_data_delete (m, EXTRACTOR_UNKNOWN, val))
{
GNUNET_free (val);
ABORT (m);
@@ -131,18 +124,15 @@
{
GNUNET_snprintf (txt, 128, "%u -- %u\n", i, q);
GNUNET_meta_data_insert (meta,
- q %
- EXTRACTOR_getHighestKeywordTypeNumber (),
- txt);
+ q %
+ EXTRACTOR_getHighestKeywordTypeNumber (), txt);
}
- size =
- GNUNET_meta_data_get_serialized_size (meta,
- GNUNET_SERIALIZE_FULL);
+ size = GNUNET_meta_data_get_serialized_size (meta, GNUNET_SERIALIZE_FULL);
data = GNUNET_malloc (size * 4);
if (size != GNUNET_meta_data_serialize (NULL,
- meta,
- data, size * 4,
- GNUNET_SERIALIZE_FULL))
+ meta,
+ data, size * 4,
+ GNUNET_SERIALIZE_FULL))
{
GNUNET_free (data);
ABORT (meta);
@@ -160,18 +150,16 @@
unsigned int size;
m = GNUNET_meta_data_create ();
- if (GNUNET_OK !=
- GNUNET_meta_data_insert (m, EXTRACTOR_UNKNOWN, "link"))
+ if (GNUNET_OK != GNUNET_meta_data_insert (m, EXTRACTOR_UNKNOWN, "link"))
ABORT (m);
if (GNUNET_OK !=
GNUNET_meta_data_insert (m, EXTRACTOR_FILENAME, "lib-link.m4"))
ABORT (m);
- size =
- GNUNET_meta_data_get_serialized_size (m, GNUNET_SERIALIZE_FULL);
+ size = GNUNET_meta_data_get_serialized_size (m, GNUNET_SERIALIZE_FULL);
val = GNUNET_malloc (size);
if (size != GNUNET_meta_data_serialize (NULL,
- m, val, size,
- GNUNET_SERIALIZE_FULL))
+ m, val, size,
+ GNUNET_SERIALIZE_FULL))
{
GNUNET_free (val);
ABORT (m);
Modified: GNUnet/src/util/network_client/tcpio.c
===================================================================
--- GNUnet/src/util/network_client/tcpio.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/util/network_client/tcpio.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -291,17 +291,17 @@
while (1)
{
if (addr_families[af_index] == -1)
- return GNUNET_SYSERR;
+ return GNUNET_SYSERR;
soaddr = NULL;
socklen = 0;
if (GNUNET_SYSERR ==
GNUNET_get_ip_from_hostname (sock->ectx, host,
addr_families[af_index], &soaddr,
&socklen))
- {
- ADVANCE();
- continue;
- }
+ {
+ ADVANCE ();
+ continue;
+ }
GNUNET_mutex_lock (sock->destroylock);
if (sock->sock != NULL)
{
@@ -334,8 +334,8 @@
GNUNET_GE_ADMIN | GNUNET_GE_BULK, "socket");
GNUNET_mutex_unlock (sock->destroylock);
GNUNET_free (soaddr);
- ADVANCE();
- continue;
+ ADVANCE ();
+ continue;
}
sock->sock = GNUNET_socket_create (sock->ectx, NULL, osock);
GNUNET_socket_set_blocking (sock->sock, GNUNET_NO);
@@ -350,10 +350,10 @@
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
- if (errno == ECONNREFUSED)
- RETRY(); /* gnunetd may just be restarting */
- else
- ADVANCE();
+ if (errno == ECONNREFUSED)
+ RETRY (); /* gnunetd may just be restarting */
+ else
+ ADVANCE ();
continue;
}
/* we call select() first with a timeout of WAIT_SECONDS to
@@ -368,8 +368,8 @@
timeout.tv_sec = 0;
timeout.tv_usec = DELAY_PER_RETRY * TRIES_PER_AF * 1000;
errno = 0;
- select_start = GNUNET_get_time();
- ret = SELECT (osock + 1, &rset, &wset, &eset, &timeout);
+ select_start = GNUNET_get_time ();
+ ret = SELECT (osock + 1, &rset, &wset, &eset, &timeout);
if (ret == -1)
{
if (errno != EINTR)
@@ -379,15 +379,14 @@
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
- if ( (GNUNET_get_time() - select_start > TRIES_PER_AF *
DELAY_PER_RETRY) ||
- (errno != EINTR) )
- ADVANCE(); /* spend enough time trying here */
- else
- RETRY();
+ if ((GNUNET_get_time () - select_start >
+ TRIES_PER_AF * DELAY_PER_RETRY) || (errno != EINTR))
+ ADVANCE (); /* spend enough time trying here */
+ else
+ RETRY ();
continue;
}
- if ( (FD_ISSET (osock, &eset)) ||
- (! FD_ISSET (osock, &wset) ) )
+ if ((FD_ISSET (osock, &eset)) || (!FD_ISSET (osock, &wset)))
{
GNUNET_GE_LOG (sock->ectx,
GNUNET_GE_WARNING | GNUNET_GE_USER | GNUNET_GE_BULK,
@@ -395,11 +394,12 @@
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
- if (GNUNET_get_time() - select_start > TRIES_PER_AF * DELAY_PER_RETRY)
- ADVANCE(); /* spend enough time trying here */
- else
- RETRY();
- continue;
+ if (GNUNET_get_time () - select_start >
+ TRIES_PER_AF * DELAY_PER_RETRY)
+ ADVANCE (); /* spend enough time trying here */
+ else
+ RETRY ();
+ continue;
}
soerr = 0;
soerrlen = sizeof (soerr);
@@ -418,10 +418,11 @@
GNUNET_socket_destroy (sock->sock);
sock->sock = NULL;
GNUNET_mutex_unlock (sock->destroylock);
- if (GNUNET_get_time() - select_start > TRIES_PER_AF * DELAY_PER_RETRY)
- ADVANCE(); /* spend enough time trying here */
- else
- RETRY();
+ if (GNUNET_get_time () - select_start >
+ TRIES_PER_AF * DELAY_PER_RETRY)
+ ADVANCE (); /* spend enough time trying here */
+ else
+ RETRY ();
continue;
}
/* yayh! connected! */
Modified: GNUnet/src/util/pseudonym/common.c
===================================================================
--- GNUnet/src/util/pseudonym/common.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/pseudonym/common.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -35,9 +35,9 @@
*/
char *
GNUNET_pseudonym_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/util/pseudonym/common.h
===================================================================
--- GNUnet/src/util/pseudonym/common.h 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/pseudonym/common.h 2008-06-04 05:58:01 UTC (rev 7046)
@@ -41,11 +41,11 @@
* @param psid maybe NULL
*/
char *GNUNET_pseudonym_internal_get_data_filename_ (struct GNUNET_GE_Context
- *ectx,
- struct
- GNUNET_GC_Configuration
*cfg,
- const char *prefix,
- const GNUNET_HashCode *
- psid);
+ *ectx,
+ struct
+ GNUNET_GC_Configuration
+ *cfg, const char *prefix,
+ const GNUNET_HashCode *
+ psid);
#endif
Modified: GNUnet/src/util/pseudonym/info.c
===================================================================
--- GNUnet/src/util/pseudonym/info.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/pseudonym/info.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -46,10 +46,9 @@
char *fn;
fn = GNUNET_pseudonym_internal_get_data_filename_ (ectx,
- cfg, PS_METADATA_DIR,
nsid);
- size =
- GNUNET_meta_data_get_serialized_size (meta,
- GNUNET_SERIALIZE_FULL);
+ cfg, PS_METADATA_DIR,
+ nsid);
+ size = GNUNET_meta_data_get_serialized_size (meta, GNUNET_SERIALIZE_FULL);
tag = size + sizeof (int) + 1;
off = 0;
if (ns_name != NULL)
@@ -69,12 +68,12 @@
}
GNUNET_GE_ASSERT (ectx,
size == GNUNET_meta_data_serialize (ectx,
- meta,
- &buf[sizeof
- (int) +
- off + 1],
- size,
- GNUNET_SERIALIZE_FULL));
+ meta,
+ &buf[sizeof
+ (int) +
+ off + 1],
+ size,
+
GNUNET_SERIALIZE_FULL));
GNUNET_disk_file_write (ectx, fn, buf, tag, "660");
GNUNET_free (fn);
GNUNET_free (buf);
@@ -84,10 +83,10 @@
int
GNUNET_pseudonym_internal_read_info_ (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid,
- struct GNUNET_MetaData **meta,
- int *ranking, char **ns_name)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid,
+ struct GNUNET_MetaData **meta,
+ int *ranking, char **ns_name)
{
unsigned long long len;
unsigned int size;
@@ -100,10 +99,10 @@
if (ns_name != NULL)
*ns_name = NULL;
fn = GNUNET_pseudonym_internal_get_data_filename_ (ectx,
- 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))))
+ 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))))
{
GNUNET_free (fn);
return GNUNET_SYSERR;
@@ -188,7 +187,7 @@
return GNUNET_OK; /* invalid name */
if (GNUNET_OK !=
GNUNET_pseudonym_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);
@@ -201,9 +200,8 @@
*/
int
GNUNET_pseudonym_list_all (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_PseudonymIterator iterator,
- void *closure)
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_PseudonymIterator iterator, void *closure)
{
struct ListPseudonymClosure cls;
char *fn;
@@ -215,7 +213,7 @@
cls.cfg = cfg;
fn =
GNUNET_pseudonym_internal_get_data_filename_ (ectx, cfg, PS_METADATA_DIR,
- NULL);
+ NULL);
GNUNET_disk_directory_create (ectx, fn);
ret = GNUNET_disk_directory_scan (ectx, fn, &list_pseudonym_helper, &cls);
GNUNET_free (fn);
@@ -232,8 +230,8 @@
*/
int
GNUNET_pseudonym_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_MetaData *meta;
int ret;
@@ -243,7 +241,7 @@
name = NULL;
ret =
GNUNET_pseudonym_internal_read_info_ (ectx, cfg, nsid, &meta, &ranking,
- &name);
+ &name);
if (ret == GNUNET_SYSERR)
{
ranking = 0;
@@ -276,9 +274,9 @@
*/
void
GNUNET_pseudonym_add (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * id,
- const struct GNUNET_MetaData *meta)
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * id,
+ const struct GNUNET_MetaData *meta)
{
char *name;
int ranking;
@@ -287,7 +285,7 @@
ranking = 0;
if (GNUNET_OK ==
GNUNET_pseudonym_internal_read_info_ (ectx, cfg, id, &old, &ranking,
- &name))
+ &name))
{
GNUNET_meta_data_get_contents (meta, &merge_meta_helper, old);
write_pseudonym_info (ectx, cfg, id, old, ranking, name);
Modified: GNUnet/src/util/pseudonym/info.h
===================================================================
--- GNUnet/src/util/pseudonym/info.h 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/pseudonym/info.h 2008-06-04 05:58:01 UTC (rev 7046)
@@ -31,9 +31,9 @@
int
GNUNET_pseudonym_internal_read_info_ (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- const GNUNET_HashCode * nsid,
- struct GNUNET_MetaData **meta,
- int *ranking, char **ns_name);
+ struct GNUNET_GC_Configuration *cfg,
+ const GNUNET_HashCode * nsid,
+ struct GNUNET_MetaData **meta,
+ int *ranking, char **ns_name);
#endif
Modified: GNUnet/src/util/pseudonym/names.c
===================================================================
--- GNUnet/src/util/pseudonym/names.c 2008-06-04 05:57:24 UTC (rev 7045)
+++ GNUnet/src/util/pseudonym/names.c 2008-06-04 05:58:01 UTC (rev 7046)
@@ -39,8 +39,8 @@
*/
char *
GNUNET_pseudonym_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_MetaData *meta;
char *name;
@@ -55,19 +55,20 @@
meta = NULL;
name = NULL;
if (GNUNET_OK ==
- GNUNET_pseudonym_internal_read_info_ (ectx, cfg, nsid, &meta, NULL,
&name))
+ GNUNET_pseudonym_internal_read_info_ (ectx, cfg, nsid, &meta, NULL,
+ &name))
{
if ((meta != NULL) && (name == NULL))
name = GNUNET_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);
+ EXTRACTOR_TITLE,
+ EXTRACTOR_FILENAME,
+ EXTRACTOR_DESCRIPTION,
+ EXTRACTOR_SUBJECT,
+ EXTRACTOR_PUBLISHER,
+ EXTRACTOR_AUTHOR,
+ EXTRACTOR_COMMENT,
+ EXTRACTOR_SUMMARY,
+ EXTRACTOR_OWNER, -1);
if (meta != NULL)
{
GNUNET_meta_data_destroy (meta);
@@ -78,7 +79,7 @@
name = GNUNET_strdup (_("no-name"));
GNUNET_hash (name, strlen (name), &nh);
fn = GNUNET_pseudonym_internal_get_data_filename_ (ectx,
- cfg, PS_NAMES_DIR, &nh);
+ cfg, PS_NAMES_DIR, &nh);
len = 0;
GNUNET_disk_file_size (ectx, fn, &len, GNUNET_YES);
fd = GNUNET_disk_file_open (ectx, fn, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR);
@@ -116,8 +117,8 @@
*/
int
GNUNET_pseudonym_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;
@@ -138,7 +139,7 @@
GNUNET_hash (name, strlen (name), &nh);
GNUNET_free (name);
fn = GNUNET_pseudonym_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/util/pseudonym/notification.c
===================================================================
--- GNUnet/src/util/pseudonym/notification.c 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/util/pseudonym/notification.c 2008-06-04 05:58:01 UTC (rev
7046)
@@ -45,8 +45,8 @@
*/
void
GNUNET_pseudonym_internal_notify_ (const GNUNET_HashCode * id,
- const struct GNUNET_MetaData *md,
- int rating)
+ const struct GNUNET_MetaData *md,
+ int rating)
{
struct DiscoveryCallback *pos;
@@ -68,10 +68,10 @@
*/
int
GNUNET_pseudonym_register_discovery_callback (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration
- *cfg,
- GNUNET_PseudonymIterator
- iterator, void *closure)
+ struct GNUNET_GC_Configuration
+ *cfg,
+ GNUNET_PseudonymIterator
+ iterator, void *closure)
{
struct DiscoveryCallback *list;
@@ -91,7 +91,7 @@
*/
int
GNUNET_pseudonym_unregister_discovery_callback (GNUNET_PseudonymIterator
- iterator, void *closure)
+ iterator, void *closure)
{
struct DiscoveryCallback *prev;
struct DiscoveryCallback *pos;
Modified: GNUnet/src/util/pseudonym/notification.h
===================================================================
--- GNUnet/src/util/pseudonym/notification.h 2008-06-04 05:57:24 UTC (rev
7045)
+++ GNUnet/src/util/pseudonym/notification.h 2008-06-04 05:58:01 UTC (rev
7046)
@@ -35,7 +35,7 @@
*/
void
GNUNET_pseudonym_internal_notify_ (const GNUNET_HashCode * id,
- const struct GNUNET_MetaData *md,
- int rating);
+ const struct GNUNET_MetaData *md,
+ int rating);
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7046 - in GNUnet: libltdl src/applications/chat/lib src/applications/chat/tools src/applications/datastore src/applications/fs/collection src/applications/fs/ecrs src/applications/fs/fsui src/applications/fs/namespace src/applications/fs/tools src/applications/fs/uritrack src/applications/sqstore_mysql src/applications/testing src/include src/server src/setup/lib src/setup/ncurses src/transports src/util/containers src/util/network_client src/util/pseudonym,
gnunet <=