[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r21487 - in gnunet/src: arm ats exit fs hostlist integratio
From: |
gnunet |
Subject: |
[GNUnet-SVN] r21487 - in gnunet/src: arm ats exit fs hostlist integration-tests mesh transport util |
Date: |
Tue, 15 May 2012 02:49:27 +0200 |
Author: grothoff
Date: 2012-05-15 02:49:26 +0200 (Tue, 15 May 2012)
New Revision: 21487
Modified:
gnunet/src/arm/gnunet-service-arm.c
gnunet/src/ats/gnunet-service-ats_addresses_mlp.c
gnunet/src/exit/gnunet-daemon-exit.c
gnunet/src/fs/fs_uri.c
gnunet/src/fs/gnunet-download.c
gnunet/src/fs/gnunet-pseudonym.c
gnunet/src/hostlist/hostlist-server.c
gnunet/src/integration-tests/connection_watchdog.c
gnunet/src/mesh/gnunet-service-mesh.c
gnunet/src/mesh/mesh_api.c
gnunet/src/transport/plugin_transport_smtp.c
gnunet/src/transport/plugin_transport_udp.c
gnunet/src/util/common_logging.c
gnunet/src/util/container_slist.c
gnunet/src/util/disk.c
gnunet/src/util/getopt.c
gnunet/src/util/network.c
gnunet/src/util/os_priority.c
gnunet/src/util/program.c
gnunet/src/util/pseudonym.c
gnunet/src/util/server.c
Log:
-help seaspider some more
Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/arm/gnunet-service-arm.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -494,7 +494,7 @@
create_listen_socket (struct sockaddr *sa, socklen_t addr_len,
struct ServiceList *sl)
{
- const static int on = 1;
+ static int on = 1;
struct GNUNET_NETWORK_Handle *sock;
struct ServiceListeningInfo *sli;
Modified: gnunet/src/ats/gnunet-service-ats_addresses_mlp.c
===================================================================
--- gnunet/src/ats/gnunet-service-ats_addresses_mlp.c 2012-05-15 00:49:08 UTC
(rev 21486)
+++ gnunet/src/ats/gnunet-service-ats_addresses_mlp.c 2012-05-15 00:49:26 UTC
(rev 21487)
@@ -1126,7 +1126,7 @@
double D;
double R;
double U;
- long long unsigned int tmp;
+ unsigned long long tmp;
unsigned int b_min;
unsigned int n_min;
struct GNUNET_TIME_Relative i_exec;
Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c 2012-05-15 00:49:08 UTC (rev
21486)
+++ gnunet/src/exit/gnunet-daemon-exit.c 2012-05-15 00:49:26 UTC (rev
21487)
@@ -284,7 +284,7 @@
/**
* If there are at least this many connections, old ones will be removed
*/
-static long long unsigned int max_connections;
+static unsigned long long max_connections;
/**
* This hashmaps saves interesting things about the configured UDP services
Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/fs/fs_uri.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -1377,7 +1377,8 @@
const struct GNUNET_FS_Uri *uri)
{
char *ret;
- char *name, *unique_name;
+ char *name;
+ char *unique_name;
if (uri->type != sks)
return NULL;
Modified: gnunet/src/fs/gnunet-download.c
===================================================================
--- gnunet/src/fs/gnunet-download.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/fs/gnunet-download.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -90,7 +90,8 @@
static void *
progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
{
- char *s, *s2;
+ char *s;
+ char *s2;
char *t;
switch (info->status)
Modified: gnunet/src/fs/gnunet-pseudonym.c
===================================================================
--- gnunet/src/fs/gnunet-pseudonym.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/fs/gnunet-pseudonym.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -109,7 +109,8 @@
const char *name, const char *unique_name,
const struct GNUNET_CONTAINER_MetaData *md, int rating)
{
- char *id, *unique_id;
+ char *id;
+ char *unique_id;
int getinfo_result;
/* While we get a name from the caller, it might be NULL.
Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c 2012-05-15 00:49:08 UTC (rev
21486)
+++ gnunet/src/hostlist/hostlist-server.c 2012-05-15 00:49:26 UTC (rev
21487)
@@ -481,7 +481,7 @@
struct GNUNET_NETWORK_FDSet *wws;
struct GNUNET_NETWORK_FDSet *wes;
int max;
- unsigned MHD_LONG_LONG timeout;
+ MHD_LONG_LONG timeout;
int haveto;
struct GNUNET_TIME_Relative tv;
Modified: gnunet/src/integration-tests/connection_watchdog.c
===================================================================
--- gnunet/src/integration-tests/connection_watchdog.c 2012-05-15 00:49:08 UTC
(rev 21486)
+++ gnunet/src/integration-tests/connection_watchdog.c 2012-05-15 00:49:26 UTC
(rev 21487)
@@ -971,7 +971,7 @@
char *pos;
char *secname;
int counter;
- long long unsigned int port;
+ unsigned long long port;
have_tcp = GNUNET_NO;
have_udp = GNUNET_NO;
Modified: gnunet/src/mesh/gnunet-service-mesh.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh.c 2012-05-15 00:49:08 UTC (rev
21486)
+++ gnunet/src/mesh/gnunet-service-mesh.c 2012-05-15 00:49:26 UTC (rev
21487)
@@ -623,7 +623,7 @@
{
/* FIXME are hashes in multihash map equal on all aquitectures? */
/* FIXME: keep return value of 'put' to possibly cancel!? */
- GNUNET_DHT_put (dht_handle, key, 10U,
+ GNUNET_DHT_put (dht_handle, key, 10,
GNUNET_DHT_RO_RECORD_ROUTE |
GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_BLOCK_TYPE_TEST,
sizeof (struct GNUNET_PeerIdentity),
@@ -692,12 +692,8 @@
(char *) &my_full_id, /* Data itself */
GNUNET_TIME_absolute_get_forever (), /* Data expiration */
GNUNET_TIME_UNIT_FOREVER_REL, /* Retry time */
-#if MESH_DEBUG_DHT
- &mesh_debug, "DHT_put for id completed");
-#else
NULL, /* Continuation */
NULL); /* Continuation closure */
-#endif
announce_id_task =
GNUNET_SCHEDULER_add_delayed (ID_ANNOUNCE_TIME, &announce_id, cls);
}
Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/mesh/mesh_api.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -28,14 +28,6 @@
* - SEND FUNCTIONS
* - API CALL DEFINITIONS
*/
-#ifdef __cplusplus
-extern "C"
-{
-#if 0 /* keep Emacsens' auto-indent happy */
-}
-#endif
-#endif
-
#include "platform.h"
#include "gnunet_common.h"
#include "gnunet_client_lib.h"
@@ -45,14 +37,9 @@
#include "mesh.h"
#include "mesh_protocol.h"
-#define MESH_API_DEBUG GNUNET_YES
-
-#if MESH_API_DEBUG
#define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__)
-#else
-#define LOG(kind,...)
-#endif
+
/******************************************************************************/
/************************ DATA STRUCTURES
****************************/
/******************************************************************************/
@@ -1717,9 +1704,3 @@
}
-#if 0 /* keep Emacsens' auto-indent happy */
-{
-#endif
-#ifdef __cplusplus
-}
-#endif
Modified: gnunet/src/transport/plugin_transport_smtp.c
===================================================================
--- gnunet/src/transport/plugin_transport_smtp.c 2012-05-15 00:49:08 UTC
(rev 21486)
+++ gnunet/src/transport/plugin_transport_smtp.c 2012-05-15 00:49:26 UTC
(rev 21487)
@@ -774,7 +774,7 @@
* frequency limits to SMTP in the future!).
*/
static int
-api_test_would_try (GNUNET_TSession * tsession, const unsigned int size,
+api_test_would_try (GNUNET_TSession * tsession, unsigned int size,
int important)
{
return GNUNET_OK; /* we always try... */
@@ -785,10 +785,8 @@
* returns the smtp transport API.
*/
GNUNET_TransportAPI *
-inittransport_smtp (GNUNET_CoreAPIForTransport * core)
+inittransport_smtp (struct GNUNET_CoreAPIForTransport * core)
{
-
-
unsigned long long mtu;
struct sigaction sa;
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2012-05-15 00:49:08 UTC (rev
21486)
+++ gnunet/src/transport/plugin_transport_udp.c 2012-05-15 00:49:26 UTC (rev
21487)
@@ -1760,8 +1760,6 @@
ssize_t sent;
size_t slen;
struct GNUNET_TIME_Absolute max;
- struct GNUNET_TIME_Absolute ;
-
struct UDPMessageWrapper *udpw = NULL;
if (sock == plugin->sockv4)
@@ -1859,9 +1857,9 @@
* have a valid global IPv6 address assigned
*/
LOG (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
- _("UDP could not message to `%s': `%s'\n, " \
- "Please check your network configuration and disable IPv6 if
your\n" \
- "connection does not have a global IPv6 address"),
+ _("UDP could not message to `%s': `%s'. "
+ "Please check your network configuration and disable IPv6 if your "
+ "connection does not have a global IPv6 address\n"),
GNUNET_a2s (sa, slen),
STRERROR (errno));
}
Modified: gnunet/src/util/common_logging.c
===================================================================
--- gnunet/src/util/common_logging.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/common_logging.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -530,6 +530,8 @@
gnunet_force_log_parsed = GNUNET_YES;
}
#endif
+
+
/**
* Setup logging.
*
@@ -569,17 +571,16 @@
if (NULL == fn)
return GNUNET_SYSERR;
dirwarn = (GNUNET_OK != GNUNET_DISK_directory_create_for_file (fn));
+#if WINDOWS
altlog_fd = OPEN (fn, O_APPEND |
-#if WINDOWS
O_BINARY |
-#endif
O_WRONLY | O_CREAT,
-#if WINDOWS
- _S_IREAD | _S_IWRITE
+ _S_IREAD | _S_IWRITE);
#else
- S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH
+ altlog_fd = OPEN (fn, O_APPEND |
+ O_WRONLY | O_CREAT,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
#endif
- );
if (altlog_fd != -1)
{
int dup_return;
Modified: gnunet/src/util/container_slist.c
===================================================================
--- gnunet/src/util/container_slist.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/container_slist.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -268,6 +268,7 @@
return GNUNET_NO;
}
+typedef int (*Comparator)(const void *, size_t, const void *, size_t);
/**
* Check if a list contains a certain element
@@ -283,7 +284,7 @@
void *
GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l,
const void *buf, size_t len,
- int (*compare)(const void *, const size_t,
const void *, const size_t))
+ Comparator compare)
{
struct GNUNET_CONTAINER_SList_Elem *e;
Modified: gnunet/src/util/disk.c
===================================================================
--- gnunet/src/util/disk.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/disk.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -270,7 +270,8 @@
}
#ifdef MINGW
- LARGE_INTEGER li, new_pos;
+ LARGE_INTEGER li;
+ LARGE_INTEGER new_pos;
BOOL b;
static DWORD t[] = {[GNUNET_DISK_SEEK_SET] = FILE_BEGIN,
Modified: gnunet/src/util/getopt.c
===================================================================
--- gnunet/src/util/getopt.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/getopt.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -202,9 +202,8 @@
getenv ();
static char *
-my_index (str, chr)
- const char *str;
- int chr;
+my_index (const char *str,
+ int chr)
{
while (*str)
{
@@ -294,8 +293,7 @@
#endif
static void
-exchange (argv)
- char **argv;
+exchange (char **argv)
{
int bottom = first_nonopt;
int middle = last_nonopt;
@@ -381,10 +379,9 @@
_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+_getopt_initialize (int argc,
+ char *const *argv,
+ const char *optstring)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
* is the program name); the sequence of previously skipped
Modified: gnunet/src/util/network.c
===================================================================
--- gnunet/src/util/network.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/network.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -508,15 +508,16 @@
error = ioctl (desc->fd, FIONREAD, &pending);
if (error == 0)
+ return (ssize_t) pending;
+ return GNUNET_NO;
#else
u_long pending;
error = ioctlsocket (desc->fd, FIONREAD, &pending);
if (error != SOCKET_ERROR)
+ return (ssize_t) pending;
+ return GNUNET_NO;
#endif
- return pending;
- else
- return GNUNET_NO;
}
@@ -1079,7 +1080,6 @@
const struct GNUNET_TIME_Relative timeout)
{
int nfds = 0;
-
#ifdef MINGW
int handles = 0;
int ex_handles = 0;
@@ -1090,7 +1090,9 @@
int retcode = 0;
DWORD ms_total = 0;
- int nsock = 0, nhandles = 0, nSockEvents = 0;
+ int nsock = 0;
+ int nhandles = 0;
+ int nSockEvents = 0;
static HANDLE hEventRead = 0;
static HANDLE hEventWrite = 0;
@@ -1106,12 +1108,18 @@
DWORD newretcode = 0;
int returnedpos = 0;
- struct GNUNET_CONTAINER_SList *handles_read, *handles_write, *handles_except;
+ struct GNUNET_CONTAINER_SList *handles_read;
+ struct GNUNET_CONTAINER_SList *handles_write;
+ struct GNUNET_CONTAINER_SList *handles_except;
- fd_set aread, awrite, aexcept;
+ fd_set aread;
+ fd_set awrite;
+ fd_set except;
#if DEBUG_NETWORK
- fd_set bread, bwrite, bexcept;
+ fd_set bread;
+ fd_set bwrite;
+ fd_set bexcept;
#endif
/* TODO: Make this growable */
Modified: gnunet/src/util/os_priority.c
===================================================================
--- gnunet/src/util/os_priority.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/os_priority.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -649,10 +649,15 @@
static char *
CreateCustomEnvTable (char **vars)
{
- char *win32_env_table, *ptr, **var_ptr, *result, *result_ptr;
+ char *win32_env_table;
+ char *ptr;
+ char **var_ptr;
+ char *result;
+ char *result_ptr;
size_t tablesize = 0;
size_t items_count = 0;
- size_t n_found = 0, n_var;
+ size_t n_found = 0;
+ size_t n_var;
char *index = NULL;
size_t c;
size_t var_len;
Modified: gnunet/src/util/program.c
===================================================================
--- gnunet/src/util/program.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/program.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -95,10 +95,10 @@
* @param a2 second command line option
*/
static int
-cmd_sorter (__const void *a1, __const void *a2)
+cmd_sorter (const void *a1, const void *a2)
{
- __const struct GNUNET_GETOPT_CommandLineOption *c1 = a1;
- __const struct GNUNET_GETOPT_CommandLineOption *c2 = a2;
+ const struct GNUNET_GETOPT_CommandLineOption *c1 = a1;
+ const struct GNUNET_GETOPT_CommandLineOption *c2 = a2;
if (toupper ((unsigned char) c1->shortName) >
toupper ((unsigned char) c2->shortName))
Modified: gnunet/src/util/pseudonym.c
===================================================================
--- gnunet/src/util/pseudonym.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/pseudonym.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -539,7 +539,8 @@
int32_t rating;
struct GNUNET_CONTAINER_MetaData *meta;
const char *fn;
- char *str, *name_unique;
+ char *str;
+ char *name_unique;
if (strlen (fullname) < sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded))
return GNUNET_OK;
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2012-05-15 00:49:08 UTC (rev 21486)
+++ gnunet/src/util/server.c 2012-05-15 00:49:26 UTC (rev 21487)
@@ -391,7 +391,7 @@
static struct GNUNET_NETWORK_Handle *
open_listen_socket (const struct sockaddr *serverAddr, socklen_t socklen)
{
- const static int on = 1;
+ static int on = 1;
struct GNUNET_NETWORK_Handle *sock;
uint16_t port;
int eno;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r21487 - in gnunet/src: arm ats exit fs hostlist integration-tests mesh transport util,
gnunet <=