[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3530 - in GNUnet/src: applications/advertising application
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3530 - in GNUnet/src: applications/advertising applications/bootstrap_http applications/chat applications/datastore applications/dht/module applications/dht/tools applications/fragmentation applications/fs/collection applications/fs/ecrs applications/fs/fsui applications/fs/lib applications/fs/module applications/fs/namespace applications/fs/tools applications/fs/uritrack applications/gap applications/getoption applications/identity applications/kvstore_sqlite applications/pingpong applications/rpc applications/session applications/sqstore_mysql applications/sqstore_sqlite applications/state applications/stats applications/tbench applications/template applications/testbed applications/topology_default applications/topology_f2f applications/tracekit applications/traffic applications/transport applications/vpn include server setup setup/gtk setup/lib setup/ncurses setup/text transports util/config util/config_impl util/containers util/cron util/crypto util/disk util/error util/getopt util/loggers util/network util/network_client util/os util/string util/threads util/win |
Date: |
Sat, 21 Oct 2006 12:59:57 -0700 (PDT) |
Author: grothoff
Date: 2006-10-21 12:58:30 -0700 (Sat, 21 Oct 2006)
New Revision: 3530
Modified:
GNUnet/src/applications/advertising/advertising.c
GNUnet/src/applications/advertising/bootstrap.c
GNUnet/src/applications/bootstrap_http/http.c
GNUnet/src/applications/chat/chat.c
GNUnet/src/applications/datastore/datastore.c
GNUnet/src/applications/datastore/prefetch.c
GNUnet/src/applications/dht/module/cs.c
GNUnet/src/applications/dht/module/datastore_memory.c
GNUnet/src/applications/dht/module/dht.c
GNUnet/src/applications/dht/tools/dht-join.c
GNUnet/src/applications/dht/tools/dht-query.c
GNUnet/src/applications/dht/tools/dht_api.c
GNUnet/src/applications/dht/tools/dhttest2.c
GNUnet/src/applications/fragmentation/fragmentationtest.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/download.c
GNUnet/src/applications/fs/ecrs/ecrs.c
GNUnet/src/applications/fs/ecrs/ecrstest.c
GNUnet/src/applications/fs/ecrs/helper.c
GNUnet/src/applications/fs/ecrs/keyspace.c
GNUnet/src/applications/fs/ecrs/meta.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/ecrs/namespacetest.c
GNUnet/src/applications/fs/ecrs/parser.c
GNUnet/src/applications/fs/ecrs/search.c
GNUnet/src/applications/fs/ecrs/searchtest.c
GNUnet/src/applications/fs/ecrs/unindex.c
GNUnet/src/applications/fs/ecrs/upload.c
GNUnet/src/applications/fs/fsui/deserialize.c
GNUnet/src/applications/fs/fsui/download.c
GNUnet/src/applications/fs/fsui/downloadtest.c
GNUnet/src/applications/fs/fsui/fsui-loader.c
GNUnet/src/applications/fs/fsui/fsui.c
GNUnet/src/applications/fs/fsui/fsui.h
GNUnet/src/applications/fs/fsui/fsuitest.c
GNUnet/src/applications/fs/fsui/fsuitest2.c
GNUnet/src/applications/fs/fsui/search.c
GNUnet/src/applications/fs/fsui/searchtest.c
GNUnet/src/applications/fs/fsui/serialize.c
GNUnet/src/applications/fs/fsui/unindex.c
GNUnet/src/applications/fs/fsui/upload.c
GNUnet/src/applications/fs/lib/fslib.c
GNUnet/src/applications/fs/lib/fslibtest.c
GNUnet/src/applications/fs/module/anonymity.c
GNUnet/src/applications/fs/module/fs.c
GNUnet/src/applications/fs/module/migration.c
GNUnet/src/applications/fs/module/ondemand.c
GNUnet/src/applications/fs/namespace/namespace_info.c
GNUnet/src/applications/fs/namespace/namespace_infotest.c
GNUnet/src/applications/fs/tools/gnunet-directory.c
GNUnet/src/applications/fs/tools/gnunet-download.c
GNUnet/src/applications/fs/tools/gnunet-insert.c
GNUnet/src/applications/fs/tools/gnunet-pseudonym.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/gap/gap.c
GNUnet/src/applications/gap/gap.h
GNUnet/src/applications/gap/gaptest.c
GNUnet/src/applications/gap/pid_table.c
GNUnet/src/applications/gap/pid_table.h
GNUnet/src/applications/getoption/getoption.c
GNUnet/src/applications/identity/identity.c
GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c
GNUnet/src/applications/kvstore_sqlite/kv_sqlitetest.c
GNUnet/src/applications/pingpong/pingpong.c
GNUnet/src/applications/rpc/parameters.c
GNUnet/src/applications/rpc/parameterstest.c
GNUnet/src/applications/rpc/rpc.c
GNUnet/src/applications/session/connect.c
GNUnet/src/applications/session/sessiontest.c
GNUnet/src/applications/sqstore_mysql/mysql.c
GNUnet/src/applications/sqstore_mysql/mysqltest.c
GNUnet/src/applications/sqstore_sqlite/sqlite.c
GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
GNUnet/src/applications/state/state.c
GNUnet/src/applications/stats/clientapi.c
GNUnet/src/applications/stats/gnunet-stats.c
GNUnet/src/applications/stats/statistics.c
GNUnet/src/applications/tbench/gnunet-tbench.c
GNUnet/src/applications/tbench/tbench.c
GNUnet/src/applications/tbench/tbenchtest.c
GNUnet/src/applications/tbench/tbenchtest_udp.c
GNUnet/src/applications/template/gnunet-template.c
GNUnet/src/applications/template/template.c
GNUnet/src/applications/testbed/testbed.c
GNUnet/src/applications/topology_default/topology.c
GNUnet/src/applications/topology_f2f/topology.c
GNUnet/src/applications/tracekit/gnunet-tracekit.c
GNUnet/src/applications/tracekit/tracekit.c
GNUnet/src/applications/traffic/clientapi.c
GNUnet/src/applications/transport/transport.c
GNUnet/src/applications/vpn/gnunet-vpn.c
GNUnet/src/applications/vpn/vpn.c
GNUnet/src/include/gnunet_blockstore.h
GNUnet/src/include/gnunet_datastore_service.h
GNUnet/src/include/gnunet_ecrs_lib.h
GNUnet/src/include/gnunet_fsui_lib.h
GNUnet/src/include/gnunet_kvstore_service.h
GNUnet/src/include/gnunet_setup_lib.h
GNUnet/src/include/gnunet_state_service.h
GNUnet/src/include/gnunet_transport.h
GNUnet/src/include/gnunet_uritrack_lib.h
GNUnet/src/include/gnunet_util_config.h
GNUnet/src/include/gnunet_util_config_impl.h
GNUnet/src/include/gnunet_util_containers.h
GNUnet/src/include/gnunet_util_disk.h
GNUnet/src/include/gnunet_util_error.h
GNUnet/src/include/gnunet_util_error_loggers.h
GNUnet/src/include/gnunet_util_getopt.h
GNUnet/src/include/gnunet_util_network.h
GNUnet/src/include/gnunet_util_network_client.h
GNUnet/src/include/gnunet_util_os.h
GNUnet/src/include/gnunet_util_string.h
GNUnet/src/include/gnunet_util_threads.h
GNUnet/src/server/connection.c
GNUnet/src/server/core.c
GNUnet/src/server/gnunet-peer-info.c
GNUnet/src/server/gnunet-transport-check.c
GNUnet/src/server/gnunet-update.c
GNUnet/src/server/gnunetd.c
GNUnet/src/server/handler.c
GNUnet/src/server/startup.c
GNUnet/src/server/startup.h
GNUnet/src/server/tcpserver.c
GNUnet/src/server/version.c
GNUnet/src/setup/gnunet-setup.c
GNUnet/src/setup/gnunet-win-tool.c
GNUnet/src/setup/gtk/gconf.c
GNUnet/src/setup/gtk/gconf.h
GNUnet/src/setup/gtk/glade_support.c
GNUnet/src/setup/gtk/glade_support.h
GNUnet/src/setup/gtk/wizard_gtk.c
GNUnet/src/setup/gtk/wizard_gtk.h
GNUnet/src/setup/lib/gns.c
GNUnet/src/setup/lib/tree.c
GNUnet/src/setup/lib/tree.h
GNUnet/src/setup/ncurses/mconf.c
GNUnet/src/setup/ncurses/wizard_curs.c
GNUnet/src/setup/text/conf.c
GNUnet/src/setup/text/conf.h
GNUnet/src/transports/smtp.c
GNUnet/src/transports/tcp.c
GNUnet/src/transports/tcp6.c
GNUnet/src/transports/tcp_helper.c
GNUnet/src/transports/udp.c
GNUnet/src/transports/udp6.c
GNUnet/src/transports/udp_helper.c
GNUnet/src/util/config/config.c
GNUnet/src/util/config_impl/configtest.c
GNUnet/src/util/config_impl/impl.c
GNUnet/src/util/containers/bloomfilter.c
GNUnet/src/util/containers/bloomtest.c
GNUnet/src/util/containers/hashtable.c
GNUnet/src/util/containers/hashtabletest.c
GNUnet/src/util/containers/vector.c
GNUnet/src/util/cron/cron.c
GNUnet/src/util/cron/crontest.c
GNUnet/src/util/cron/timertest.c
GNUnet/src/util/crypto/hashing.c
GNUnet/src/util/crypto/hostkey_gcrypt.c
GNUnet/src/util/crypto/random.c
GNUnet/src/util/crypto/symcipher_gcrypt.c
GNUnet/src/util/disk/storage.c
GNUnet/src/util/disk/storagetest.c
GNUnet/src/util/error/error.c
GNUnet/src/util/getopt/getopt.c
GNUnet/src/util/getopt/printversion.c
GNUnet/src/util/getopt/setoption.c
GNUnet/src/util/loggers/file.c
GNUnet/src/util/loggers/memory.c
GNUnet/src/util/loggers/smtp.c
GNUnet/src/util/network/io.c
GNUnet/src/util/network/network.h
GNUnet/src/util/network/select.c
GNUnet/src/util/network_client/daemon.c
GNUnet/src/util/network_client/tcpio.c
GNUnet/src/util/network_client/tcpiotest.c
GNUnet/src/util/os/console.c
GNUnet/src/util/os/cpustatus.c
GNUnet/src/util/os/daemon.c
GNUnet/src/util/os/daemontest.c
GNUnet/src/util/os/dso.c
GNUnet/src/util/os/installpath.c
GNUnet/src/util/os/osconfig.c
GNUnet/src/util/os/priority.c
GNUnet/src/util/os/semaphore.c
GNUnet/src/util/os/semaphoretest.c
GNUnet/src/util/os/statuscalls.c
GNUnet/src/util/os/statuscallstest.c
GNUnet/src/util/os/user.c
GNUnet/src/util/string/xmalloc.c
GNUnet/src/util/threads/mutex.c
GNUnet/src/util/threads/pthread.c
GNUnet/src/util/threads/semaphore.c
GNUnet/src/util/threads/semaphoretest.c
GNUnet/src/util/win/winproc.c
Log:
removing trailing whitespace
Modified: GNUnet/src/applications/advertising/advertising.c
===================================================================
--- GNUnet/src/applications/advertising/advertising.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/advertising/advertising.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -663,7 +663,7 @@
*/
static int
configurationUpdateCallback(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
Modified: GNUnet/src/applications/advertising/bootstrap.c
===================================================================
--- GNUnet/src/applications/advertising/bootstrap.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/advertising/bootstrap.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -71,7 +71,7 @@
/* select hello by random */
rndidx = weak_randomi(hcq->helosCount);
#if DEBUG_BOOTSTRAP
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"%s chose hello %d of %d\n",
__FUNCTION__,
@@ -98,7 +98,7 @@
load = os_cpu_get_load(coreAPI->ectx,
coreAPI->cfg);
if (load == (unsigned int)-1)
- load = 50;
+ load = 50;
nload = os_network_monitor_get_load(coreAPI->load_monitor,
Upload);
if (nload > load)
@@ -157,7 +157,7 @@
if (-1 != state->read(coreAPI->ectx,
BOOTSTRAP_INFO,
(void**)&data)) {
- /* but not first on this machine */
+ /* but not first on this machine */
lastTest = now;
delta = 2 * cronMINUTES; /* wait 2 minutes */
FREE(data);
@@ -221,7 +221,7 @@
coreAPI = capi;
state = capi->requestService("state");
GE_ASSERT(capi->ectx,
- state != NULL);
+ state != NULL);
bootstrap = capi->requestService("bootstrap");
GE_ASSERT(capi->ectx,
bootstrap != NULL);
Modified: GNUnet/src/applications/bootstrap_http/http.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/http.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/bootstrap_http/http.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -62,7 +62,7 @@
static size_t
downloadHostlistHelper(void * ptr,
size_t size,
- size_t nmemb,
+ size_t nmemb,
void * ctx) {
BootstrapContext * bctx = ctx;
size_t osize;
@@ -73,7 +73,7 @@
if (size * nmemb == 0)
return 0; /* ok, no data */
osize = bctx->bsize;
- total = size * nmemb + osize;
+ total = size * nmemb + osize;
GROW(bctx->buf,
bctx->bsize,
total);
@@ -144,7 +144,7 @@
_("No hostlist URL specified in configuration, will not
bootstrap.\n"));
FREE(url);
return;
- }
+ }
bctx.url = url;
proxy = NULL;
GC_get_configuration_value_string(coreAPI->cfg,
@@ -153,30 +153,30 @@
NULL,
&proxy);
curl = curl_easy_init();
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_WRITEFUNCTION,
&downloadHostlistHelper);
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_WRITEDATA,
&bctx);
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_FAILONERROR,
1);
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_URL,
url);
if (proxy != NULL)
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_PROXY,
proxy);
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_BUFFERSIZE,
1024); /* a bit more than one HELLO */
if (0 == strncmp(url, "http", 4))
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_USERAGENT,
"GNUnet");
- curl_easy_setopt(curl,
+ curl_easy_setopt(curl,
CURLOPT_CONNECTTIMEOUT,
15L);
multi = curl_multi_init();
Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/chat/chat.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -207,7 +207,7 @@
if (SYSERR == capi->registerClientHandler(CS_PROTO_chat_MSG,
&csHandleChatRequest))
ok = SYSERR;
-
+
GE_ASSERT(capi->ectx,
0 == GC_set_configuration_value_string(capi->cfg,
capi->ectx,
Modified: GNUnet/src/applications/datastore/datastore.c
===================================================================
--- GNUnet/src/applications/datastore/datastore.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/datastore/datastore.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -164,7 +164,7 @@
(minPriority > ntohl(value->prio)) ) {
GE_LOG(coreAPI->ectx, GE_WARNING | GE_BULK | GE_USER,
"Datastore full (%llu/%llu) and content priority too low to kick out
other content. Refusing put.\n",
- sq->getSize(),
+ sq->getSize(),
quota);
return SYSERR; /* new content has such a low priority that
we should not even bother! */
@@ -192,7 +192,7 @@
const Datastore_Value * value,
void * cls) {
CE * ce = cls;
-
+
if ( (value->size != ce->value->size) ||
(0 != memcmp(&value[1],
&ce->value[1],
@@ -341,7 +341,7 @@
1024,
&lquota)) {
GE_BREAK(capi->ectx, 0);
- return NULL; /* OOPS */
+ return NULL; /* OOPS */
}
quota
Modified: GNUnet/src/applications/datastore/prefetch.c
===================================================================
--- GNUnet/src/applications/datastore/prefetch.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/datastore/prefetch.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -44,7 +44,7 @@
Datastore_Value * value;
/**
* 0 if we have never used this content with any peer. Otherwise
- * the value is set to the lowest 32 bit of the peer ID (to avoid
+ * the value is set to the lowest 32 bit of the peer ID (to avoid
* sending it to the same peer twice). After sending out the
* content twice, it is discarded.
*/
@@ -82,7 +82,7 @@
static struct GE_Context * ectx;
static struct GC_Configuration * cfg;
-
+
static int aquire(const HashCode512 * key,
const Datastore_Value * value,
@@ -104,7 +104,7 @@
MUTEX_UNLOCK(lock);
return SYSERR;
}
- }
+ }
#if DEBUG_PREFETCH
GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
"Adding content to prefetch buffer (%u)\n",
Modified: GNUnet/src/applications/dht/module/cs.c
===================================================================
--- GNUnet/src/applications/dht/module/cs.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/dht/module/cs.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -522,7 +522,7 @@
putRecordsSize+1);
putRecords[putRecordsSize-1] = ptr;
MUTEX_UNLOCK(csLock);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Starting DHT put\n");
ptr->put_record = dhtAPI->put_start(&req->table,
Modified: GNUnet/src/applications/dht/module/datastore_memory.c
===================================================================
--- GNUnet/src/applications/dht/module/datastore_memory.c 2006-10-21
19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/dht/module/datastore_memory.c 2006-10-21
19:58:30 UTC (rev 3530)
@@ -127,7 +127,7 @@
MUTEX_LOCK(ds->lock);
pos = ds->first;
while (pos != NULL) {
- if (0 == memcmp(key,
+ if (0 == memcmp(key,
&pos->key,
sizeof(HashCode512))) {
if (ds->max_memory < size) {
@@ -191,7 +191,7 @@
prev = NULL;
pos = ds->first;
while (pos != NULL) {
- if (0 == memcmp(key,
+ if (0 == memcmp(key,
&pos->key,
sizeof(HashCode512))) {
if (value != NULL) {
Modified: GNUnet/src/applications/dht/module/dht.c
===================================================================
--- GNUnet/src/applications/dht/module/dht.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/dht/module/dht.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -696,7 +696,7 @@
unsigned int i;
MUTEX_LOCK(lock);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"DHT ROUTING TABLE:\n");
for (i=0;i<bucketCount;i++) {
@@ -1235,7 +1235,7 @@
* We received a reply from a peer that we ping'ed. Update
* the FNC's kbest list and the buckets accordingly.
*/
-static void
+static void
ping_reply_handler(const PeerIdentity * responder,
RPC_Param * results,
void * cls) {
@@ -1597,7 +1597,7 @@
IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(table,
&enc2));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"performing `%s' operation on key `%s' and table `%s'.\n",
"DHT_GET",
@@ -1642,7 +1642,7 @@
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(table,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"I participate in the table `%s' for the `%s' operation.\n",
&enc,
@@ -2059,7 +2059,7 @@
* @param closure extra argument to the callback
* @return context for findKNodes_stop
*/
-static FindKNodesContext *
+static FindKNodesContext *
findKNodes_start(const DHT_TableId * table,
const HashCode512 * key,
cron_t timeout,
@@ -2228,7 +2228,7 @@
* processed by the callback in record. The RPC async handle is to be
* stored in the records rpc list. Locking is not required.
*/
-static int
+static int
send_dht_put_rpc(const PeerIdentity * peer,
void * cls) {
DHT_PUT_RECORD * record = cls;
@@ -2460,8 +2460,8 @@
/* cancel timeout cron job (if still live) */
delAbortJob(&dht_put_async_timeout, record);
cron_del_job(coreAPI->cron,
- &dht_put_async_timeout,
- 0,
+ &dht_put_async_timeout,
+ 0,
record);
/* abort findKNodes (if running) - it may cause
the addition of additional RPCs otherwise! */
@@ -2487,7 +2487,7 @@
*
* @param results::peer created in rpc_DHT_store_abort
*/
-static void
+static void
dht_remove_rpc_reply_callback(const PeerIdentity * responder,
RPC_Param * results,
void * cls) {
@@ -3051,7 +3051,7 @@
}
fw_context
= MALLOC(sizeof(RPC_DHT_FindValue_Context));
- fw_context->lock
+ fw_context->lock
= MUTEX_CREATE(YES);
fw_context->count
= 0;
@@ -3127,10 +3127,10 @@
*/
static void rpc_dht_store_callback(RPC_DHT_store_Context * fw) {
RPC_Param * param;
-
+
cron_del_job(coreAPI->cron,
&rpc_DHT_store_abort,
- 0,
+ 0,
fw);
delAbortJob(&rpc_DHT_store_abort, fw);
param = RPC_paramNew();
@@ -3268,10 +3268,10 @@
*/
static void rpc_dht_remove_callback(RPC_DHT_remove_Context * fw) {
RPC_Param * param;
-
+
cron_del_job(coreAPI->cron,
- &rpc_DHT_store_abort,
- 0,
+ &rpc_DHT_store_abort,
+ 0,
fw);
delAbortJob(&rpc_DHT_store_abort, fw);
param = RPC_paramNew();
Modified: GNUnet/src/applications/dht/tools/dht-join.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-join.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/dht/tools/dht-join.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -52,13 +52,13 @@
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Join a DHT.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
- COMMAND_LINE_OPTION_LOGGING, /* -L */
+ COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 'm', "memory", "SIZE",
gettext_noop("allow SIZE bytes of memory for the local table"),
- 1, &gnunet_getopt_configure_set_uint, &memory },
+ 1, &gnunet_getopt_configure_set_uint, &memory },
{ 't', "table", "NAME",
gettext_noop("join table called NAME"),
- 1, &gnunet_getopt_configure_set_string, &table_id },
+ 1, &gnunet_getopt_configure_set_string, &table_id },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
COMMAND_LINE_OPTION_VERBOSE,
COMMAND_LINE_OPTION_END,
@@ -143,14 +143,14 @@
return ret;
}
-int main(int argc,
+int main(int argc,
const char ** argv) {
int i;
HashCode512 table;
struct GC_Configuration * cfg;
Blockstore myStore;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -192,7 +192,7 @@
cfg,
ectx,
&table)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Error joining DHT.\n"));
destroy_blockstore_memory((Blockstore*)myStore.closure);
@@ -208,17 +208,17 @@
/* shutdown */
if (OK != DHT_LIB_leave(&table)) {
i = SYSERR;
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Error leaving DHT.\n"));
}
-
+
destroy_blockstore_memory((Blockstore*)myStore.closure);
GC_free(cfg);
GE_free_context(ectx);
if (i != OK)
return 1;
- return 0;
+ return 0;
}
/* end of dht-join.c */
Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/dht/tools/dht-query.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -53,13 +53,13 @@
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Query (get KEY, put KEY VALUE, remove
KEY VALUE) a DHT table.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
- COMMAND_LINE_OPTION_LOGGING, /* -L */
+ COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 't', "table", "NAME",
gettext_noop("join table called NAME"),
- 1, &gnunet_getopt_configure_set_string, &table_id },
+ 1, &gnunet_getopt_configure_set_string, &table_id },
{ 'T', "timeout", "TIME",
gettext_noop("allow TIME ms to process each command"),
- 1, &gnunet_getopt_configure_set_uint, &timeout },
+ 1, &gnunet_getopt_configure_set_uint, &timeout },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
COMMAND_LINE_OPTION_VERBOSE,
COMMAND_LINE_OPTION_END,
@@ -85,7 +85,7 @@
hash(key,
strlen(key),
&hc);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Issuing '%s(%s)' command.\n",
"get", key);
@@ -151,7 +151,7 @@
dc->size = htonl(strlen(value)
+ sizeof(DataContainer));
memcpy(&dc[1], value, strlen(value));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Issuing '%s(%s,%s)' command.\n",
"remove", key, value);
@@ -179,7 +179,7 @@
struct ClientServerConnection * handle;
HashCode512 table;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
Modified: GNUnet/src/applications/dht/tools/dht_api.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht_api.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/dht/tools/dht_api.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -98,7 +98,7 @@
* return the status, otherwise SYSERR.
*/
static int checkACK(MESSAGE_HEADER * reply) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"received ACK from gnunetd\n");
if ( (sizeof(CS_dht_reply_ack_MESSAGE) == ntohs(reply->size)) &&
@@ -143,7 +143,7 @@
ntohl(value->size));
if (OK != connection_write(list->sock,
&reply->header)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Failed to send `%s'. Closing connection.\n"),
"CS_dht_reply_results_MESSAGE");
@@ -209,7 +209,7 @@
buffer = NULL;
while (OK == connection_read(list->sock,
&buffer)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Received message of type %d from gnunetd\n",
ntohs(buffer->type));
@@ -316,7 +316,7 @@
&req->key,
value,
ntohl(req->priority)))) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Failed to send `%s'. Closing connection.\n"),
"ACK");
@@ -335,7 +335,7 @@
DataContainer * value;
if (sizeof(CS_dht_request_remove_MESSAGE) > ntohs(buffer->size)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Received invalid `%s' request (size %d)\n"),
"REMOVE",
@@ -374,7 +374,7 @@
list->store->del(list->store->closure,
&req->key,
value))) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Failed to send `%s'. Closing connection.\n"),
"ACK");
@@ -392,7 +392,7 @@
int resCount;
if (sizeof(CS_dht_request_iterate_MESSAGE) != ntohs(buffer->size)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Received invalid `%s' request (size %d)\n"),
"ITERATE",
@@ -410,7 +410,7 @@
if (OK != sendAck(list->sock,
&list->table,
resCount)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Failed to send `%s'. Closing connection.\n"),
"ACK");
@@ -424,7 +424,7 @@
default:
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Received unknown request type %d at %s:%d\n"),
ntohs(buffer->type),
@@ -723,7 +723,7 @@
MESSAGE_HEADER * reply;
int ret;
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"DHT_LIB_put called with value '%.*s'\n",
ntohl(value->size),
@@ -732,7 +732,7 @@
sock = client_connection_create(ectx,
cfg);
if (sock == NULL) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Could not connect to gnunetd\n");
return SYSERR;
@@ -822,14 +822,14 @@
/**
- * Initialize DHT_LIB.
+ * Initialize DHT_LIB.
*/
void __attribute__ ((constructor)) DHT_LIB_init() {
lock = MUTEX_CREATE(NO);
}
/**
- * Shutdown DHT_LIB.
+ * Shutdown DHT_LIB.
*/
void __attribute__ ((destructor)) DHT_LIB_fini() {
MUTEX_DESTROY(lock);
Modified: GNUnet/src/applications/dht/tools/dhttest2.c
===================================================================
--- GNUnet/src/applications/dht/tools/dhttest2.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/dht/tools/dhttest2.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -89,7 +89,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_PEERS
daemon1 = os_daemon_start(NULL,
@@ -178,7 +178,7 @@
}
connection_destroy(sock);
printf("Peers connected. Running actual test.\n");
-
+
memset(&table, 33, sizeof(DHT_TableId));
store = create_blockstore_memory(65536);
@@ -278,7 +278,7 @@
hash("key", 3, &key);
printf("Peer1 gets key\n");
CHECK(1 == DHT_LIB_get(cfg,
- ectx,
+ ectx,
&table,
0,
0,
Modified: GNUnet/src/applications/fragmentation/fragmentationtest.c
===================================================================
--- GNUnet/src/applications/fragmentation/fragmentationtest.c 2006-10-21
19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/fragmentation/fragmentationtest.c 2006-10-21
19:58:30 UTC (rev 3530)
@@ -59,8 +59,8 @@
const unsigned int len,
int wasEncrypted,
TSession * ts) {
- GE_ASSERT(NULL,
- 0 == memcmp(sender,
+ GE_ASSERT(NULL,
+ 0 == memcmp(sender,
&mySender,
sizeof(PeerIdentity)));
myMsg = resultBuffer;
Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/collection/collection.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -247,7 +247,7 @@
fd = mkstemp(tmpName);
if (fd == -1) {
GE_LOG_STRERROR(ectx,
- GE_ERROR | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_BULK,
"mkstemp");
FREE(tmpName);
return;
Modified: GNUnet/src/applications/fs/ecrs/download.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/download.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/download.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -123,7 +123,7 @@
strcat(fn, ".A");
fn[strlen(fn)-1]+=i;
if (0 != UNLINK(fn))
- GE_LOG(this->ectx,
+ GE_LOG(this->ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Could not unlink temporary file `%s': %s\n"),
fn, STRERROR(errno));
@@ -258,7 +258,7 @@
buf,
len);
if (ret != len) {
- GE_LOG(this->ectx,
+ GE_LOG(this->ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Write(%d, %p, %d) failed: %s\n"),
this->handles[level],
@@ -438,9 +438,9 @@
RequestManager * rm;
rm = MALLOC(sizeof(RequestManager));
- rm->ectx
+ rm->ectx
= ectx;
- rm->cfg
+ rm->cfg
= cfg;
rm->requestThread
= PTHREAD_GET_SELF();
@@ -494,7 +494,7 @@
int i;
#if DEBUG_DOWNLOAD
- GE_LOG(rm->ectx,
+ GE_LOG(rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"destroying request manager %p\n",
rm);
@@ -550,7 +550,7 @@
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&node->chk.query,
&enc));
- GE_LOG(rm->ectx,
+ GE_LOG(rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Queuing request (query: %s)\n",
&enc);
@@ -653,7 +653,7 @@
> node->ctx->total)
ret = (unsigned int) (node->ctx->total - node->offset);
#if DEBUG_DOWNLOAD
- GE_LOG(node->ctx->rm->ectx,
+ GE_LOG(node->ctx->rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Node at offset %llu and level %d has size %u\n",
node->offset,
@@ -823,7 +823,7 @@
ret = NO;
FREE(data);
#if DEBUG_DOWNLOAD
- GE_LOG(node->ctx->rm->ectx,
+ GE_LOG(node->ctx->rm->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Checked presence of block at %llu level %u. Result: %s\n",
node->offset,
@@ -850,7 +850,7 @@
unsigned int levelSize;
unsigned long long baseOffset;
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
node->level > 0);
childcount = size / sizeof(CHK);
if (size != childcount * sizeof(CHK)) {
@@ -899,7 +899,7 @@
INITVECTOR iv;
SESSIONKEY skey;
- GE_ASSERT(NULL,
+ GE_ASSERT(NULL,
(data!=NULL) && (hashcode != NULL) && (result != NULL));
/* get key and init value from the hash code */
hashToKey(hashcode,
@@ -933,7 +933,7 @@
#if DEBUG_DOWNLOAD
EncName enc;
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(query,
&enc));
@@ -1006,7 +1006,7 @@
requestManagerEndgame(node->ctx->rm);
}
}
- GE_ASSERT(node->ctx->rm->ectx,
+ GE_ASSERT(node->ctx->rm->ectx,
node->ctx->rm->requestThread != NULL);
PTHREAD_STOP_SLEEP(node->ctx->rm->requestThread);
FREE(data);
@@ -1146,11 +1146,11 @@
if ( (0 == (entry->tries % MAX_TRIES)) &&
(entry->tries > 0) ) {
EncName enc;
- IF_GELOG(rm->ectx,
+ IF_GELOG(rm->ectx,
GE_WARNING | GE_BULK | GE_USER,
hash2enc(&entry->node->chk.key,
&enc));
- GE_LOG(rm->ectx,
+ GE_LOG(rm->ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Content `%s' seems to be not available on the network (tried %u
times).\n"),
&enc,
@@ -1264,11 +1264,11 @@
#endif
if (0 == ECRS_fileSize(uri)) {
ret = disk_file_open(ectx,
- filename,
+ filename,
O_CREAT | O_WRONLY | O_TRUNC,
S_IRUSR|S_IWUSR);
- if (ret == -1)
- return SYSERR;
+ if (ret == -1)
+ return SYSERR;
CLOSE(ret);
dpcb(0, 0, get_time(), 0, NULL, 0, dpcbClosure);
return OK;
@@ -1312,24 +1312,24 @@
if (NO == checkPresent(top))
addRequest(rm, top);
else
- FREE(top);
+ FREE(top);
while ( (OK == tt(ttClosure)) &&
(rm->abortFlag == NO) &&
(rm->requestListIndex != 0) ) {
minSleep = processRequests(rm);
if ( (OK == tt(ttClosure)) &&
(rm->abortFlag == NO) &&
- (rm->requestListIndex != 0) )
+ (rm->requestListIndex != 0) )
PTHREAD_SLEEP(minSleep);
}
-
+
if ( (rm->requestListIndex == 0) &&
(ctx.completed == ctx.total) &&
(rm->abortFlag == NO) ) {
ret = OK;
} else {
#if 0
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
"Download ends prematurely: %d %llu == %llu %d TT: %d\n",
rm->requestListIndex,
@@ -1346,7 +1346,7 @@
else
freeIOC(&ioc, NO); /* aborted */
#if DEBUG_DOWNLOAD
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"`%s' terminating for file `%s' with result %s\n",
__FUNCTION__,
Modified: GNUnet/src/applications/fs/ecrs/ecrs.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrs.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/ecrs.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -38,7 +38,7 @@
hashToKey(hc, &skey, &iv);
tmp = MALLOC(len);
- GE_ASSERT(NULL,
+ GE_ASSERT(NULL,
len ==
encryptBlock(data,
len,
Modified: GNUnet/src/applications/fs/ecrs/ecrstest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/ecrstest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -196,7 +196,7 @@
NULL)) {
fd = disk_file_open(NULL,
- tmpName,
+ tmpName,
O_RDONLY);
buf = MALLOC(size);
in = MALLOC(size);
@@ -265,7 +265,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
daemon = os_daemon_start(NULL,
cfg,
Modified: GNUnet/src/applications/fs/ecrs/helper.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/helper.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/helper.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -62,7 +62,7 @@
if (num_Words == 0) {
FREENONNULL(searchString);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_IMMEDIATE | GE_USER,
_("No keywords specified!\n"));
return NULL;
Modified: GNUnet/src/applications/fs/ecrs/keyspace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/keyspace.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/keyspace.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -244,7 +244,7 @@
if (OK != FS_insert(sock, value))
ret = SYSERR;
#if EXTRA_CHECKS
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
OK == verifyKBlock(ectx,
&key,
value))
Modified: GNUnet/src/applications/fs/ecrs/meta.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/meta.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/meta.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -621,7 +621,7 @@
while ( (pos < dataSize) &&
(i < ic) ) {
len = strlen(&data[pos])+1;
- md->items[i].type = (EXTRACTOR_KeywordType) ntohl(((unsigned
int*)data)[i]);
+ md->items[i].type = (EXTRACTOR_KeywordType) ntohl(((unsigned
int*)data)[i]);
md->items[i].data = STRDUP(&data[pos]);
pos += len;
i++;
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -42,7 +42,7 @@
const char * name) {
char * gnHome;
char * fileName;
-
+
GC_get_configuration_value_string(cfg,
"GNUNET",
"GNUNET_HOME",
@@ -70,7 +70,7 @@
struct GC_Configuration * cfg,
const char * name) {
char * fileName;
-
+
fileName = getPseudonymFileName(ectx, cfg, name);
if (YES != disk_file_test(ectx,
fileName)) {
@@ -80,7 +80,7 @@
if (0 != UNLINK(fileName)) {
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_USER | GE_BULK,
- "unlink",
+ "unlink",
fileName);
FREE(fileName);
return SYSERR;
@@ -346,7 +346,7 @@
FREE(fileName);
hke = (PrivateKeyEncoded*) dst;
if ( ntohs(hke->len) != len ) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Format of pseudonym `%s' is invalid.\n"),
name);
@@ -579,7 +579,7 @@
dst = MALLOC(len);
len = disk_file_read(c->ectx,
fileName,
- len,
+ len,
dst);
hke = (PrivateKeyEncoded*) dst;
if ( ntohs(hke->len) != len ) {
@@ -594,7 +594,7 @@
hk = decodePrivateKey(hke);
FREE(hke);
if (hk == NULL) {
- GE_LOG(c->ectx,
+ GE_LOG(c->ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Format of file `%s' is invalid.\n"),
fileName);
Modified: GNUnet/src/applications/fs/ecrs/namespacetest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/ecrs/namespacetest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -106,7 +106,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
daemon = os_daemon_start(NULL,
cfg,
Modified: GNUnet/src/applications/fs/ecrs/parser.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/parser.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/parser.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -74,7 +74,7 @@
meta = ECRS_createMetaData();
*mm = meta;
}
-
+
tmp = string_convertToUtf8(NULL,
value,
strlen(value),
Modified: GNUnet/src/applications/fs/ecrs/search.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/search.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/search.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -113,7 +113,7 @@
struct GC_Configuration * cfg;
- int aborted;
+ int aborted;
/**
* Number of queries running at the moment.
@@ -162,7 +162,7 @@
switch (uri->type) {
case chk:
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("CHK URI not allowed for search.\n"));
break;
@@ -192,7 +192,7 @@
int i;
#if DEBUG_SEARCH
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Computing queries (this may take a while).\n");
#endif
@@ -377,7 +377,7 @@
IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&ps->decryptKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Decrypting KBlock with key %s.\n",
&enc);
@@ -620,7 +620,7 @@
ps->priority = new_priority;
ps->lastTransmission = now;
#if DEBUG_SEARCH
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"ECRS initiating FS search with timeout %llus and priority %u.\n",
(ps->timeout - now) / cronSECONDS,
Modified: GNUnet/src/applications/fs/ecrs/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/searchtest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/ecrs/searchtest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -92,7 +92,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
daemon = os_daemon_start(NULL,
cfg,
Modified: GNUnet/src/applications/fs/ecrs/unindex.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/unindex.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/unindex.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -159,8 +159,8 @@
if (0 != UNLINK(serverFN)) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_BULK | GE_USER | GE_ADMIN,
- "unlink",
+ GE_ERROR | GE_BULK | GE_USER | GE_ADMIN,
+ "unlink",
serverFN);
FREE(serverFN);
return SYSERR;
@@ -242,10 +242,10 @@
&fileId);
fd = disk_file_open(ectx,
- filename,
+ filename,
O_RDONLY | O_LARGEFILE);
- if (fd == -1)
- return SYSERR;
+ if (fd == -1)
+ return SYSERR;
dblock = MALLOC(sizeof(Datastore_Value) + DBLOCK_SIZE + sizeof(DBlock));
dblock->size = htonl(sizeof(Datastore_Value) + DBLOCK_SIZE + sizeof(DBlock));
dblock->anonymityLevel = htonl(0);
@@ -306,7 +306,7 @@
goto FAILURE;
}
if (! wasIndexed) {
- if (OK ==
+ if (OK ==
fileBlockEncode(db,
size,
&chk.query,
@@ -335,8 +335,8 @@
* (double)filesize);
}
if (tt != NULL)
- if (OK != tt(ttClosure))
- goto FAILURE;
+ if (OK != tt(ttClosure))
+ goto FAILURE;
for (i=0;i<treedepth;i++) {
size = ntohl(iblocks[i]->size) - sizeof(Datastore_Value);
db = (DBlock*) &iblocks[i][1];
Modified: GNUnet/src/applications/fs/ecrs/upload.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/upload.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/ecrs/upload.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -168,7 +168,7 @@
YES)) {
GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
- _("Cannot get size of file `%s'"),
+ _("Cannot get size of file `%s'"),
filename);
return SYSERR;
@@ -186,7 +186,7 @@
if (SYSERR == getFileHash(ectx,
filename,
&fileId)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Cannot hash `%s'.\n"),
filename);
@@ -212,7 +212,7 @@
connection_destroy(sock);
return SYSERR;
case NO:
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Indexing file `%s' failed. Trying to insert file...\n"),
filename);
@@ -225,7 +225,7 @@
O_RDONLY | O_LARGEFILE);
if (fd == -1) {
connection_destroy(sock);
- return SYSERR;
+ return SYSERR;
}
dblock = MALLOC(sizeof(Datastore_Value) + DBLOCK_SIZE + sizeof(DBlock));
@@ -283,11 +283,11 @@
size + sizeof(DBlock),
&chk.query);
#if DEBUG_UPLOAD
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&chk.query,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Query for current block of size %u is %s\n",
size,
@@ -338,7 +338,7 @@
if (OK != tt(ttClosure))
goto FAILURE;
#if DEBUG_UPLOAD
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Tree depth is %u, walking up tree.\n",
treedepth);
@@ -369,11 +369,11 @@
size,
&chk.query);
#if DEBUG_UPLOAD
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&chk.query,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Query for current block at level %u is `%s'.\n",
i,
Modified: GNUnet/src/applications/fs/fsui/deserialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/deserialize.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/fsui/deserialize.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -39,7 +39,7 @@
if (sizeof(int) != READ(fd, &big, sizeof(int))) \
return SYSERR; \
*val = ntohl(big);
- return OK;
+ return OK;
}
#define READINT(a) if (OK != read_int(fd, (int*) &a)) return SYSERR;
@@ -51,7 +51,7 @@
if (sizeof(long long) != READ(fd, &big, sizeof(long long))) \
return SYSERR; \
*val = ntohll(big);
- return OK;
+ return OK;
}
#define READLONG(a) if (OK != read_long(fd, (long long*) &a)) return SYSERR;
@@ -86,7 +86,7 @@
if (OK != read_int(fd, (int*) &big))
return NULL;
- if (big > maxLen)
+ if (big > maxLen)
return NULL;
buf = MALLOC(big + 1);
buf[big] = '\0';
@@ -94,7 +94,7 @@
FREE(buf);
return NULL;
}
- return buf;
+ return buf;
}
#define READSTRING(c, max) if (NULL == (c = read_string(fd, max))) return
SYSERR;
@@ -178,15 +178,15 @@
FREE(ret);
return NULL;
}
- if (ret->completedDownloadsCount > 0)
+ if (ret->completedDownloadsCount > 0)
ret->completedDownloads
= MALLOC(sizeof(struct ECRS_URI *) *
- ret->completedDownloadsCount);
+ ret->completedDownloadsCount);
ok = YES;
for (i=0;i<ret->completedDownloadsCount;i++) {
ret->completedDownloads[i] = read_uri(ectx, fd);
- if (ret->completedDownloads[i] == NULL)
- ok = NO;
+ if (ret->completedDownloads[i] == NULL)
+ ok = NO;
}
if (NO == ok) {
FREE(ret->filename);
@@ -209,7 +209,7 @@
ctx,
ret);
#if DEBUG_PERSISTENCE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSUI persistence: restoring download `%s': (%llu, %llu)\n",
ret->filename,
@@ -233,7 +233,7 @@
fi->meta = NULL;
fi->uri = NULL;
- READINT(size);
+ READINT(size);
if (size > 1024 * 1024) {
GE_BREAK(ectx, 0);
return SYSERR;
@@ -299,7 +299,7 @@
if (big == 0) {
ctx->collectionData = NULL;
return OK;
- }
+ }
ctx->collectionData
= MALLOC(big);
if (big - sizeof(unsigned int) !=
@@ -383,7 +383,7 @@
memset(list->unmatchedResultsReceived,
0,
list->sizeUnmatchedResultsReceived *
- sizeof(ResultPending));
+ sizeof(ResultPending));
}
for (i=0;i<list->sizeResultsReceived;i++)
if (OK != readFileInfo(ctx->ectx,
@@ -426,7 +426,7 @@
}
list->ctx
= ctx;
-
+
/* finally: prepend to list */
list->next
= ctx->activeSearches;
@@ -449,7 +449,7 @@
if (list->unmatchedResultsReceived != NULL) {
for (i=0;i<list->sizeUnmatchedResultsReceived;i++) {
rp = &list->unmatchedResultsReceived[i];
-
+
if (rp->fi.uri != NULL)
ECRS_freeUri(rp->fi.uri);
if (rp->fi.meta != NULL)
@@ -458,10 +458,10 @@
}
GROW(list->resultsReceived,
list->sizeResultsReceived,
- 0);
+ 0);
}
if (list->uri != NULL)
- ECRS_freeUri(list->uri);
+ ECRS_freeUri(list->uri);
FREE(list);
return SYSERR;
}
@@ -492,7 +492,7 @@
ectx = ctx->ectx;
while (1) {
READINT(big);
- if (big == 0)
+ if (big == 0)
return OK;
memset(&l,
0,
@@ -551,7 +551,7 @@
sizeof(FSUI_UploadList));
while (1) {
READINT(big);
- if (big == 0)
+ if (big == 0)
return OK;
if ( (big != 2) && (big != 3) ) {
GE_BREAK(NULL, 0);
@@ -559,13 +559,13 @@
}
memset(&sshared,
0,
- sizeof(FSUI_UploadShared));
+ sizeof(FSUI_UploadShared));
READINT(sshared.doIndex);
READINT(sshared.anonymityLevel);
READINT(sshared.priority);
READINT(sshared.individualKeywords);
READLONG(sshared.expiration);
- if (big == 2)
+ if (big == 2)
READSTRING(sshared.extractor_config, 1024*1024);
shared = MALLOC(sizeof(FSUI_UploadShared));
memcpy(shared,
@@ -581,7 +581,7 @@
may have added *some* uploads that
still reference shared -- need to
find and cleanup those first,
- or at least detect their presence
+ or at least detect their presence
and not free */
FREE(shared->extractor_config);
FREE(shared);
@@ -600,7 +600,7 @@
while (1) {
READINT(big);
- if (big != 1)
+ if (big != 1)
return OK;
READINT(big); /* state */
READSTRING(name, 1024 * 1024);
@@ -618,12 +618,12 @@
int fd;
fd = -1;
- if (0 != ACCESS(ctx->name, R_OK))
+ if (0 != ACCESS(ctx->name, R_OK))
return;
fd = disk_file_open(ctx->ectx,
ctx->name,
- O_RDONLY);
- if (fd == -1)
+ O_RDONLY);
+ if (fd == -1)
return;
if ( (OK != checkMagic(fd)) ||
@@ -633,7 +633,7 @@
(OK != readUnindex(fd, ctx) ) ||
(OK != readUploads(fd, ctx) ) ) {
GE_BREAK(ctx->ectx, 0);
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_WARNING | GE_BULK | GE_USER,
_("FSUI state file `%s' had syntax error at offset %u.\n"),
ctx->name,
Modified: GNUnet/src/applications/fs/fsui/download.c
===================================================================
--- GNUnet/src/applications/fs/fsui/download.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/download.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -60,7 +60,7 @@
if (isRoot == YES)
return OK; /* namespace ad, ignore */
- URITRACK_trackURI(ectx,
+ URITRACK_trackURI(ectx,
parent->ctx->cfg,
fi);
for (i=0;i<parent->completedDownloadsCount;i++)
@@ -78,7 +78,7 @@
EXTRACTOR_FILENAME);
if (filename == NULL) {
char * tmp = ECRS_uriToString(fi->uri);
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
strlen(tmp) >= strlen(ECRS_URI_PREFIX) + strlen(ECRS_FILE_INFIX));
filename = STRDUP(&tmp[strlen(ECRS_URI_PREFIX) + strlen(ECRS_FILE_INFIX)]);
FREE(tmp);
@@ -94,7 +94,7 @@
while (NULL != (dotdot = strstr(fullName, "..")))
dotdot[0] = dotdot[1] = '_';
disk_directory_create(ectx, fullName);
- strcat(fullName,
+ strcat(fullName,
DIR_SEPARATOR_STR);
while (NULL != (dotdot = strstr(filename, "..")))
dotdot[0] = dotdot[1] = '_';
@@ -156,7 +156,7 @@
if (eta < now)
eta = now;
}
- event.data.DownloadProgress.eta = eta;
+ event.data.DownloadProgress.eta = eta;
event.data.DownloadProgress.filename = dl->filename;
event.data.DownloadProgress.uri = dl->uri;
event.data.DownloadProgress.last_block = lastBlock;
@@ -197,9 +197,9 @@
testTerminate(void * cls) {
FSUI_DownloadList * dl = cls;
- if (dl->state != FSUI_ACTIVE)
+ if (dl->state != FSUI_ACTIVE)
return SYSERR;
- return OK;
+ return OK;
}
/**
@@ -229,7 +229,7 @@
&downloadProgressCallback,
dl,
&testTerminate,
- dl);
+ dl);
if (ret == OK) {
dl->state = FSUI_COMPLETED;
event.type = FSUI_download_completed;
@@ -241,7 +241,7 @@
event.data.DownloadCompleted.filename = dl->filename;
event.data.DownloadCompleted.uri = dl->uri;
dl->ctx->ecb(dl->ctx->ecbClosure,
- &event);
+ &event);
} else if (dl->state == FSUI_ACTIVE) {
/* ECRS error */
dl->state = FSUI_ERROR;
@@ -260,7 +260,7 @@
event.data.DownloadAborted.dc.ppos = dl->parent;
event.data.DownloadAborted.dc.pcctx = dl->parent->cctx;
dl->ctx->ecb(dl->ctx->ecbClosure,
- &event);
+ &event);
} else {
/* else: suspended */
GE_ASSERT(NULL, dl->state == FSUI_SUSPENDING);
@@ -282,7 +282,7 @@
if (fn[strlen(fn)-1] == '/') {
fn[strlen(fn)-1] = '\0';
strcat(fn, GNUNET_DIRECTORY_EXT);
- }
+ }
fd = disk_file_open(ectx,
fn,
O_LARGEFILE | O_RDONLY);
@@ -301,7 +301,7 @@
if (MAP_FAILED == dirBlock) {
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_BULK | GE_ADMIN | GE_USER,
- "MMAP",
+ "MMAP",
fn);
} else {
/* load directory, start downloads */
@@ -322,7 +322,7 @@
FREE(fn);
}
#if DEBUG_DTM
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread for `%s' terminated (%s)...\n",
dl->filename,
@@ -353,7 +353,7 @@
return NULL;
}
dl = MALLOC(sizeof(FSUI_DownloadList));
- memset(dl,
+ memset(dl,
0,
sizeof(FSUI_DownloadList));
dl->startTime = 0; /* not run at all so far! */
@@ -374,7 +374,7 @@
event.data.DownloadStarted.dc.pos = dl;
event.data.DownloadStarted.dc.cctx = NULL;
event.data.DownloadStarted.dc.ppos = dl->parent;
- event.data.DownloadStarted.dc.pcctx = dl->parent->cctx;
+ event.data.DownloadStarted.dc.pcctx = dl->parent->cctx;
event.data.DownloadStarted.total = ECRS_fileSize(dl->uri);
event.data.DownloadStarted.filename = dl->filename;
event.data.DownloadStarted.uri = dl->uri;
@@ -382,7 +382,7 @@
dl->cctx = dl->ctx->ecb(dl->ctx->ecbClosure,
&event);
dl->next = parent->child;
- parent->child = dl;
+ parent->child = dl;
return dl;
}
@@ -402,8 +402,8 @@
struct FSUI_DownloadList * ret;
MUTEX_LOCK(ctx->lock);
- ret = startDownload(ctx,
- anonymityLevel,
+ ret = startDownload(ctx,
+ anonymityLevel,
doRecursive,
uri,
filename,
@@ -430,7 +430,7 @@
return NO;
#if DEBUG_DTM
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread manager investigates pending download of file `%s'
(%u/%u downloads)\n",
list->filename,
@@ -445,7 +445,7 @@
( (list->total > list->completed) ||
(list->total == 0) ) ) {
#if DEBUG_DTM
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread manager starts download of file `%s'\n",
list->filename);
@@ -469,7 +469,7 @@
< list->ctx->activeDownloadThreads) &&
(list->state == FSUI_ACTIVE) ) {
#if DEBUG_DTM
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread manager aborts active download of file `%s' (%u/%u
downloads)\n",
list->filename,
@@ -489,9 +489,9 @@
/* has this one "died naturally"? */
if ( (list->state == FSUI_COMPLETED) ||
(list->state == FSUI_ABORTED) ||
- (list->state == FSUI_ERROR) ) {
+ (list->state == FSUI_ERROR) ) {
#if DEBUG_DTM
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread manager collects inactive download of file `%s'\n",
list->filename);
@@ -528,7 +528,7 @@
while (c != NULL) {
FSUI_abortDownload(ctx, c);
c = c->next;
- }
+ }
if ( (dl->state != FSUI_ACTIVE) &&
(dl->state != FSUI_PENDING) )
return NO;
@@ -558,19 +558,19 @@
prev = (dl->parent != NULL) ? dl->parent->child : ctx->activeDownloads.child;
while ( (prev != dl) &&
(prev != NULL) &&
- (prev->next != dl) )
+ (prev->next != dl) )
prev = prev->next;
if (prev == NULL) {
MUTEX_UNLOCK(ctx->lock);
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSUI_stopDownload failed to locate download.\n");
return SYSERR;
}
- if (prev == dl)
+ if (prev == dl)
dl->parent->child = dl->next; /* first child of parent */
- else
- prev->next = dl->next; /* not first child */
+ else
+ prev->next = dl->next; /* not first child */
MUTEX_UNLOCK(ctx->lock);
if ( (dl->state == FSUI_COMPLETED) ||
(dl->state == FSUI_ABORTED) ||
Modified: GNUnet/src/applications/fs/fsui/downloadtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/downloadtest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/fsui/downloadtest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -80,11 +80,11 @@
break;
case FSUI_search_resumed:
#if DEBUG_VERBOSE
- printf("Search resuming\n");
+ printf("Search resuming\n");
#endif
search = event->data.SearchResumed.sc.pos;
break;
- case FSUI_download_resumed:
+ case FSUI_download_resumed:
#if DEBUG_VERBOSE
printf("Download resuming\n");
#endif
@@ -96,7 +96,7 @@
#endif
if (download == NULL) {
char * u;
-
+
if (! ECRS_equalsUri(upURI,
event->data.SearchResult.fi.uri)) {
#if DEBUG_VERBOSE
@@ -139,8 +139,8 @@
case FSUI_download_completed:
#if DEBUG_VERBOSE
printf("Download complete.\n");
-#endif
- FSUI_abortSearch(ctx,
+#endif
+ FSUI_abortSearch(ctx,
search);
FSUI_stopSearch(ctx,
search);
@@ -239,7 +239,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_DAEMON
daemon = os_daemon_start(NULL,
Modified: GNUnet/src/applications/fs/fsui/fsui-loader.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui-loader.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/fsui/fsui-loader.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -59,7 +59,7 @@
struct GC_Configuration * cfg;
struct GE_Context * ectx;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -79,10 +79,10 @@
YES,
&eventCallback,
NULL);
- if (ctx != NULL)
+ if (ctx != NULL)
FSUI_stop(ctx);
- else
+ else
fprintf(stderr,
- "FSUI_start failed!\n");
+ "FSUI_start failed!\n");
return (ctx == NULL);
}
Modified: GNUnet/src/applications/fs/fsui/fsui.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/fsui.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -46,7 +46,7 @@
dpos = ctx->activeDownloads.child;
#if DEBUG_PERSISTENCE
if (dpos != NULL)
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Download thread manager schedules pending downloads...\n");
#endif
@@ -102,7 +102,7 @@
FSUI_Event event;
cron_t now;
cron_t eta;
-
+
while (ret != NULL) {
if (ret->state == FSUI_ACTIVE) {
event.type = FSUI_upload_resumed;
@@ -179,8 +179,8 @@
GE_ASSERT(ectx, cfg != NULL);
ret = MALLOC(sizeof(FSUI_Context));
- memset(ret,
- 0,
+ memset(ret,
+ 0,
sizeof(FSUI_Context));
ret->activeDownloads.state
= FSUI_PENDING; /* !? */
@@ -219,7 +219,7 @@
#endif
IPC_SEMAPHORE_DOWN(ret->ipc, YES);
#if DEBUG_PERSISTENCE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_REQUEST | GE_USER,
"Aquired IPC lock.\n");
#endif
@@ -245,7 +245,7 @@
event.data.SearchResumed.fisSize = list->sizeResultsReceived;
event.data.SearchResumed.anonymityLevel = list->anonymityLevel;
event.data.SearchResumed.searchURI = list->uri;
- list->cctx = cb(closure, &event);
+ list->cctx = cb(closure, &event);
}
list = list->next;
}
@@ -269,7 +269,7 @@
}
/* 3) restart processing */
- ret->cron = cron_create(ectx);
+ ret->cron = cron_create(ectx);
/* 3a) resume downloads */
cron_add_job(ret->cron,
&updateDownloadThreads,
@@ -292,7 +292,7 @@
GE_DIE_STRERROR(ectx,
GE_FATAL | GE_ADMIN | GE_IMMEDIATE,
"pthread_create");
- }
+ }
xlist = xlist->next;
}
/* 3d) resume searching */
@@ -332,7 +332,7 @@
event.data.DownloadSuspended.dc.pos = list;
event.data.DownloadSuspended.dc.cctx = list->cctx;
event.data.DownloadSuspended.dc.ppos = list->parent;
- event.data.DownloadSuspended.dc.pcctx = list->parent->cctx;
+ event.data.DownloadSuspended.dc.pcctx = list->parent->cctx;
ctx->ecb(ctx->ecbClosure, &event);
}
list = list->next;
@@ -340,7 +340,7 @@
}
/**
- * (recursively) signal upload suspension.
+ * (recursively) signal upload suspension.
*/
static void signalUploadSuspend(struct GE_Context * ectx,
FSUI_Context * ctx,
@@ -368,7 +368,7 @@
static void freeDownloadList(FSUI_DownloadList * list) {
FSUI_DownloadList * next;
int i;
-
+
while (list != NULL) {
freeDownloadList(list->child);
ECRS_freeUri(list->uri);
@@ -429,7 +429,7 @@
ectx = ctx->ectx;
if (ctx->ipc != NULL)
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_REQUEST | GE_USER,
"FSUI shutdown. This may take a while.\n");
@@ -474,11 +474,11 @@
if (xpos->state == FSUI_ACTIVE)
xpos->state = FSUI_PENDING;
PTHREAD_STOP_SLEEP(xpos->handle);
- PTHREAD_JOIN(xpos->handle, &unused);
+ PTHREAD_JOIN(xpos->handle, &unused);
if (xpos->state != FSUI_PENDING)
xpos->state++; /* _JOINED */
- }
- xpos = xpos->next;
+ }
+ xpos = xpos->next;
}
/* 1d) stop uploading */
upos = ctx->activeUploads.child;
@@ -497,7 +497,7 @@
upos->state++; /* _JOINED */
}
upos = upos->next;
- }
+ }
/* 2) signal suspension events */
/* 2a) signal search suspension */
@@ -524,11 +524,11 @@
event.data.UnindexSuspended.uc.pos = xpos;
event.data.UnindexSuspended.uc.cctx = xpos->cctx;
ctx->ecb(ctx->ecbClosure, &event);
- xpos = xpos->next;
+ xpos = xpos->next;
}
/* 3) serialize all of the FSUI state */
- if (ctx->ipc != NULL)
+ if (ctx->ipc != NULL)
FSUI_serialize(ctx);
/* 4) finally, free memory */
@@ -548,7 +548,7 @@
0);
for (i=spos->sizeUnmatchedResultsReceived-1;i>=0;i--) {
ResultPending * rp;
-
+
rp = &spos->unmatchedResultsReceived[i];
GROW(rp->matchingKeys,
rp->matchingKeyCount,
Modified: GNUnet/src/applications/fs/fsui/fsui.h
===================================================================
--- GNUnet/src/applications/fs/fsui/fsui.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/fsui.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -239,7 +239,7 @@
/**
* Client context for the downloadx
- */
+ */
void * cctx;
/**
@@ -300,7 +300,7 @@
* Number of completed sub-downloads.
*/
unsigned int completedDownloadsCount;
-
+
/**
* State of the download.
*/
@@ -335,12 +335,12 @@
*/
typedef struct FSUI_UploadShared {
- cron_t expiration;
+ cron_t expiration;
DirectoryScanCallback dsc;
void * dscClosure;
-
+
EXTRACTOR_ExtractorList * extractors;
struct FSUI_Context * ctx;
Modified: GNUnet/src/applications/fs/fsui/fsuitest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/fsuitest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -79,7 +79,7 @@
0,
NO,
event->data.SearchResult.fi.uri,
- fn);
+ fn);
FREE(fn);
break;
case FSUI_upload_completed:
@@ -126,12 +126,12 @@
struct FSUI_UploadList * upload;
struct FSUI_SearchList * search;
struct FSUI_UnindexList * unindex;
-
+
cfg = GC_create_C_impl();
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_DAEMON
daemon = os_daemon_start(NULL,
@@ -171,7 +171,7 @@
NULL,
0, /* anonymity */
0, /* priority */
- YES,
+ YES,
NO,
NO,
meta,
@@ -225,8 +225,8 @@
if (GNUNET_SHUTDOWN_TEST() == YES)
break;
}
-
+
/* END OF TEST CODE */
FAILURE:
if (ctx != NULL)
Modified: GNUnet/src/applications/fs/fsui/fsuitest2.c
===================================================================
--- GNUnet/src/applications/fs/fsui/fsuitest2.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/fsuitest2.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -53,7 +53,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_DAEMON
daemon = os_daemon_start(NULL,
Modified: GNUnet/src/applications/fs/fsui/search.c
===================================================================
--- GNUnet/src/applications/fs/fsui/search.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/search.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -259,7 +259,7 @@
&testTerminate,
pos);
if (ret != OK) {
- pos->state = FSUI_ERROR;
+ pos->state = FSUI_ERROR;
event.type = FSUI_search_error;
event.data.SearchError.sc.pos = pos;
event.data.SearchError.sc.cctx = pos->cctx;
Modified: GNUnet/src/applications/fs/fsui/searchtest.c
===================================================================
--- GNUnet/src/applications/fs/fsui/searchtest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/fsui/searchtest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -59,7 +59,7 @@
static void * eventCallback(void * cls,
const FSUI_Event * event) {
static char unused;
-
+
switch(event->type) {
case FSUI_search_resumed:
search = event->data.SearchResumed.sc.pos;
@@ -128,7 +128,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_DAEMON
daemon = os_daemon_start(NULL,
@@ -185,7 +185,7 @@
kuri = ECRS_parseListKeywordURI(NULL,
2,
(const char**)keywords);
- upload =
+ upload =
FSUI_startUpload(ctx,
fn,
(DirectoryScanCallback) &disk_directory_scan,
@@ -261,7 +261,7 @@
FAILURE:
if (ctx != NULL)
FSUI_stop(ctx);
- FREENONNULL(fn);
+ FREENONNULL(fn);
/* TODO: verify file 'fn(42)' == file 'fn(43)' */
fn = makeName(42);
UNLINK(fn);
Modified: GNUnet/src/applications/fs/fsui/serialize.c
===================================================================
--- GNUnet/src/applications/fs/fsui/serialize.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/serialize.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -167,7 +167,7 @@
}
GE_ASSERT(ctx->ectx,
ECRS_isKeywordUri(spos->uri));
- WRITEINT(fd, 1);
+ WRITEINT(fd, 1);
WRITEINT(fd, spos->state);
WRITEINT(fd, spos->maxResults);
WRITELONG(fd, spos->timeout);
@@ -186,7 +186,7 @@
&spos->resultsReceived[i]);
for (i=0;i<spos->sizeUnmatchedResultsReceived;i++) {
ResultPending * rp;
-
+
rp = &spos->unmatchedResultsReceived[i];
writeFileInfo(ctx->ectx,
fd,
@@ -205,7 +205,7 @@
spos = spos->next;
}
WRITEINT(fd, 0);
-}
+}
static void writeUnindexing(int fd,
struct FSUI_Context * ctx) {
@@ -264,8 +264,8 @@
ctx->name,
O_CREAT|O_TRUNC|O_WRONLY,
S_IRUSR|S_IWUSR);
- if (fd == -1)
- return;
+ if (fd == -1)
+ return;
WRITE(fd,
"FSUI01\n\0",
8); /* magic */
@@ -276,9 +276,9 @@
ctx,
ctx->activeDownloads.child);
writeUnindexing(fd, ctx);
- writeUploads(fd,
+ writeUploads(fd,
ctx,
- ctx->activeUploads.child);
+ ctx->activeUploads.child);
CLOSE(fd);
}
Modified: GNUnet/src/applications/fs/fsui/unindex.c
===================================================================
--- GNUnet/src/applications/fs/fsui/unindex.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/unindex.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -81,7 +81,7 @@
event.data.UnindexStarted.total = size;
event.data.UnindexStarted.filename = utc->filename;
utc->cctx = utc->ctx->ecb(utc->ctx->ecbClosure,
- &event);
+ &event);
ret = ECRS_unindexFile(utc->ctx->ectx,
utc->ctx->cfg,
utc->filename,
@@ -114,11 +114,11 @@
&event);
} else {
/* must be suspending */
- GE_BREAK(NULL,
+ GE_BREAK(NULL,
utc->state == FSUI_PENDING);
}
#if 0
- GE_LOG(utc->ctx->ectx,
+ GE_LOG(utc->ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSUI unindexThread exits.\n");
#endif
@@ -216,11 +216,11 @@
prev = ctx->unindexOperations;
while ( (prev != dl) &&
(prev != NULL) &&
- (prev->next != dl) )
+ (prev->next != dl) )
prev = prev->next;
if (prev == NULL) {
MUTEX_UNLOCK(ctx->lock);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSUI_stopUnindex failed to locate deletion operation.\n");
return SYSERR;
Modified: GNUnet/src/applications/fs/fsui/upload.c
===================================================================
--- GNUnet/src/applications/fs/fsui/upload.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/fsui/upload.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -60,7 +60,7 @@
static int testTerminate(void * cls) {
FSUI_UploadList * utc = cls;
- if (utc->state != FSUI_ACTIVE)
+ if (utc->state != FSUI_ACTIVE)
return SYSERR;
return OK;
}
@@ -96,7 +96,7 @@
GE_BREAK(ectx, 0);
return NULL;
}
- GROW(fis,
+ GROW(fis,
size,
count);
count = 0;
@@ -119,14 +119,14 @@
GROW(fis,
size,
0);
- if (ret != OK)
- return NULL;
+ if (ret != OK)
+ return NULL;
tempName = STRDUP("/tmp/gnunet-upload-dir.XXXXXX");
handle = mkstemp(tempName);
if (handle == -1) {
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_USER | GE_BULK,
- tempName,
+ tempName,
"mkstemp");
FREE(tempName);
FREE(data);
@@ -141,7 +141,7 @@
"write");
FREE(tempName);
FREE(data);
- return NULL;
+ return NULL;
}
CLOSE(handle);
FREE(data);
@@ -169,7 +169,7 @@
static void signalUploadStarted(struct FSUI_UploadList * utc,
int first_only) {
FSUI_Event event;
-
+
while (utc != NULL) {
event.type = FSUI_upload_started;
event.data.UploadStarted.uc.pos = utc;
@@ -185,7 +185,7 @@
if (first_only)
break;
utc = utc->next;
- }
+ }
}
/**
@@ -223,11 +223,11 @@
signalError(utc,
_("Failed to create temporary directory."));
return NULL;
- }
+ }
} else {
filename = STRDUP(utc->filename);
- }
- utc->start_time = get_time();
+ }
+ utc->start_time = get_time();
ret = ECRS_uploadFile(utc->shared->ctx->ectx,
utc->shared->ctx->cfg,
filename,
@@ -251,12 +251,12 @@
event.data.UploadAborted.uc.ppos = utc->parent;
event.data.UploadAborted.uc.pcctx = utc->parent->cctx;
utc->shared->ctx->ecb(utc->shared->ctx->ecbClosure,
- &event);
+ &event);
} else {
/* must be suspended */
GE_BREAK(NULL, utc->state == FSUI_PENDING);
}
- if (utc->child != NULL)
+ if (utc->child != NULL)
UNLINK(filename);
FREE(filename);
return NULL;
@@ -272,7 +272,7 @@
NULL);
ECRS_addToMetaData(utc->meta,
EXTRACTOR_FILENAME,
- utc->filename);
+ utc->filename);
ECRS_delFromMetaData(utc->meta,
EXTRACTOR_SPLIT,
NULL);
@@ -298,7 +298,7 @@
utc->shared->priority,
utc->shared->expiration,
utc->uri,
- utc->meta);
+ utc->meta);
if (utc->shared->individualKeywords == YES) {
uri = ECRS_metaDataToUri(utc->meta);
ECRS_addToKeyspace(ectx,
@@ -308,7 +308,7 @@
utc->shared->priority,
utc->shared->expiration,
utc->uri,
- utc->meta);
+ utc->meta);
ECRS_freeUri(uri);
}
event.type = FSUI_upload_completed;
@@ -321,7 +321,7 @@
event.data.UploadCompleted.uri = utc->uri;
utc->shared->ctx->ecb(utc->shared->ctx->ecbClosure,
&event);
- if (utc->child != NULL)
+ if (utc->child != NULL)
UNLINK(filename);
FREE(filename);
return NULL;
@@ -367,7 +367,7 @@
static struct FSUI_UploadList *
addUploads(struct FSUI_UploadShared * shared,
- const char * filename,
+ const char * filename,
const struct ECRS_URI * keywords,
const struct ECRS_MetaData * md,
struct FSUI_UploadList * parent);
@@ -392,14 +392,14 @@
parent);
FREE(filename);
ECRS_freeMetaData(md);
- if (child == NULL)
- return SYSERR;
+ if (child == NULL)
+ return SYSERR;
return OK;
}
static struct FSUI_UploadList *
addUploads(struct FSUI_UploadShared * shared,
- const char * filename,
+ const char * filename,
const struct ECRS_URI * keywords,
const struct ECRS_MetaData * md,
struct FSUI_UploadList * parent) {
@@ -425,7 +425,7 @@
YES)) {
FREE(utc);
return NULL;
- }
+ }
utc->meta = ECRS_dupMetaData(md);
} else {
if (SYSERR == shared->dsc(shared->dscClosure,
@@ -460,7 +460,7 @@
static void signalUploadStopped(struct FSUI_UploadList * ul,
int first_only) {
FSUI_Event event;
-
+
while (ul != NULL) {
signalUploadStopped(ul->child, 0);
event.type = FSUI_upload_stopped;
@@ -473,7 +473,7 @@
if (first_only)
break;
ul = ul->next;
- }
+ }
}
static void freeShared(struct FSUI_UploadShared * shared) {
@@ -548,7 +548,7 @@
128 * 1024);
if (shared->handle == NULL) {
GE_LOG_STRERROR(ctx->ectx,
- GE_ERROR | GE_USER | GE_BULK,
+ GE_ERROR | GE_USER | GE_BULK,
"PTHREAD_CREATE");
freeUploadList(ul);
freeShared(shared);
@@ -569,7 +569,7 @@
int FSUI_abortUpload(struct FSUI_Context * ctx,
struct FSUI_UploadList * ul) {
FSUI_UploadList * c;
-
+
GE_ASSERT(ctx->ectx, ul != NULL);
if ( (ul->state != FSUI_ACTIVE) &&
(ul->state != FSUI_PENDING) )
@@ -579,7 +579,7 @@
while (c != NULL) {
FSUI_abortUpload(ctx, c);
c = c->next;
- }
+ }
PTHREAD_STOP_SLEEP(ul->shared->handle);
return OK;
}
Modified: GNUnet/src/applications/fs/lib/fslib.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslib.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/lib/fslib.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -70,7 +70,7 @@
if (OK == connection_read(ctx->sock,
&hdr)) {
#if DEBUG_FSLIB
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSLIB: received message from gnunetd\n");
#endif
@@ -125,13 +125,13 @@
MUTEX_UNLOCK(ctx->lock);
#if DEBUG_FSLIB
if (matched == 0)
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSLIB: received content but have no pending request\n");
#endif
} else {
#if DEBUG_FSLIB
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSLIB: error communicating with gnunetd; sleeping for %ums\n",
delay);
@@ -174,7 +174,7 @@
void FS_SEARCH_destroyContext(struct FS_SEARCH_CONTEXT * ctx) {
void * unused;
- GE_ASSERT(ctx->ectx,
+ GE_ASSERT(ctx->ectx,
ctx->handleCount == 0);
ctx->abort = YES;
connection_close_temporarily(ctx->sock);
@@ -243,7 +243,7 @@
ctx->handles[ctx->handleCount++] = ret;
MUTEX_UNLOCK(ctx->lock);
#if DEBUG_FSLIB
- IF_GELOG(ctx->ectx,
+ IF_GELOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&req->query[0],
&enc));
@@ -260,7 +260,7 @@
return NULL;
}
#if DEBUG_FSLIB
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"FSLIB: search started (%p)\n",
ret);
@@ -427,7 +427,7 @@
&block[1],
size);
#if DEBUG_FSLIB
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Sending index request to gnunetd\n");
#endif
Modified: GNUnet/src/applications/fs/lib/fslibtest.c
===================================================================
--- GNUnet/src/applications/fs/lib/fslibtest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/lib/fslibtest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -229,7 +229,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
now = get_time();
cron = cron_create(NULL);
@@ -243,7 +243,7 @@
ok = YES;
cron_start(cron);
lock = MUTEX_CREATE(NO);
- GE_ASSERT(NULL,
+ GE_ASSERT(NULL,
OK == connection_wait_for_running(NULL,
cfg,
60 * cronSECONDS));
Modified: GNUnet/src/applications/fs/module/anonymity.c
===================================================================
--- GNUnet/src/applications/fs/module/anonymity.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/module/anonymity.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -43,7 +43,7 @@
* @return OK if cover traffic is sufficient
*/
int checkCoverTraffic(struct GE_Context * ectx,
- Traffic_ServiceAPI * traffic,
+ Traffic_ServiceAPI * traffic,
unsigned int level) {
unsigned int count;
unsigned int peers;
Modified: GNUnet/src/applications/fs/module/fs.c
===================================================================
--- GNUnet/src/applications/fs/module/fs.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/fs/module/fs.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -52,7 +52,7 @@
struct DHT_PUT_RECORD * rec;
} DHT_PUT_CLS;
-typedef struct LG_Job {
+typedef struct LG_Job {
unsigned int keyCount;
unsigned int type;
HashCode512 * queries;
@@ -984,7 +984,7 @@
static int fastPathProcessor(const HashCode512 * query,
const DataContainer * value,
- void * cls) {
+ void * cls) {
Datastore_Value * dv;
dv = gapWrapperToDatastoreValue(value, 0);
@@ -1088,7 +1088,7 @@
return SYSERR;
}
rs = (const CS_fs_request_search_MESSAGE*) req;
-#if DEBUG_FS
+#if DEBUG_FS
IF_GELOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&rs->query[0],
&enc));
@@ -1191,7 +1191,7 @@
((unsigned long long)-1)/1024,
1024,
"a) == -1) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("You must specify a postive number for `%s' in the configuration
in section `%s'.\n"),
"QUOTA", "FS");
Modified: GNUnet/src/applications/fs/module/migration.c
===================================================================
--- GNUnet/src/applications/fs/module/migration.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/module/migration.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -109,7 +109,7 @@
cron_t et;
cron_t now;
unsigned int anonymity;
- Datastore_Value *enc;
+ Datastore_Value *enc;
MUTEX_LOCK(lock);
if (content != NULL) {
@@ -133,7 +133,7 @@
return 0;
}
}
-
+
if (ntohl(content->type) == ONDEMAND_BLOCK) {
if (ONDEMAND_getIndexed(datastore, content, &key, &enc) != OK) {
FREE(content);
@@ -142,19 +142,19 @@
return 0;
}
if (stats != NULL)
- stats->change(stat_on_demand_migration_attempts, 1);
+ stats->change(stat_on_demand_migration_attempts, 1);
FREE(content);
content = enc;
}
-
+
size = sizeof(GapWrapper) + ntohl(content->size) - sizeof(Datastore_Value);
if (size > padding) {
MUTEX_UNLOCK(lock);
#if DEBUG_MIGRATION
GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
"Available content of size %u too big for available space (%u)\n",
- size,
+ size,
padding);
#endif
return 0;
@@ -204,7 +204,7 @@
MUTEX_UNLOCK(lock);
if ( (ret > 0)&&
(stats != NULL) )
- stats->change(stat_migration_count, 1);
+ stats->change(stat_migration_count, 1);
return ret;
}
Modified: GNUnet/src/applications/fs/module/ondemand.c
===================================================================
--- GNUnet/src/applications/fs/module/ondemand.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/module/ondemand.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -381,8 +381,8 @@
(void *) &first_unavail) == SYSERR) {
unsigned long long now = htonll(get_time());
state->write(ectx,
- unavail_key,
- sizeof(cron_t),
+ unavail_key,
+ sizeof(cron_t),
(void *) &now);
} else {
/* Delete it after 3 days */
@@ -458,7 +458,7 @@
SEEK_SET)) {
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_ADMIN | GE_USER | GE_BULK,
- "lseek",
+ "lseek",
fn);
FREE(fn);
CLOSE(fileHandle);
@@ -472,7 +472,7 @@
ntohl(odb->blockSize));
if (blen != ntohl(odb->blockSize)) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"read",
fn);
FREE(fn);
@@ -537,7 +537,7 @@
&comp[1],
ntohl(value->size) - sizeof(Datastore_Value))) ) {
#if DEBUG_ONDEMAND
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"`%s' found value that does not match (%u, %u).\n",
__FUNCTION__,
@@ -548,7 +548,7 @@
}
*comp = *value; /* make copy! */
#if DEBUG_ONDEMAND
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"`%s' found value that matches.\n",
__FUNCTION__);
@@ -583,7 +583,7 @@
fn = getOnDemandFile(fileId);
#if DEBUG_ONDEMAND
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Removing on-demand encoded data stored in `%s'.\n",
fn);
@@ -594,8 +594,8 @@
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); /* 644 */
if(fd == -1) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
- "open",
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ "open",
fn);
FREE(fn);
return SYSERR;
@@ -618,8 +618,8 @@
&block[1],
delta)) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
- "read",
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ "read",
fn);
CLOSE(fd);
FREE(fn);
@@ -697,7 +697,7 @@
tmp = REALLOC(tmp,
strlen(tmp) +
strlen("/data/shared/") + 1);
- strcat(tmp, "/data/shared/");
+ strcat(tmp, "/data/shared/");
GC_get_configuration_value_filename(capi->cfg,
"FS",
"INDEX-DIRECTORY",
@@ -705,7 +705,7 @@
&index_directory);
FREE(tmp);
disk_directory_create(ectx,
- index_directory); /* just in case */
+ index_directory); /* just in case */
return OK;
}
Modified: GNUnet/src/applications/fs/namespace/namespace_info.c
===================================================================
--- GNUnet/src/applications/fs/namespace/namespace_info.c 2006-10-21
19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/fs/namespace/namespace_info.c 2006-10-21
19:58:30 UTC (rev 3530)
@@ -70,7 +70,7 @@
tag = size + sizeof(int);
buf = MALLOC(tag);
((int *) buf)[0] = htonl(ranking); /* ranking */
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
size == ECRS_serializeMetaData(ectx,
meta,
&buf[sizeof(int)],
@@ -174,7 +174,7 @@
*/
struct ECRS_URI *
NS_createNamespace(struct GE_Context * ectx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
unsigned int anonymityLevel,
unsigned int insertPriority,
unsigned int insertExpiration,
@@ -529,7 +529,7 @@
memcpy(&buf[1],
uri,
strlen(uri)+1);
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
metaSize ==
ECRS_serializeMetaData(ectx,
fi->meta,
@@ -802,7 +802,7 @@
nextTime = lastTime;
if ( (nextTime + pubFreq < now) &&
(nextTime + pubFreq > nextTime) )
- nextTime += pubFreq * ((now - nextTime) / pubFreq);
+ nextTime += pubFreq * ((now - nextTime) / pubFreq);
}
if (cls->it != NULL) {
if (OK != cls->it(cls->closure,
Modified: GNUnet/src/applications/fs/namespace/namespace_infotest.c
===================================================================
--- GNUnet/src/applications/fs/namespace/namespace_infotest.c 2006-10-21
19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/fs/namespace/namespace_infotest.c 2006-10-21
19:58:30 UTC (rev 3530)
@@ -52,7 +52,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
daemon = os_daemon_start(NULL,
cfg,
@@ -133,7 +133,7 @@
ECRS_deleteNamespace(ectx,
cfg,
"test");
-
+
GE_ASSERT(NULL, OK == os_daemon_stop(NULL, daemon));
GC_free(cfg);
return (ok == YES) ? 0 : 1;
Modified: GNUnet/src/applications/fs/tools/gnunet-directory.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-directory.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-directory.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -46,7 +46,7 @@
const char * data,
void * closure) {
printf("\t%20s: %s\n",
- dgettext("libextractor",
+ dgettext("libextractor",
EXTRACTOR_getKeywordTypeAsString(type)),
data);
return OK;
@@ -139,7 +139,7 @@
static struct CommandLineOption gnunetdirectoryOptions[] = {
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Perform directory related
operations.")), /* -h */
- { 'k', "kill", NULL,
+ { 'k', "kill", NULL,
gettext_noop("remove all entries from the directory database and stop
tracking URIs"),
0, &gnunet_getopt_configure_set_one, &do_kill },
COMMAND_LINE_OPTION_LOGGING, /* -L */
@@ -159,7 +159,7 @@
int i;
struct GC_Configuration * cfg;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -176,7 +176,7 @@
if (i == SYSERR) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (do_list)
printf(_("Listed %d matching entries.\n"),
Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -56,7 +56,7 @@
static struct CommandLineOption gnunetdownloadOptions[] = {
{ 'a', "anonymity", "LEVEL",
gettext_noop("set the desired LEVEL of sender-anonymity"),
- 1, &gnunet_getopt_configure_set_uint, &anonymity },
+ 1, &gnunet_getopt_configure_set_uint, &anonymity },
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Download files from GNUnet.")), /* -h
*/
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
@@ -66,7 +66,7 @@
1, &gnunet_getopt_configure_set_string, &filename },
{ 'R', "recursive", NULL,
gettext_noop("download a GNUnet directory recursively"),
- 1, &gnunet_getopt_configure_set_one, &do_recursive },
+ 1, &gnunet_getopt_configure_set_one, &do_recursive },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
COMMAND_LINE_OPTION_VERBOSE,
COMMAND_LINE_OPTION_END,
@@ -144,7 +144,7 @@
int i;
/* startup */
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -160,7 +160,7 @@
argv);
if ( (i == SYSERR) ||
(0 != GC_parse_configuration(cfg,
- cfgFilename)) ) {
+ cfgFilename)) ) {
errorCode = -1;
goto quit;
}
@@ -194,7 +194,7 @@
try_rename = NO;
if (filename == NULL) {
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
strlen(argv[i]) >
strlen(ECRS_URI_PREFIX) +
strlen(ECRS_FILE_INFIX));
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -218,53 +218,53 @@
static struct CommandLineOption gnunetinsertOptions[] = {
{ 'a', "anonymity", "LEVEL",
gettext_noop("set the desired LEVEL of sender-anonymity"),
- 1, &gnunet_getopt_configure_set_uint, &anonymity },
+ 1, &gnunet_getopt_configure_set_uint, &anonymity },
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
{ 'C', "copy", NULL,
gettext_noop("even if gnunetd is running on the local machine, force the"
" creation of a copy instead of making a link to the GNUnet
share directory"),
- 0, &gnunet_getopt_configure_set_one, &do_copy },
+ 0, &gnunet_getopt_configure_set_one, &do_copy },
{ 'd', "disable-creation-time", NULL,
gettext_noop("disable adding the creation time to the metadata of the
uploaded file"),
- 0, &gnunet_getopt_configure_set_one, &do_disable_creation_time },
+ 0, &gnunet_getopt_configure_set_one, &do_disable_creation_time },
{ 'D', "direct", NULL,
gettext_noop("use libextractor to add additional direct references to
directory entries"),
- 0, &gnunet_getopt_configure_set_one, &do_direct_references },
+ 0, &gnunet_getopt_configure_set_one, &do_direct_references },
{ 'e', "extract", NULL,
gettext_noop("print list of extracted keywords that would be used, but do
not perform upload"),
- 0, &gnunet_getopt_configure_set_one, &extract_only },
+ 0, &gnunet_getopt_configure_set_one, &extract_only },
COMMAND_LINE_OPTION_HELP(gettext_noop("Make files available to GNUnet for
sharing.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
{ 'i', "interval", "SECONDS",
gettext_noop("set interval for availability of updates to SECONDS"
" (for namespace insertions only)"),
- 1, &gnunet_getopt_configure_set_uint, &interval },
+ 1, &gnunet_getopt_configure_set_uint, &interval },
{ 'k', "key", "KEYWORD",
gettext_noop("add an additional keyword for the top-level file or
directory"
" (this option can be specified multiple times)"),
- 1, &gnunet_getopt_configure_set_keywords, &topKeywords },
+ 1, &gnunet_getopt_configure_set_keywords, &topKeywords },
{ 'K', "global-key", "KEYWORD",
gettext_noop("add an additional keyword for all files and directories"
" (this option can be specified multiple times)"),
- 1, &gnunet_getopt_configure_set_keywords, &gloKeywords },
- COMMAND_LINE_OPTION_LOGGING, /* -L */
+ 1, &gnunet_getopt_configure_set_keywords, &gloKeywords },
+ COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 'm', "meta", "TYPE:VALUE",
gettext_noop("set the meta-data for the given TYPE to the given VALUE"),
1, &gnunet_getopt_configure_set_metadata, &meta },
{ 'n', "noindex", NULL,
gettext_noop("do not index, perform full insertion (stores entire "
"file in encrypted form in GNUnet database)"),
- 0, &gnunet_getopt_configure_set_one, &do_insert },
+ 0, &gnunet_getopt_configure_set_one, &do_insert },
{ 'N', "next", "ID",
gettext_noop("specify ID of an updated version to be published in the
future"
" (for namespace insertions only)"),
- 1, &gnunet_getopt_configure_set_string, &next_id },
+ 1, &gnunet_getopt_configure_set_string, &next_id },
{ 'p', "priority", "PRIORITY",
gettext_noop("specify the priority of the content"),
- 1, &gnunet_getopt_configure_set_uint, &priority },
+ 1, &gnunet_getopt_configure_set_uint, &priority },
{ 'P', "pseudonym", "NAME",
gettext_noop("publish the files under the pseudonym NAME (place file into
namespace)"),
- 1, &gnunet_getopt_configure_set_string, &pseudonym },
+ 1, &gnunet_getopt_configure_set_string, &pseudonym },
{ 'S', "sporadic", NULL,
gettext_noop("specifies this as an aperiodic but updated publication"
" (for namespace insertions only)"),
@@ -272,14 +272,14 @@
{ 't', "this", "ID",
gettext_noop("set the ID of this version of the publication"
" (for namespace insertions only)"),
- 1, &gnunet_getopt_configure_set_string, &this_id },
+ 1, &gnunet_getopt_configure_set_string, &this_id },
{ 'T', "time", "TIME",
gettext_noop("specify creation time for SBlock (see man-page for format)"),
- 1, &gnunet_getopt_configure_set_string, &creation_time },
+ 1, &gnunet_getopt_configure_set_string, &creation_time },
{ 'u', "update", "ID",
gettext_noop("ID of the previous version of the content"
" (for namespace update only)"),
- 1, &gnunet_getopt_configure_set_string, &prev_id },
+ 1, &gnunet_getopt_configure_set_string, &prev_id },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
COMMAND_LINE_OPTION_VERBOSE,
COMMAND_LINE_OPTION_END,
@@ -292,14 +292,14 @@
* @param argv command line arguments
* @return return 0 for ok, -1 on error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
const char * filename;
int i;
char * tmp;
unsigned long long verbose;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -315,10 +315,10 @@
argv);
if (i == SYSERR) {
errorCode = -1;
- goto quit;
+ goto quit;
}
if (OK != GC_parse_configuration(cfg,
- cfgFilename)) {
+ cfgFilename)) {
errorCode = -1;
goto quit;
}
@@ -333,7 +333,7 @@
EXTRACTOR_ExtractorList * l;
char * ex;
EXTRACTOR_KeywordList * list;
-
+
l = EXTRACTOR_loadDefaultLibraries();
GC_get_configuration_value_string(cfg,
"FS",
@@ -356,10 +356,10 @@
ECRS_freeMetaData(meta);
errorCode = 0;
- goto quit;
+ goto quit;
}
-
+
GC_get_configuration_value_number(cfg,
"GNUNET",
"VERBOSE",
@@ -391,7 +391,7 @@
fmt,
&t))) {
GE_LOG_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"strptime");
printf(_("Parsing time failed. Use `%s' format.\n"),
fmt);
@@ -453,10 +453,10 @@
(DirectoryScanCallback) &disk_directory_scan,
ectx,
anonymity,
- priority,
+ priority,
! do_insert,
YES,
- do_direct_references,
+ do_direct_references,
meta,
gloKeywords,
topKeywords);
@@ -471,7 +471,7 @@
}
ECRS_freeMetaData(meta);
FSUI_stop(ctx);
-
+
quit:
GC_free(cfg);
GE_free_context(ectx);
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -69,7 +69,7 @@
static struct CommandLineOption gnunetpseudonymOptions[] = {
{ 'a', "anonymity", "LEVEL",
gettext_noop("set the desired LEVEL of sender-anonymity"),
- 1, &gnunet_getopt_configure_set_uint, &anonymity },
+ 1, &gnunet_getopt_configure_set_uint, &anonymity },
{ 'A', "automate", NULL,
gettext_noop("automate creation of a namespace by starting a
collection"),
0, &gnunet_getopt_configure_set_one, &start_collection },
@@ -87,7 +87,7 @@
COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 'k', "keyword", "KEYWORD",
gettext_noop("use the given keyword to advertise the namespace (use when
creating a new pseudonym)"),
- 1, &gnunet_getopt_configure_set_keywords, &advertisement },
+ 1, &gnunet_getopt_configure_set_keywords, &advertisement },
{ 'm', "meta", "TYPE=VALUE",
gettext_noop("specify metadata describing the namespace or collection"),
1, &gnunet_getopt_configure_set_metadata, &meta },
@@ -183,7 +183,7 @@
return OK;
}
-int main(int argc,
+int main(int argc,
const char *argv[]) {
int cnt;
char * pname;
@@ -192,7 +192,7 @@
HashCode512 hc;
/* startup */
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -211,7 +211,7 @@
GC_free(cfg);
GE_free_context(ectx);
ECRS_freeMetaData(meta);
- return -1;
+ return -1;
}
success = 0; /* no errors */
@@ -284,7 +284,7 @@
} else {
if (advertisement == NULL)
advertisement = ECRS_parseCharKeywordURI(ectx,
- "namespace");
+ "namespace");
}
FREE(keyword);
rootURI = NS_createNamespace(ectx,
Modified: GNUnet/src/applications/fs/tools/gnunet-search.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-search.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-search.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -93,7 +93,7 @@
= ECRS_dupUri(event->data.SearchResult.fi.uri);
fis[fiCount-1].meta
= ECRS_dupMetaData(event->data.SearchResult.fi.meta);
-
+
uri = ECRS_uriToString(event->data.SearchResult.fi.uri);
printf("%s:\n",
uri);
@@ -101,10 +101,10 @@
EXTRACTOR_FILENAME);
if (filename != NULL) {
char * dotdot;
-
+
while (NULL != (dotdot = strstr(filename, "..")))
dotdot[0] = dotdot[1] = '_';
-
+
printf("gnunet-download -o \"%s\" %s\n",
filename,
uri);
@@ -130,14 +130,14 @@
static struct CommandLineOption gnunetsearchOptions[] = {
{ 'a', "anonymity", "LEVEL",
gettext_noop("set the desired LEVEL of sender-anonymity"),
- 1, &gnunet_getopt_configure_set_uint, &anonymity },
+ 1, &gnunet_getopt_configure_set_uint, &anonymity },
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Create new pseudonyms, delete
pseudonyms or list existing pseudonyms.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 'm', "max", "LIMIT",
gettext_noop("exit after receiving LIMIT results"),
- 1, &gnunet_getopt_configure_set_uint, &max_results },
+ 1, &gnunet_getopt_configure_set_uint, &max_results },
{ 'o', "output", "FILENAME",
gettext_noop("write encountered (decrypted) search results to FILENAME"),
1, &gnunet_getopt_configure_set_string, &output_filename },
@@ -164,7 +164,7 @@
struct FSUI_SearchList * s;
/* startup */
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -183,7 +183,7 @@
goto quit;
}
if (OK != GC_parse_configuration(cfg,
- cfgFilename)) {
+ cfgFilename)) {
errorCode = -1;
goto quit;
}
@@ -223,7 +223,7 @@
}
GNUNET_SHUTDOWN_WAITFOR();
if (errorCode == 1)
- FSUI_abortSearch(ctx,
+ FSUI_abortSearch(ctx,
s);
FSUI_stopSearch(ctx,
s);
Modified: GNUnet/src/applications/fs/tools/gnunet-unindex.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-unindex.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/tools/gnunet-unindex.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -110,7 +110,7 @@
* @param argv command line arguments
* @return return 0 for ok, -1 on error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
static struct FSUI_Context * ctx;
char * filename;
@@ -119,7 +119,7 @@
struct FSUI_UnindexList * ul;
/* startup */
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -136,7 +136,7 @@
if (i == SYSERR) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (i == argc) {
GE_LOG(ectx,
@@ -148,7 +148,7 @@
return -1;
}
if (OK != GC_parse_configuration(cfg,
- cfgFilename)) {
+ cfgFilename)) {
GC_free(cfg);
GE_free_context(ectx);
return -1;
Modified: GNUnet/src/applications/fs/uritrack/file_info.c
===================================================================
--- GNUnet/src/applications/fs/uritrack/file_info.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/fs/uritrack/file_info.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -76,7 +76,7 @@
new = MALLOC(strlen(pfx) + strlen(STATE_NAME) + 2);
strcpy(new, pfx);
strcat(new, "/");
- strcat(new, STATE_NAME);
+ strcat(new, STATE_NAME);
FREE(pfx);
return new;
}
@@ -94,7 +94,7 @@
nw = MALLOC(strlen(pfx) + strlen(TRACK_OPTION) + 2);
strcpy(nw, pfx);
strcat(nw, "/");
- strcat(nw, TRACK_OPTION);
+ strcat(nw, TRACK_OPTION);
FREE(pfx);
return nw;
}
@@ -123,7 +123,7 @@
(ntohl(status) != YES) ) {
FREE(tn);
#if DEBUG_FILE_INFO
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
_("Collecting file identifiers disabled.\n"));
#endif
@@ -163,8 +163,8 @@
IPC_SEMAPHORE_DOWN(sem, YES);
fn = getUriDbName(ectx, cfg);
fh = disk_file_open(ectx,
- fn,
- O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE,
+ fn,
+ O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE,
S_IRUSR|S_IWUSR);
if (fh == -1) {
GE_LOG_STRERROR_FILE(ectx,
@@ -234,14 +234,14 @@
*
* @param iterator function to call on each entry, may be NULL
* @param closure extra argument to the callback
- * @param need_metadata YES if metadata should be
+ * @param need_metadata YES if metadata should be
* provided, NO if metadata is not needed (faster)
* @return number of entries found
*/
int URITRACK_listURIs(struct GE_Context * ectx,
struct GC_Configuration * cfg,
int need_metadata,
- ECRS_SearchProgressCallback iterator,
+ ECRS_SearchProgressCallback iterator,
void *closure) {
struct IPC_SEMAPHORE *sem;
int rval;
@@ -264,14 +264,14 @@
return 0; /* no URI db */
}
fd = disk_file_open(ectx,
- fn,
+ fn,
O_LARGEFILE | O_RDONLY);
if (fd == -1) {
IPC_SEMAPHORE_UP(sem);
IPC_SEMAPHORE_DESTROY(sem);
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
- "open",
+ "open",
fn);
FREE(fn);
return SYSERR; /* error opening URI db */
@@ -305,7 +305,7 @@
GE_BREAK(ectx, 0);
goto FORMATERROR;
}
- fi.uri = ECRS_stringToUri(ectx,
+ fi.uri = ECRS_stringToUri(ectx,
&result[pos]);
if(fi.uri == NULL) {
GE_BREAK(ectx, 0);
@@ -356,7 +356,7 @@
if(0 != MUNMAP(result, buf.st_size))
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_ADMIN | GE_BULK,
- "munmap",
+ "munmap",
fn);
CLOSE(fd);
FREE(fn);
@@ -366,7 +366,7 @@
FORMATERROR:
GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
- _("Deleted corrupt URI database in `%s'."),
+ _("Deleted corrupt URI database in `%s'."),
STATE_NAME);
if(0 != MUNMAP(result, buf.st_size))
GE_LOG_STRERROR_FILE(ectx,
Modified: GNUnet/src/applications/gap/gap.c
===================================================================
--- GNUnet/src/applications/gap/gap.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/gap/gap.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -351,7 +351,7 @@
pos->next = NULL;
pos->responseList = NULL;
pos->queryOrigin = origin;
- change_pid_rc(origin, 1);
+ change_pid_rc(origin, 1);
if (prev == NULL)
rtdList = pos;
else
@@ -492,25 +492,25 @@
if (id == qr->noTarget)
ranking = 0; /* no chance for blocked peers */
idx = getIndex(id);
-#if DEBUG_GAP
+#if DEBUG_GAP
GE_LOG(ectx, GE_DEBUG | GE_REQUEST | GE_USER,
"Ranking for %u: %u\n",
idx,
ranking);
#endif
- qr->rankings[idx] = ranking;
+ qr->rankings[idx] = ranking;
change_pid_rc(id, -1);
}
/**
- * Return 1 if the current network (upstream) or CPU load is
+ * Return 1 if the current network (upstream) or CPU load is
* too high, 0 if the load is ok.
*/
static int loadTooHigh() {
- return ( (hardCPULimit > 0) &&
- (os_cpu_get_load(ectx,
+ return ( (hardCPULimit > 0) &&
+ (os_cpu_get_load(ectx,
coreAPI->cfg) >= hardCPULimit) ) ||
- ( (hardUpLimit > 0) &&
+ ( (hardUpLimit > 0) &&
(os_network_monitor_get_load(coreAPI->load_monitor,
Upload) >= hardUpLimit) );
}
@@ -535,7 +535,7 @@
/* Load above hard limit? */
if (loadTooHigh())
return;
-
+
id = intern_pid(peer);
if (id == qr->noTarget) {
change_pid_rc(id, -1);
@@ -902,7 +902,7 @@
unsigned int priority,
PID_INDEX sender) {
unsigned int i;
- cron_t now;
+ cron_t now;
#if DEBUG__GAP
EncName enc;
@@ -1025,11 +1025,11 @@
ite = &ROUTING_indTable_[computeRoutingIndex(query)];
equal_to_pending = equalsHashCode512(query, &ite->primaryKey);
if ( (stats != NULL) &&
- (equal_to_pending) )
- stats->change(stat_routing_request_duplicates, 1);
-
+ (equal_to_pending) )
+ stats->change(stat_routing_request_duplicates, 1);
+
new_ttl = now + ttl;
- if ( (ite->ttl < now) &&
+ if ( (ite->ttl < now) &&
(ite->ttl < now - (cron_t) (TTL_DECREMENT * 10L)) &&
(ttl > - TTL_DECREMENT * 5) ) {
addToSlot(ITE_REPLACE, ite, query, ttl, priority, sender);
@@ -1359,13 +1359,13 @@
if (equalsHashCode512(&hc,
&ite->seen[i]))
return OK; /* drop, duplicate result! */
- for (i=0;i<cls->valueCount;i++)
+ for (i=0;i<cls->valueCount;i++)
if (equalsHashCode512(&hc,
&cls->hashes[i]))
- return OK; /* drop, duplicate entry in DB! */
+ return OK; /* drop, duplicate entry in DB! */
if ( (cls->valueCount > MAX_SEEN_VALUES) &&
(weak_randomi(cls->valueCount) > 8) )
- return OK; /* statistical drop, too many replies to keep in memory */
+ return OK; /* statistical drop, too many replies to keep in memory */
GROW(cls->values,
cls->valueCount,
cls->valueCount+1);
@@ -1374,7 +1374,7 @@
memcpy(cls->values[cls->valueCount-1],
value,
ntohl(value->size));
- if (cls->hashCount < cls->valueCount)
+ if (cls->hashCount < cls->valueCount)
GROW(cls->hashes,
cls->hashCount,
cls->hashCount * 2 + 8);
@@ -1417,7 +1417,7 @@
/* Load above hard limit? */
if (loadTooHigh())
- return SYSERR;
+ return SYSERR;
senderID = intern_pid(sender);
GE_ASSERT(ectx, (senderID != 0) || (sender == NULL) );
@@ -1504,7 +1504,7 @@
&query->queries[0],
cls.values[perm[i]])) &&
(stats != NULL) )
- stats->change(stat_routing_local_results, 1);
+ stats->change(stat_routing_local_results, 1);
/* even for local results, always do 'put'
(at least to give back results to local client &
to update priority; but only do this for
@@ -1571,12 +1571,12 @@
#if DEBUG_GAP
EncName enc;
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
if (host != NULL)
hash2enc(&host->hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"GAP received content from `%s'\n",
(host != NULL) ? (const char*)&enc : "myself");
@@ -1593,7 +1593,7 @@
prio = 0;
if (rhf == NULL) {
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_routing_reply_drops, 1);
return OK; /* not fully initialized! */
}
@@ -1612,7 +1612,7 @@
&ite->seen[i])) {
MUTEX_UNLOCK(lookup_exclusion);
FREE(value);
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_routing_reply_dups, 1);
return 0; /* seen before, useless */
}
@@ -1626,14 +1626,14 @@
0);
if (ret == SYSERR) {
EncName enc;
-
+
IF_GELOG(ectx, GE_ERROR | GE_BULK | GE_USER,
if (host != NULL)
- hash2enc(&host->hashPubKey,
+ hash2enc(&host->hashPubKey,
&enc));
GE_LOG(ectx, GE_ERROR | GE_BULK | GE_USER,
_("GAP received invalid content from `%s'\n"),
- (host != NULL) ? (const char*)&enc : _("myself"));
+ (host != NULL) ? (const char*)&enc : _("myself"));
GE_BREAK(ectx, 0);
FREE(value);
return SYSERR; /* invalid */
@@ -1697,11 +1697,11 @@
ite->priority = 0;
ite->type = 0;
ite->ttl = 0;
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_routing_slots_used, -1);
}
} else {
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_routing_reply_drops, 1);
}
MUTEX_UNLOCK(lookup_exclusion);
@@ -1940,7 +1940,7 @@
GE_BREAK(ectx, 0);
return 0;
}
-
+
/* Load above hard limit? */
if (loadTooHigh()) {
#if DEBUG_GAP
@@ -1954,7 +1954,7 @@
sender == NULL ? "localhost" : (char*)&enc);
#endif
return OK;
- }
+ }
queries = 1 + (ntohs(msg->size) - sizeof(P2P_gap_query_MESSAGE))
/ sizeof(HashCode512);
if ( (queries <= 0) ||
@@ -1964,7 +1964,7 @@
GE_BREAK(ectx, 0);
return SYSERR; /* malformed query */
}
-
+
qmsg = MALLOC(ntohs(msg->size));
memcpy(qmsg, msg, ntohs(msg->size));
if (equalsHashCode512(&qmsg->returnTo.hashPubKey,
@@ -2005,7 +2005,7 @@
"Received GAP query `%s'.\n",
&enc);
#endif
- if ((policy & QUERY_DROPMASK) == 0) {
+ if ((policy & QUERY_DROPMASK) == 0) {
/* policy says no answer/forward/indirect => direct drop;
this happens if the peer is too busy (netload-up >= 100%). */
FREE(qmsg);
@@ -2118,11 +2118,11 @@
stat_routing_no_route_policy = stats->create(gettext_noop("# gap
requests policy: not routed"));
stat_routing_no_answer_policy = stats->create(gettext_noop("# gap
requests policy: not answered"));
stat_routing_processed = stats->create(gettext_noop("# gap
requests processed: attempted add to RT"));
- stat_routing_local_results = stats->create(gettext_noop("# gap
requests processed: local result"));
+ stat_routing_local_results = stats->create(gettext_noop("# gap
requests processed: local result"));
stat_routing_successes = stats->create(gettext_noop("# gap
routing successes (total)"));
stat_routing_collisions = stats->create(gettext_noop("# gap
requests dropped: collision in RT"));
stat_routing_forwards = stats->create(gettext_noop("# gap
requests forwarded (counting each peer)"));
- stat_routing_request_duplicates = stats->create(gettext_noop("# gap
duplicate requests (pending)"));
+ stat_routing_request_duplicates = stats->create(gettext_noop("# gap
duplicate requests (pending)"));
stat_routing_request_repeat = stats->create(gettext_noop("# gap
duplicate requests that were re-tried"));
stat_routing_request_repeat_dttl= stats->create(gettext_noop("# gap re-try
ttl difference (cummulative)"));
stat_routing_reply_dups = stats->create(gettext_noop("# gap reply
duplicates"));
@@ -2173,7 +2173,7 @@
2 * cronMINUTES,
NULL);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
_("`%s' registering handlers %d %d\n"),
"gap",
@@ -2222,7 +2222,7 @@
ite->seenReplyWasUnique = NO;
if (stats != NULL)
stats->change(stat_memory_destinations, - ite->hostsWaiting);
- decrement_pid_rcs(ite->destination, ite->hostsWaiting);
+ decrement_pid_rcs(ite->destination, ite->hostsWaiting);
GROW(ite->destination,
ite->hostsWaiting,
0);
Modified: GNUnet/src/applications/gap/gap.h
===================================================================
--- GNUnet/src/applications/gap/gap.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/gap/gap.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -158,7 +158,7 @@
* THE VALUE YOU PICK MUST BE A POWER OF 2, for example:
* 128, 256, 512, 1024, 2048, 4092, 8192, 16384, 32768, 65536
*/
-#define MIN_INDIRECTION_TABLE_SIZE 1024
+#define MIN_INDIRECTION_TABLE_SIZE 1024
/* #define MIN_INDIRECTION_TABLE_SIZE 4 */
/**
@@ -310,7 +310,7 @@
* Keep this struct as small as possible -- an array of these
* takes 80% of GNUnet's memory (for 65536 routing table entries,
* the array itself uses about 8 MB of memory; the contents
- * that the entries point to can easily use another 8 MB at this
+ * that the entries point to can easily use another 8 MB at this
* point [see Mantis #1058])
*/
typedef struct {
Modified: GNUnet/src/applications/gap/gaptest.c
===================================================================
--- GNUnet/src/applications/gap/gaptest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/gap/gaptest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -215,7 +215,7 @@
NULL)) {
fd = disk_file_open(ectx,
- tmpName,
+ tmpName,
O_RDONLY);
buf = MALLOC(size);
in = MALLOC(size);
@@ -281,7 +281,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_PEERS
daemon1 = os_daemon_start(NULL,
Modified: GNUnet/src/applications/gap/pid_table.c
===================================================================
--- GNUnet/src/applications/gap/pid_table.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/gap/pid_table.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -74,7 +74,7 @@
return ret;
} else if ( (zero == size) &&
(table[ret].rc == 0) ) {
- zero = ret;
+ zero = ret;
}
}
ret = zero;
@@ -91,7 +91,7 @@
if (stats != NULL) {
stats->change(stat_pid_rc, 1);
stats->change(stat_pid_entries, 1);
- }
+ }
MUTEX_UNLOCK(lock);
return ret;
}
@@ -110,10 +110,10 @@
table[id].rc--;
if ( (table[id].rc == 0) &&
(stats != NULL) )
- stats->change(stat_pid_entries, -1);
+ stats->change(stat_pid_entries, -1);
}
MUTEX_UNLOCK(lock);
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_pid_rc, - count);
}
@@ -132,7 +132,7 @@
MUTEX_UNLOCK(lock);
}
-void resolve_pid(PID_INDEX id,
+void resolve_pid(PID_INDEX id,
PeerIdentity * pid) {
if (id == 0) {
memset(pid, 0, sizeof(PeerIdentity));
@@ -152,7 +152,7 @@
ectx = e;
stats = s;
if (stats != NULL) {
- stat_pid_entries
+ stat_pid_entries
= stats->create(gettext_noop("# distinct interned peer IDs in pid
table"));
stat_pid_rc
= stats->create(gettext_noop("# total RC of interned peer IDs in pid
table"));
Modified: GNUnet/src/applications/gap/pid_table.h
===================================================================
--- GNUnet/src/applications/gap/pid_table.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/gap/pid_table.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -33,7 +33,7 @@
void done_pid_table(void);
typedef unsigned int PID_INDEX;
-
+
PID_INDEX intern_pid(const PeerIdentity * pid);
void change_pid_rc(PID_INDEX id, int delta);
@@ -41,6 +41,6 @@
void decrement_pid_rcs(const PID_INDEX * ids,
unsigned int count);
-void resolve_pid(PID_INDEX id,
+void resolve_pid(PID_INDEX id,
PeerIdentity * pid);
Modified: GNUnet/src/applications/getoption/getoption.c
===================================================================
--- GNUnet/src/applications/getoption/getoption.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/getoption/getoption.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -51,7 +51,7 @@
req->option,
NULL,
&val)) ||
- (val == NULL) )
+ (val == NULL) )
return SYSERR; /* signal error: option not set */
rep = MALLOC(sizeof(MESSAGE_HEADER) + strlen(val) + 1);
Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/identity/identity.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -222,7 +222,7 @@
if ( (disk_file_test(ectx,
fn) == YES) &&
(sizeof(unsigned int) ==
- disk_file_read(ectx,
+ disk_file_read(ectx,
fn,
sizeof(unsigned int),
&trust)) ) {
@@ -353,7 +353,7 @@
"unlink",
fullname);
} else if (disk_directory_test(ectx, fullname) == YES) {
- if (0 == RMDIR(fullname))
+ if (0 == RMDIR(fullname))
GE_LOG(ectx,
GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
_("Directory `%s' in directory `%s' does not match naming
convention. "
@@ -509,7 +509,7 @@
FREE(entry);
}
MUTEX_UNLOCK(lock_);
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
numberOfHosts_ <= sizeOfHosts_);
return; /* deleted */
}
@@ -529,7 +529,7 @@
HostEntry * host;
int i;
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
numberOfHosts_ <= sizeOfHosts_);
GE_ASSERT(ectx,
msg != NULL);
@@ -749,13 +749,13 @@
YES);
if (helo == NULL) {
EncName enc;
-
+
IF_GELOG(ectx,
GE_INFO | GE_USER | GE_BULK,
hash2enc(&signer->hashPubKey,
&enc));
GE_LOG(ectx,
- GE_INFO | GE_USER | GE_BULK,
+ GE_INFO | GE_USER | GE_BULK,
_("Signature failed verification: peer `%s' not known.\n"),
&enc);
return SYSERR;
@@ -1006,9 +1006,9 @@
if ( (0 != UNLINK(fn)) &&
(errno != ENOENT) )
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_BULK,
+ GE_WARNING | GE_USER | GE_BULK,
"unlink",
- fn);
+ fn);
} else {
trust = htonl(host->trust);
disk_file_write(ectx,
@@ -1058,7 +1058,7 @@
char *fn;
struct stat hostStat;
int hostFile;
-
+
fn = (char *) MALLOC(strlen(filename) + strlen(dirname) + 2);
sprintf(fn, "%s%s%s", dirname, DIR_SEPARATOR_STR, filename);
hostFile = disk_file_open(ectx,
@@ -1067,13 +1067,13 @@
if (hostFile != -1) {
if (FSTAT(hostFile, &hostStat) == 0) {
CLOSE(hostFile);
-
+
if (hostStat.st_mtime + (CRON_DISCARDS_HOSTS_AFTER / cronSECONDS) <
*((time_t *) now))
UNLINK(fn);
}
}
FREE(fn);
-
+
return OK;
}
@@ -1082,7 +1082,7 @@
*/
static void cronDiscardHosts(void *unused) {
time_t timeNow;
-
+
timeNow = time(NULL);
disk_directory_scan(ectx,
networkIdDirectory,
@@ -1129,7 +1129,7 @@
numberOfHosts_ = 0;
gnHome = NULL;
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
-1 != GC_get_configuration_value_filename(coreAPI->cfg,
"GNUNETD",
"GNUNETD_HOME",
Modified: GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c
===================================================================
--- GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/kvstore_sqlite/kv_sqlite.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -24,7 +24,7 @@
* @author Nils Durner
* @author Christian Grothoff
* @todo Indexes, statistics
- *
+ *
* Database: SQLite
*/
@@ -56,12 +56,12 @@
typedef struct {
/**
- * Native SQLite database handle - may not be shared between threads!
+ * Native SQLite database handle - may not be shared between threads!
*/
sqlite3 * dbh;
/**
- * Thread ID owning this handle
+ * Thread ID owning this handle
*/
struct PTHREAD * tid;
@@ -73,32 +73,32 @@
typedef struct {
/**
- * bytes used
+ * bytes used
*/
double payload;
- /**
- * name of the database
+ /**
+ * name of the database
*/
- char * name;
+ char * name;
/**
- * filename of this database
+ * filename of this database
*/
char * fn;
/**
- * List of open handles
+ * List of open handles
*/
- sqliteHandle ** handles;
+ sqliteHandle ** handles;
/**
* Open handles (one per thread)
*/
unsigned int handle_count;
-
+
unsigned int lastSync;
-
+
} sqliteDatabase;
static CoreAPIForApplication * coreAPI;
@@ -182,25 +182,25 @@
}
/**
- * Get path to database file
+ * Get path to database file
*/
static char * getDBFileName(const char * name) {
char * dir;
char * fn;
size_t mem;
-
+
GC_get_configuration_value_filename(coreAPI->cfg,
- "KEYVALUE_DATABASE",
+ "KEYVALUE_DATABASE",
"DIR",
VAR_DAEMON_DIRECTORY "/kvstore/",
&dir);
disk_directory_create(ectx, dir);
mem = strlen(dir) + strlen(name) + 6;
fn = MALLOC(mem);
- SNPRINTF(fn,
+ SNPRINTF(fn,
mem,
"%s/%s.dat",
- dir,
+ dir,
name);
FREE(dir);
return fn;
@@ -213,13 +213,13 @@
static sqliteDatabase * getDB(const char *name) {
unsigned int idx;
sqliteDatabase * db;
-
+
for (idx = 0; idx < databases; idx++)
if (0 == strcmp(dbs[idx]->name, name))
return dbs[idx];
db = MALLOC(sizeof(sqliteDatabase));
memset(db,
- 0,
+ 0,
sizeof(sqliteDatabase));
db->fn = getDBFileName(name);
db->name = STRDUP(name);
@@ -240,22 +240,22 @@
unsigned int idx;
sqliteHandle * dbh;
sqliteDatabase * db;
-
- MUTEX_LOCK(lock);
- db = getDB(name);
+
+ MUTEX_LOCK(lock);
+ db = getDB(name);
for (idx = 0; idx < db->handle_count; idx++)
if (PTHREAD_TEST_SELF(db->handles[idx]->tid)) {
- sqliteHandle * ret = db->handles[idx];
+ sqliteHandle * ret = db->handles[idx];
MUTEX_UNLOCK(lock);
return ret;
}
/* we haven't opened the DB for this thread yet */
dbh = MALLOC(sizeof(sqliteHandle));
dbh->tid = PTHREAD_GET_SELF();
- if (sqlite3_open(db->fn,
+ if (sqlite3_open(db->fn,
&dbh->dbh) != SQLITE_OK) {
printf("FN: %s\n", db->fn);
- LOG_SQLITE(dbh->dbh,
+ LOG_SQLITE(dbh->dbh,
GE_ERROR | GE_BULK | GE_USER,
"sqlite3_open");
sqlite3_close(dbh->dbh);
@@ -283,7 +283,7 @@
PTHREAD_REL_SELF(dbh->tid);
if (sqlite3_close(dbh->dbh) != SQLITE_OK)
LOG_SQLITE(dbh->dbh,
- LOG_ERROR,
+ LOG_ERROR,
"sqlite_close");
FREE(dbh);
}
@@ -298,11 +298,11 @@
/**
* @brief Delete the database.
*/
-static void dropDatabase(const char * name) {
- sqliteDatabase * db;
+static void dropDatabase(const char * name) {
+ sqliteDatabase * db;
unsigned int idx;
char * fn;
-
+
MUTEX_LOCK(lock);
for (idx = 0; idx < databases; idx++) {
if (0 == strcmp(dbs[idx]->name, name)) {
@@ -326,54 +326,54 @@
* @param table the name of the Key/Value-Table
* @return a handle
*/
-static KVHandle *getTable(const char *database,
+static KVHandle *getTable(const char *database,
const char *table) {
sqlite3_stmt *stmt;
unsigned int len;
KVHandle *ret;
sqliteHandle *dbh;
char *idx;
-
- dbh = getDBHandle(database);
+
+ dbh = getDBHandle(database);
if (dbh == NULL)
return NULL;
- sq_prepare(dbh,
+ sq_prepare(dbh,
"Select 1 from sqlite_master where tbl_name = ?",
&stmt);
len = strlen(table);
sqlite3_bind_text(stmt, 1, table, len, SQLITE_STATIC);
if (sqlite3_step(stmt) == SQLITE_DONE) {
char *create = malloc(len + 58);
-
+
sprintf(create,
- "CREATE TABLE %s (gn_key BLOB, gn_val BLOB, gn_age BIGINT)",
+ "CREATE TABLE %s (gn_key BLOB, gn_val BLOB, gn_age BIGINT)",
table);
-
+
if (sqlite3_exec(dbh->dbh, create, NULL, NULL, NULL) != SQLITE_OK)
{
LOG_SQLITE(dbh->dbh,
- LOG_ERROR,
+ LOG_ERROR,
"sqlite_create");
sqlite3_finalize(stmt);
free(create);
return NULL;
}
-
+
free(create);
}
- sqlite3_finalize(stmt);
+ sqlite3_finalize(stmt);
/* FIXME: more indexes */
idx = (char *) malloc(len + 34);
- sprintf(idx,
+ sprintf(idx,
"CREATE INDEX idx_key ON %s (gn_key)",
table);
sqlite3_exec(dbh->dbh, idx, NULL, NULL, NULL);
-
+
ret = MALLOC(sizeof(KVHandle));
ret->table = STRDUP(table);
ret->db = STRDUP(database);
-
+
return ret;
}
@@ -389,10 +389,10 @@
*/
static void *get(KVHandle *kv,
void *key,
- int keylen,
+ int keylen,
unsigned int sort,
- unsigned int limit,
- KVCallback handler,
+ unsigned int limit,
+ KVCallback handler,
void *closure) {
unsigned int len, enclen, retlen;
char *sel, *order, *where, limit_spec[30];
@@ -401,16 +401,16 @@
sqliteHandle *dbh;
unsigned char *key_enc;
void *ret_dec;
-
+
dbh = getDBHandle(kv->db);
if (dbh == NULL)
return NULL;
ret = NULL;
ret_dec = NULL;
-
- len = strlen(kv->table);
+
+ len = strlen(kv->table);
sel = MALLOC(len + 45);
-
+
if (key)
{
where = "WHERE gn_key = ?";
@@ -423,7 +423,7 @@
key_enc = NULL;
enclen = 0; /* make gcc happy */
}
-
+
switch(sort)
{
case 1:
@@ -436,19 +436,19 @@
order = "";
break;
}
-
+
if (limit != 0)
sprintf(limit_spec, "LIMIT %u", limit);
else
*limit_spec = 0;
-
+
sprintf(sel,
"SELECT gn_val FROM %s %s %s %s",
kv->table,
- where,
+ where,
order,
limit_spec);
-
+
sq_prepare(dbh, sel, &stmt);
if (key)
sqlite3_bind_blob(stmt, 1, key_enc, enclen, SQLITE_STATIC);
@@ -471,13 +471,13 @@
FREENONNULL(key_enc);
FREE(ret_dec);
sqlite3_finalize(stmt);
-
- return ret;
+
+ return ret;
}
- }
+ }
sqlite3_finalize(stmt);
FREE(sel);
- FREENONNULL(key_enc);
+ FREENONNULL(key_enc);
return ret_dec;
}
@@ -500,17 +500,17 @@
sqliteHandle *dbh;
unsigned char *key_enc, *val_enc;
unsigned int keyenc_len, valenc_len;
-
+
dbh = getDBHandle(kv->db);
if (dbh == NULL)
return SYSERR;
- len = strlen(kv->table);
+ len = strlen(kv->table);
ins = MALLOC(len + 68);
-
- sprintf(ins,
+
+ sprintf(ins,
"INSERT INTO %s(gn_key, gn_val, gn_age) values (?, ?, ?)",
kv->table);
-
+
key_enc = MALLOC(keylen * 2);
keyenc_len = sqlite_encode_binary(key, keylen, key_enc);
@@ -529,14 +529,14 @@
LOG_SQLITE(dbh->dbh,
LOG_ERROR,
"put");
- sqlite3_finalize(stmt);
+ sqlite3_finalize(stmt);
return SYSERR;
- }
+ }
sqlite3_finalize(stmt);
FREE(ins);
FREE(key_enc);
FREE(val_enc);
-
+
return OK;
}
@@ -561,22 +561,22 @@
if (dbh == NULL)
return SYSERR;
- len = strlen(kv->table);
+ len = strlen(kv->table);
del = MALLOC(len + 52);
bind = 1;
-
+
if (key)
key_where = "gn_key = ?";
else
key_where = "";
-
+
if (age)
age_where = "gn_age = ?";
else
age_where = "";
-
+
sprintf(del, "DELETE from %s where %s %s %s", kv->table, key_where, age ?
"or" : "", age_where);
-
+
keyenc = MALLOC(keylen * 2);
keyenc_len = sqlite_encode_binary(key, keylen, keyenc);
@@ -585,7 +585,7 @@
sqlite3_bind_blob(stmt, 1, keyenc, keyenc_len, SQLITE_STATIC);
bind++;
}
-
+
if (age)
sqlite3_bind_int64(stmt, bind, age);
@@ -596,14 +596,14 @@
LOG_SQLITE(dbh->dbh,
LOG_ERROR, "delete");
sqlite3_finalize(stmt);
-
- return SYSERR;
- }
+
+ return SYSERR;
+ }
sqlite3_finalize(stmt);
FREE(del);
FREE(keyenc);
-
- return OK;
+
+ return OK;
}
/**
@@ -636,11 +636,11 @@
FREE(drop);
LOG_SQLITE(dbh->dbh,
LOG_ERROR, "drop");
- sqlite3_finalize(stmt);
+ sqlite3_finalize(stmt);
return SYSERR;
- }
+ }
sqlite3_finalize(stmt);
- FREE(drop);
+ FREE(drop);
closeTable(kv);
return OK;
}
@@ -648,10 +648,10 @@
KVstore_ServiceAPI *
provide_module_kvstore_sqlite(CoreAPIForApplication * capi) {
static KVstore_ServiceAPI api;
-
+
ectx = capi->ectx;
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"KV-SQLite: initializing database\n");
#endif
@@ -674,8 +674,8 @@
void release_module_kvstore_sqlite() {
unsigned int idx;
- for (idx = 0; idx < databases; idx++)
- close_database(dbs[idx]);
+ for (idx = 0; idx < databases; idx++)
+ close_database(dbs[idx]);
GROW(dbs, databases, 0);
#if DEBUG_SQLITE
Modified: GNUnet/src/applications/kvstore_sqlite/kv_sqlitetest.c
===================================================================
--- GNUnet/src/applications/kvstore_sqlite/kv_sqlitetest.c 2006-10-21
19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/kvstore_sqlite/kv_sqlitetest.c 2006-10-21
19:58:30 UTC (rev 3530)
@@ -46,26 +46,26 @@
kv = api->getTable("TEST", "KV");
ASSERT(kv != NULL);
-
+
timeStmp = get_time();
ASSERT(api->put(kv, (void *) &k, sizeof(k), (void *) &v, sizeof(v),
timeStmp) == OK);
-
+
r = api->get(kv, (void *) &k, sizeof(k), 0, 0, NULL, NULL);
ASSERT(r != NULL);
ASSERT(memcmp(&v, r, sizeof(v)) == 0);
FREE(r);
-
+
ASSERT(api->del(kv, (void *) &k, sizeof(k), 0) == OK);
-
+
ASSERT(api->get(kv, (void *) &k, sizeof(k), 0, 0, NULL, NULL) == NULL);
-
+
ASSERT(api->dropTable(kv) == OK);
-
+
api->dropDatabase("TEST");
return OK;
-
+
FAILURE:
api->dropDatabase("TEST");
return SYSERR;
@@ -83,7 +83,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
cron = cron_create(NULL);
initCore(NULL,
Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/pingpong/pingpong.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -118,7 +118,7 @@
P2P_pingpong_MESSAGE * pmsg;
if (ntohs(msg->size) != sizeof(P2P_pingpong_MESSAGE) ) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER | GE_DEVELOPER,
_("Received malformed `%s' message. Dropping.\n"),
"ping");
@@ -130,22 +130,22 @@
if (0 != memcmp(coreAPI->myIdentity,
&pmsg->receiver,
sizeof(PeerIdentity))) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_ADMIN,
_("Received ping for another peer. Dropping.\n"));
return SYSERR; /* not for us */
}
-#if DEBUG_PINGPONG
+#if DEBUG_PINGPONG
EncName enc;
hash2enc(&sender->hashPubKey, &enc);
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"Received ping from peer %s.\n",
&enc);
#endif
-
+
pmsg->header.type = htons(p2p_PROTO_PONG);
if (stats != NULL)
stats->change(stat_pingReceived, 1);
@@ -180,13 +180,13 @@
static int plaintextPingReceived(const PeerIdentity * sender,
const MESSAGE_HEADER * hmsg,
TSession * tsession) {
-#if DEBUG_PINGPONG
+#if DEBUG_PINGPONG
EncName enc;
#endif
P2P_pingpong_MESSAGE * pmsg;
if (ntohs(hmsg->size) != sizeof(P2P_pingpong_MESSAGE) ) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER | GE_DEVELOPER,
_("Received malformed `%s' message. Dropping.\n"),
"ping");
@@ -202,14 +202,14 @@
return SYSERR; /* not for us */
}
-#if DEBUG_PINGPONG
+#if DEBUG_PINGPONG
hash2enc(&sender->hashPubKey, &enc);
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- "Received plaintext ping from peer %s.\n",
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Received plaintext ping from peer %s.\n",
&enc);
#endif
-
+
pmsg->header.type = htons(p2p_PROTO_PONG);
/* allow using a different transport for sending the reply, the
transport may have been uni-directional! */
@@ -308,7 +308,7 @@
(0 != memcmp(sender,
&pmsg->receiver,
sizeof(PeerIdentity)))) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER | GE_DEVELOPER,
_("Received malformed `%s' message. Dropping.\n"),
"pong");
@@ -344,7 +344,7 @@
matched);
#endif
if (matched == 0) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_ADMIN,
_("Could not match PONG against any PING. "
"Try increasing MAX_PING_PONG constant.\n"));
Modified: GNUnet/src/applications/rpc/parameters.c
===================================================================
--- GNUnet/src/applications/rpc/parameters.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/rpc/parameters.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -1,7 +1,7 @@
/*
This file is part of GNUnet
(C) 2004, 2005, 2006 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your
Modified: GNUnet/src/applications/rpc/parameterstest.c
===================================================================
--- GNUnet/src/applications/rpc/parameterstest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/rpc/parameterstest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -1,7 +1,7 @@
/*
This file is part of GNUnet
(C) 2004, 2005, 2006 Christian Grothoff (and other contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your
@@ -72,7 +72,7 @@
p = RPC_paramDeserialize(buf,
size);
FREE(buf);
- if (p == NULL)
+ if (p == NULL)
return 1;
buf = NULL;
if (OK != RPC_paramValueByName(p,
@@ -80,7 +80,7 @@
&len,
&buf))
return 1;
- if (strcmp("bar", buf) != 0)
+ if (strcmp("bar", buf) != 0)
return 1;
buf = NULL;
if (4 != len)
@@ -90,20 +90,20 @@
&len,
&buf))
return 1;
- if (strcmp("foo", buf) != 0)
+ if (strcmp("foo", buf) != 0)
return 1;
if (4 != len)
return 1;
if (SYSERR != RPC_paramValueByPosition(p,
2,
&len,
- &buf))
+ &buf))
return 1;
if (SYSERR != RPC_paramValueByName(p,
"not there",
&len,
- &buf))
+ &buf))
return 1;
RPC_paramFree(p);
Modified: GNUnet/src/applications/rpc/rpc.c
===================================================================
--- GNUnet/src/applications/rpc/rpc.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/rpc/rpc.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -1028,7 +1028,7 @@
/* Locate the CallInstance structure. */
call = vectorGetFirst(outgoingCalls);
while (call != NULL) {
- if ( (0 == memcmp(&call->receiver,
+ if ( (0 == memcmp(&call->receiver,
sender,
sizeof(PeerIdentity))) &&
(call->sequenceNumber == ntohl(res->sequenceNumber)) )
@@ -1116,7 +1116,7 @@
/* Locate the CallInstance structure. */
call = (CallInstance*) vectorGetFirst(incomingCalls);
while (call != NULL) {
- if ( (0 == memcmp(&call->receiver,
+ if ( (0 == memcmp(&call->receiver,
sender,
sizeof(PeerIdentity))) &&
(call->sequenceNumber == ntohl(ack->sequenceNumber)) )
@@ -1230,7 +1230,7 @@
call->finishedCallback = (RPCFinishedCallback) &RPC_execute_callback;
call->rpcCallbackArgs = &cls;
vectorInsertLast(outgoingCalls, call);
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
(get_time() + 1 * cronMINUTES > call->expirationTime) ||
(call->expirationTime - get_time() < 1 * cronHOURS) );
cron_add_job(coreAPI->cron,
@@ -1534,7 +1534,7 @@
RPC_Record * record;
struct SEMAPHORE * sign;
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"RPC testcase starting\n");
rpcAPI = capi->requestService("rpc");
Modified: GNUnet/src/applications/session/connect.c
===================================================================
--- GNUnet/src/applications/session/connect.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/session/connect.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -494,10 +494,10 @@
if ( (topology != NULL) &&
(topology->allowConnectionFrom(sender) == SYSERR) ) {
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_REQUEST,
+ GE_DEBUG | GE_USER | GE_REQUEST,
"Rejected session key from peer `%s'.\n",
&enc);
-
+
return SYSERR;
}
if (equalsHashCode512(&sender->hashPubKey,
@@ -560,7 +560,7 @@
}
#if DEBUG_SESSION
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
"Received setkey message with %u bytes of data and key `%s'.\n",
ntohs(sessionkeySigned->header.size),
@@ -583,7 +583,7 @@
size -= sizeof(P2P_setkey_MESSAGE);
plaintext = MALLOC(size);
#if DEBUG_SESSION
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_USER | GE_REQUEST,
"Decrypting %d bytes of PINGPONG with key `%s' and IV %u\n",
size,
@@ -774,7 +774,7 @@
= stats->create(gettext_noop("# sessions established"));
}
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_USER | GE_REQUEST,
_("`%s' registering handler %d (plaintext and ciphertext)\n"),
"session",
Modified: GNUnet/src/applications/session/sessiontest.c
===================================================================
--- GNUnet/src/applications/session/sessiontest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/session/sessiontest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -68,7 +68,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_PEERS
daemon1 = os_daemon_start(NULL,
Modified: GNUnet/src/applications/sqstore_mysql/mysql.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysql.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/sqstore_mysql/mysql.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -222,7 +222,7 @@
GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
_("Invalid data in %s. Trying to fix (by deletion).\n"),
_("mysql datastore"));
- SNPRINTF(scratch,
+ SNPRINTF(scratch,
512,
"DELETE FROM gn070 WHERE NOT ((LENGTH(hash)=%u) AND (size=%u +
LENGTH(value)))",
sizeof(HashCode512),
@@ -798,18 +798,18 @@
(datasize != size - sizeof(Datastore_Value)) ) {
char scratch[512];
- mysql_free_result(sql_res);
+ mysql_free_result(sql_res);
GE_LOG(ectx, GE_WARNING | GE_BULK | GE_USER,
_("Invalid data in %s. Trying to fix (by deletion).\n"),
_("mysql datastore"));
- SNPRINTF(scratch,
+ SNPRINTF(scratch,
512,
"DELETE FROM gn070 WHERE NOT ((LENGTH(hash)=%u) AND (size=%u +
LENGTH(value)))",
sizeof(HashCode512),
sizeof(Datastore_Value));
if (0 != mysql_query(dbh->dbf, scratch))
LOG_MYSQL(GE_ERROR | GE_ADMIN | GE_BULK, "mysql_query", dbh);
-
+
FREE(datum);
MUTEX_UNLOCK(dbh->DATABASE_Lock_);
return count;
@@ -1185,7 +1185,7 @@
#ifndef WINDOWS
pw = getpwuid(getuid());
if(!pw)
- GE_DIE_STRERROR(ectx,
+ GE_DIE_STRERROR(ectx,
GE_FATAL | GE_ADMIN | GE_IMMEDIATE,
"getpwuid");
home_dir = STRDUP(pw->pw_dir);
@@ -1195,8 +1195,8 @@
#endif
nX = strlen(home_dir)+10;
cnffile = MALLOC(nX);
- SNPRINTF(cnffile,
- nX,
+ SNPRINTF(cnffile,
+ nX,
"%s/.my.cnf",
home_dir);
FREE(home_dir);
@@ -1207,7 +1207,7 @@
&home_dir);
FREE(cnffile);
cnffile = home_dir;
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
_("Trying to use file `%s' for MySQL configuration.\n"),
cnffile);
Modified: GNUnet/src/applications/sqstore_mysql/mysqltest.c
===================================================================
--- GNUnet/src/applications/sqstore_mysql/mysqltest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/sqstore_mysql/mysqltest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -238,7 +238,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
cron = cron_create(NULL);
initCore(NULL,
Modified: GNUnet/src/applications/sqstore_sqlite/sqlite.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlite.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/sqstore_sqlite/sqlite.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -65,17 +65,17 @@
typedef struct {
/**
- * Native SQLite database handle - may not be shared between threads!
+ * Native SQLite database handle - may not be shared between threads!
*/
sqlite3 *dbh;
/**
- * Thread ID owning this handle
+ * Thread ID owning this handle
*/
struct PTHREAD * tid;
- /**
- * Precompiled SQL
+ /**
+ * Precompiled SQL
*/
sqlite3_stmt * exists;
@@ -92,27 +92,27 @@
typedef struct {
struct MUTEX * DATABASE_Lock_;
- /**
+ /**
* filename of this bucket
*/
char * fn;
-
+
/**
* bytes used
*/
double payload;
-
+
unsigned int lastSync;
-
+
/**
- * Open handles
+ * Open handles
*/
unsigned int handle_count;
-
+
/**
* List of open handles
*/
- sqliteHandle ** handles;
+ sqliteHandle ** handles;
} sqliteDatabase;
@@ -143,17 +143,17 @@
unsigned int idx;
sqliteHandle * ret;
sqlite3_stmt * stmt;
-
+
/* Is the DB already open? */
for (idx = 0; idx < db->handle_count; idx++)
- if (PTHREAD_TEST_SELF(db->handles[idx]->tid))
+ if (PTHREAD_TEST_SELF(db->handles[idx]->tid))
return db->handles[idx];
/* we haven't opened the DB for this thread yet */
ret = MALLOC(sizeof(sqliteHandle));
/* Open database and precompile statements */
if (sqlite3_open(db->fn, &ret->dbh) != SQLITE_OK) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Unable to initialize SQLite: %s.\n"),
sqlite3_errmsg(ret->dbh));
@@ -161,7 +161,7 @@
FREE(ret);
return NULL;
}
-
+
if (db->handle_count == 1) {
/* first open: create indices! */
sqlite3_exec(ret->dbh, "CREATE INDEX idx_hash ON gn070 (hash)",
@@ -175,12 +175,12 @@
sqlite3_exec(ret->dbh, "CREATE INDEX idx_comb2 ON gn070
(expire,prio,hash)",
NULL, NULL, NULL);
}
-
+
sqlite3_exec(ret->dbh, "PRAGMA temp_store=MEMORY", NULL, NULL, NULL);
sqlite3_exec(ret->dbh, "PRAGMA synchronous=OFF", NULL, NULL, NULL);
sqlite3_exec(ret->dbh, "PRAGMA count_changes=OFF", NULL, NULL, NULL);
sqlite3_exec(ret->dbh, "PRAGMA page_size=4096", NULL, NULL, NULL);
-
+
/* We have to do it here, because otherwise precompiling SQL might fail */
sq_prepare(ret->dbh,
"Select 1 from sqlite_master where tbl_name = 'gn070'",
@@ -205,14 +205,14 @@
}
}
sqlite3_finalize(stmt);
-
+
if ( (sq_prepare(ret->dbh,
"SELECT COUNT(*) FROM gn070 WHERE hash=?",
&ret->countContent) != SQLITE_OK) ||
(sq_prepare(ret->dbh,
"SELECT LENGTH(hash), LENGTH(value), size, type, prio,
anonLevel, expire "
"FROM gn070 WHERE hash=?",
- &ret->exists) != SQLITE_OK) ||
+ &ret->exists) != SQLITE_OK) ||
(sq_prepare(ret->dbh,
"UPDATE gn070 SET prio = prio + ? WHERE "
"hash = ? AND value = ? AND prio + ? < ?",
@@ -235,13 +235,13 @@
sqlite3_finalize(ret->insertContent);
FREE(ret);
return NULL;
- }
+ }
ret->tid = PTHREAD_GET_SELF();
-
+
MUTEX_LOCK(db->DATABASE_Lock_);
APPEND(db->handles,
db->handle_count,
- ret);
+ ret);
MUTEX_UNLOCK(db->DATABASE_Lock_);
return ret;
}
@@ -327,7 +327,7 @@
_("Invalid data in %s. Trying to fix (by deletion).\n"),
_("sqlite datastore"));
if (sq_prepare(dbh,
- "DELETE FROM gn070 WHERE NOT ((LENGTH(hash) = ?) AND (size =
LENGTH(value) + ?))",
+ "DELETE FROM gn070 WHERE NOT ((LENGTH(hash) = ?) AND (size =
LENGTH(value) + ?))",
&stmt) == SQLITE_OK) {
sqlite3_bind_int(stmt,
1,
@@ -339,7 +339,7 @@
sqlite3_finalize(stmt);
} else
LOG_SQLITE(handle,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"sq_prepare");
return NULL;
@@ -526,7 +526,7 @@
scratch,
&stmt) != SQLITE_OK) {
LOG_SQLITE(handle,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"sqlite3_prepare");
MUTEX_UNLOCK(db->DATABASE_Lock_);
return SYSERR;
@@ -578,8 +578,8 @@
stmt);
sqlite3_reset(stmt);
- if (datum == NULL)
- continue;
+ if (datum == NULL)
+ continue;
#if 0
printf("FOUND %4u prio %4u exp %20llu old: %4u, %20llu\n",
(ntohl(datum->value.size) - sizeof(Datastore_Value)),
@@ -652,11 +652,11 @@
static void sqlite_shutdown() {
unsigned int idx;
-
+
#if DEBUG_SQLITE
GE_LOG(getDBHandle(),
- ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: closing database\n");
#endif
if (! db)
@@ -724,7 +724,7 @@
#if DEBUG_SQLITE
EncName enc;
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(key,
&enc));
@@ -786,11 +786,11 @@
datum = assembleDatum(handle,
stmt);
- if (datum == NULL)
+ if (datum == NULL)
continue;
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Found in database block with type %u.\n",
ntohl(*(int*)&((&datum->value)[1])));
@@ -821,14 +821,14 @@
sqlite3_finalize(stmt);
} else
LOG_SQLITE(handle,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"sqlite_query");
MUTEX_UNLOCK(db->DATABASE_Lock_);
#if DEBUG_SQLITE
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: done reading content\n");
#endif
@@ -911,7 +911,7 @@
MUTEX_UNLOCK(db->DATABASE_Lock_);
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: done writing content\n");
#endif
@@ -1026,7 +1026,7 @@
if(n != SQLITE_DONE) {
LOG_SQLITE(dbh,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"sqlite_query");
MUTEX_UNLOCK(db->DATABASE_Lock_);
return SYSERR;
@@ -1035,7 +1035,7 @@
MUTEX_UNLOCK(db->DATABASE_Lock_);
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: %d block(s) deleted\n",
deleted);
@@ -1094,7 +1094,7 @@
MUTEX_UNLOCK(db->DATABASE_Lock_);
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: block updated\n");
#endif
@@ -1112,7 +1112,7 @@
ectx = capi->ectx;
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: initializing database\n");
#endif
@@ -1126,7 +1126,7 @@
afsdir = NULL;
if (0 != GC_get_configuration_value_filename(capi->cfg,
- "FS",
+ "FS",
"DIR",
VAR_DAEMON_DIRECTORY "/data/fs/",
&afsdir)) {
@@ -1156,19 +1156,19 @@
MUTEX_DESTROY(db->DATABASE_Lock_);
FREE(db->fn);
FREE(db);
- return NULL;
+ return NULL;
}
db->payload = getStat(dbh, "PAYLOAD");
if (db->payload == SYSERR) {
LOG_SQLITE(dbh,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"sqlite_payload");
MUTEX_DESTROY(db->DATABASE_Lock_);
FREE(db->fn);
FREE(db);
return NULL;
- }
+ }
coreAPI = capi;
stats = coreAPI->requestService("stats");
@@ -1195,7 +1195,7 @@
coreAPI->releaseService(stats);
sqlite_shutdown();
#if DEBUG_SQLITE
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SQLite: database shutdown\n");
#endif
Modified: GNUnet/src/applications/sqstore_sqlite/sqlitetest.c
===================================================================
--- GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/sqstore_sqlite/sqlitetest.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -223,7 +223,7 @@
api->drop();
return OK;
-
+
FAILURE:
api->drop();
return SYSERR;
@@ -241,7 +241,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
cron = cron_create(NULL);
initCore(NULL,
@@ -255,7 +255,7 @@
} else
ok = SYSERR;
doneCore();
- cron_destroy(cron);
+ cron_destroy(cron);
GC_free(cfg);
if (ok == SYSERR)
return 1;
Modified: GNUnet/src/applications/state/state.c
===================================================================
--- GNUnet/src/applications/state/state.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/state/state.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -237,7 +237,7 @@
return OK;
}
-State_ServiceAPI *
+State_ServiceAPI *
provide_module_state(CoreAPIForApplication * capi) {
static State_ServiceAPI api;
@@ -254,10 +254,10 @@
GE_ASSERT(capi->ectx, dbh != NULL);
n = strlen(dbh) + strlen(DIR_EXT) + 5;
handle = MALLOC(n);
- SNPRINTF(handle,
- n,
- "%s/%s/",
- dbh,
+ SNPRINTF(handle,
+ n,
+ "%s/%s/",
+ dbh,
DIR_EXT);
FREE(dbh);
if (SYSERR == disk_directory_create(capi->ectx,
Modified: GNUnet/src/applications/stats/clientapi.c
===================================================================
--- GNUnet/src/applications/stats/clientapi.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/stats/clientapi.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -168,8 +168,8 @@
/* printf("reading from socket starting %u of %d\n",
count, ntohl(statMsg->totalCounters) );*/
if (SYSERR == connection_read(sock,
- (MESSAGE_HEADER**)&statMsg))
- return SYSERR;
+ (MESSAGE_HEADER**)&statMsg))
+ return SYSERR;
if (ntohs(statMsg->header.size) < sizeof(CS_stats_reply_MESSAGE)) {
GE_BREAK(ectx, 0);
ret = SYSERR;
Modified: GNUnet/src/applications/stats/gnunet-stats.c
===================================================================
--- GNUnet/src/applications/stats/gnunet-stats.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/stats/gnunet-stats.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -90,8 +90,8 @@
COMMAND_LINE_OPTION_HELP(gettext_noop("Print statistics about GNUnet
operations.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
- { 'p', "protocols", NULL,
- gettext_noop("prints supported protocol messages"),
+ { 'p', "protocols", NULL,
+ gettext_noop("prints supported protocol messages"),
0, &gnunet_getopt_configure_set_option, "STATS:PRINT-PROTOCOLS=YES" },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
COMMAND_LINE_OPTION_END,
@@ -105,14 +105,14 @@
* @param argv command line arguments
* @return 0 ok, 1 on error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
int res;
struct ClientServerConnection * sock;
struct GC_Configuration * cfg;
struct GE_Context * ectx;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -128,7 +128,7 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
sock = client_connection_create(ectx,
cfg);
Modified: GNUnet/src/applications/stats/statistics.c
===================================================================
--- GNUnet/src/applications/stats/statistics.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/stats/statistics.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -215,13 +215,13 @@
}
static void immediateUpdates() {
- statSet(stat_handle_cpu_load,
+ statSet(stat_handle_cpu_load,
os_cpu_get_load(coreAPI->ectx,
coreAPI->cfg));
- statSet(stat_handle_network_load_up,
+ statSet(stat_handle_network_load_up,
os_network_monitor_get_load(coreAPI->load_monitor,
Upload));
- statSet(stat_handle_network_load_down,
+ statSet(stat_handle_network_load_down,
os_network_monitor_get_load(coreAPI->load_monitor,
Download));
statSet(stat_connected,
Modified: GNUnet/src/applications/tbench/gnunet-tbench.c
===================================================================
--- GNUnet/src/applications/tbench/gnunet-tbench.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/tbench/gnunet-tbench.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -63,7 +63,7 @@
static struct CommandLineOption gnunettbenchOptions[] = {
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
COMMAND_LINE_OPTION_HELP(gettext_noop("Start GNUnet transport benchmarking
tool.")), /* -h */
- { 'g', "gnuplot", NULL,
+ { 'g', "gnuplot", NULL,
gettext_noop("output in gnuplot format"), 0,
&gnunet_getopt_configure_set_one, &outputFormat },
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
@@ -101,7 +101,7 @@
* @param argv command line arguments
* @return return value from gnunetsearch: 0: ok, -1: error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
struct ClientServerConnection * sock;
CS_tbench_request_MESSAGE msg;
@@ -111,7 +111,7 @@
struct GE_Context * ectx;
struct GC_Configuration * cfg;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -127,7 +127,7 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
sock = client_connection_create(ectx,
cfg);
@@ -180,7 +180,7 @@
buffer = NULL;
if (OK == connection_read(sock,
(MESSAGE_HEADER**)&buffer)) {
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
ntohs(buffer->header.size) ==
sizeof(CS_tbench_reply_MESSAGE));
if ((float)buffer->mean_loss < 0){
Modified: GNUnet/src/applications/tbench/tbench.c
===================================================================
--- GNUnet/src/applications/tbench/tbench.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/tbench/tbench.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -151,7 +151,7 @@
GE_BREAK(ectx, 0);
return SYSERR;
}
- MUTEX_LOCK(lock);
+ MUTEX_LOCK(lock);
if ( (timeoutOccured == NO) &&
(postsem != NULL) &&
(htonl(pmsg->iterationNum) == currIteration) &&
@@ -165,7 +165,7 @@
earlyEnd = get_time();
} else {
res->duplicateCount++;
- }
+ }
}
#if DEBUG_TBENCH
GE_LOG(ectx,
@@ -177,7 +177,7 @@
#endif
} else {
#if DEBUG_TBENCH
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_BULK | GE_USER,
"Received message %u from iteration %u too late (now at iteration
%u)\n",
ntohl(pmsg->packetNum),
@@ -306,7 +306,7 @@
now = get_time();
p2p->packetNum = htonl(packetNum);
#if DEBUG_TBENCH
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_BULK | GE_USER,
"Sending message %u of size %u in iteration %u\n",
packetNum,
@@ -319,8 +319,8 @@
0); /* no delay */
if ( (delay != 0) &&
(htonl(msg->trainSize) != 0) &&
- (packetNum % htonl(msg->trainSize)) == 0)
- PTHREAD_SLEEP(delay);
+ (packetNum % htonl(msg->trainSize)) == 0)
+ PTHREAD_SLEEP(delay);
}
SEMAPHORE_DOWN(postsem, YES);
MUTEX_LOCK(lock);
@@ -334,7 +334,7 @@
}
MUTEX_UNLOCK(lock);
#if DEBUG_TBENCH
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_BULK | GE_USER,
"Done waiting for response.\n",
packetNum,
@@ -411,7 +411,7 @@
if (SYSERR == capi->registerClientHandler(CS_PROTO_tbench_REQUEST,
&csHandleTBenchRequest))
ok = SYSERR;
-
+
GE_ASSERT(capi->ectx,
0 == GC_set_configuration_value_string(capi->cfg,
capi->ectx,
Modified: GNUnet/src/applications/tbench/tbenchtest.c
===================================================================
--- GNUnet/src/applications/tbench/tbenchtest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/tbench/tbenchtest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -151,7 +151,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_PEERS
daemon1 = os_daemon_start(NULL,
@@ -219,7 +219,7 @@
ret = test(sock, i, 1+1024/i, 4, 10 * cronMILLIS, 2, 2 * cronSECONDS);
checkConnected(sock);
}
- ret = test(sock, 32768, 10, 10, 500 * cronMILLIS, 1, 10 * cronSECONDS);
+ ret = test(sock, 32768, 10, 10, 500 * cronMILLIS, 1, 10 * cronSECONDS);
connection_destroy(sock);
} else {
printf("Could not establish connection with peer.\n");
Modified: GNUnet/src/applications/tbench/tbenchtest_udp.c
===================================================================
--- GNUnet/src/applications/tbench/tbenchtest_udp.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/tbench/tbenchtest_udp.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -39,7 +39,7 @@
cron_t messageSpacing,
unsigned int messageTrainSize,
cron_t messageTimeOut /* in milli-seconds */) {
- PeerIdentity peer2;
+ PeerIdentity peer2;
int ret;
CS_tbench_request_MESSAGE msg;
CS_tbench_reply_MESSAGE * buffer;
@@ -150,7 +150,7 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
#if START_PEERS
daemon1 = os_daemon_start(NULL,
@@ -218,7 +218,7 @@
ret = test(sock, i, 1+1024/i, 4, 10 * cronMILLIS, 2, 2 * cronSECONDS);
checkConnected(sock);
}
- ret = test(sock, 32768, 10, 10, 500 * cronMILLIS, 1, 10 * cronSECONDS);
+ ret = test(sock, 32768, 10, 10, 500 * cronMILLIS, 1, 10 * cronSECONDS);
connection_destroy(sock);
} else {
printf("Could not establish connection with peer.\n");
Modified: GNUnet/src/applications/template/gnunet-template.c
===================================================================
--- GNUnet/src/applications/template/gnunet-template.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/template/gnunet-template.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -67,7 +67,7 @@
* @param argv command line arguments
* @return return value from gnunet-template: 0: ok, -1: error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
@@ -75,7 +75,7 @@
struct GE_Context * ectx;
struct GC_Configuration * cfg;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -91,7 +91,7 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
sock = client_connection_create(ectx,
@@ -108,7 +108,7 @@
128 * 1024);
if (messageReceiveThread == NULL) {
GE_DIE_STRERROR(ectx,
- GE_IMMEDIATE | GE_FATAL | GE_USER | GE_ADMIN,
+ GE_IMMEDIATE | GE_FATAL | GE_USER | GE_ADMIN,
"pthread_create");
}
Modified: GNUnet/src/applications/template/template.c
===================================================================
--- GNUnet/src/applications/template/template.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/template/template.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -57,7 +57,7 @@
client = NULL;
coreAPI = capi;
- GE_LOG(capi->ectx,
+ GE_LOG(capi->ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
_("`%s' registering client handler %d and %d\n"),
"template",
Modified: GNUnet/src/applications/testbed/testbed.c
===================================================================
--- GNUnet/src/applications/testbed/testbed.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/testbed/testbed.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -1352,7 +1352,7 @@
GE_ASSERT(ectx, SYSERR !=
capi->registerClientHandler(CS_PROTO_testbed_REQUEST,
(CSHandler)&csHandleTestbedRequest));
httpRegister("startup");
-
+
GE_ASSERT(capi->ectx,
0 == GC_set_configuration_value_string(capi->cfg,
capi->ectx,
Modified: GNUnet/src/applications/topology_default/topology.c
===================================================================
--- GNUnet/src/applications/topology_default/topology.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/topology_default/topology.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -133,7 +133,7 @@
void * data) {
IndexMatch * im = data;
- if (0 == memcmp(coreAPI->myIdentity,
+ if (0 == memcmp(coreAPI->myIdentity,
id,
sizeof(PeerIdentity)))
return;
@@ -396,7 +396,7 @@
uapi->updateModule("pingpong");
/* remove version stamp file from 0.7.0x,
- we have a global check for version, so
+ we have a global check for version, so
we do not need this one anymore;
this code can be removed in a few
versions (since it is just minor cleanup
Modified: GNUnet/src/applications/topology_f2f/topology.c
===================================================================
--- GNUnet/src/applications/topology_f2f/topology.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/topology_f2f/topology.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -107,7 +107,7 @@
sizeof(PeerIdentity))) )
return SYSERR; /* disallow connections to self */
for (i=friendCount-1;i>=0;i--)
- if (0 == memcmp(&friends[i],
+ if (0 == memcmp(&friends[i],
peer,
sizeof(PeerIdentity)))
return OK;
@@ -152,7 +152,7 @@
const unsigned short proto,
int confirmed,
IndexMatch * im) {
- if (0 == memcmp(coreAPI->myIdentity,
+ if (0 == memcmp(coreAPI->myIdentity,
id,
sizeof(PeerIdentity)))
return;
@@ -208,7 +208,7 @@
}
hash2enc(&indexMatch.match.hashPubKey,
&enc);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Topology: trying to connect to `%s'.\n",
&enc);
@@ -321,7 +321,7 @@
}
static int rereadConfiguration(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
@@ -384,7 +384,7 @@
friendCount+1);
friends[friendCount-1].hashPubKey = hc;
} else {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Syntax error in topology specification, skipping bytes
`%s'.\n"),
&enc);
@@ -400,7 +400,7 @@
Topology_ServiceAPI *
provide_module_topology_f2f(CoreAPIForApplication * capi) {
static Topology_ServiceAPI api;
-
+
coreAPI = capi;
ectx = capi->ectx;
identity = capi->requestService("identity");
@@ -435,7 +435,7 @@
pingpong = NULL;
return NULL;
}
-
+
cron_add_job(coreAPI->cron,
&cronCheckLiveness,
LIVE_SCAN_FREQUENCY,
Modified: GNUnet/src/applications/tracekit/gnunet-tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/gnunet-tracekit.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/tracekit/gnunet-tracekit.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -55,16 +55,16 @@
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
{ 'P', "priority", "PRIO",
- gettext_noop("use PRIO for the priority of the trace request"), 1,
+ gettext_noop("use PRIO for the priority of the trace request"), 1,
&gnunet_getopt_configure_set_option, "GNUNET-TRACEKIT:PRIORITY" },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
{ 'W', "wait", "DELAY",
- gettext_noop("wait DELAY seconds for replies"), 1,
+ gettext_noop("wait DELAY seconds for replies"), 1,
&gnunet_getopt_configure_set_option, "GNUNET-TRACEKIT:WAIT" },
COMMAND_LINE_OPTION_END,
};
-static unsigned int
+static unsigned int
getConfigurationInt(const char * sec,
const char * opt,
unsigned int max) {
@@ -105,7 +105,7 @@
prSize = 1;
peersResponding = MALLOC(prSize * sizeof(PeerIdentity));
buffer = MALLOC(MAX_BUFFER_SIZE);
- if (-1 ==
+ if (-1 ==
GC_get_configuration_value_number(cfg,
"GNUNET-TRACEKIT",
"FORMAT",
@@ -285,7 +285,7 @@
* @param argv command line arguments
* @return return value from gnunet-tracekit: 0: ok, -1: error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
@@ -295,7 +295,7 @@
struct GE_Context * ectx;
struct CronManager * cron;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -311,7 +311,7 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
sock = client_connection_create(ectx, cfg);
if (sock == NULL) {
@@ -345,7 +345,7 @@
0xFFFFFFFF));
if (SYSERR == connection_write(sock,
&probe.header)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("Could not send request to gnunetd.\n"));
return -1;
Modified: GNUnet/src/applications/tracekit/tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/tracekit.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/tracekit/tracekit.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -63,7 +63,7 @@
hostCount =
(ntohs(message->size)-sizeof(P2P_tracekit_reply_MESSAGE))/sizeof(PeerIdentity);
if (ntohs(message->size) !=
sizeof(P2P_tracekit_reply_MESSAGE)+hostCount*sizeof(PeerIdentity)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Received invalid `%s' message from `%s'.\n"),
"P2P_tracekit_probe_MESSAGE",
@@ -95,7 +95,7 @@
CS_tracekit_reply_MESSAGE * csReply;
idx = ntohl(reply->clientId);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: I am initiator, sending to client.\n");
if (idx >= clientCount) {
@@ -103,7 +103,7 @@
continue; /* discard */
}
if (clients[idx] == NULL) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: received response on slot %u, but client already
exited.\n",
idx);
@@ -129,7 +129,7 @@
hash2enc(&routeTable[i]->replyTo.hashPubKey,
&hop);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: forwarding to next hop `%s'\n",
&hop);
@@ -196,7 +196,7 @@
&sen);
if (ntohs(message->size) !=
sizeof(P2P_tracekit_probe_MESSAGE)) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("Received invalid `%s' message from `%s'.\n"),
"P2P_tracekit_probe_MESSAGE",
@@ -209,7 +209,7 @@
TIME(&now);
msg = (P2P_tracekit_probe_MESSAGE*) message;
if ((TIME_T)ntohl(msg->timestamp) > 3600 + now) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: probe has timestamp in the far future (%d > %d),
dropping\n",
ntohl(msg->timestamp),
@@ -227,7 +227,7 @@
0 == memcmp(&routeTable[i]->initiator.hashPubKey,
&msg->initiatorId.hashPubKey,
sizeof(HashCode512)) ) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT-PROBE %d from `%s' received twice (slot %d), ignored\n",
ntohl(msg->timestamp),
@@ -258,7 +258,7 @@
}
if (sel == -1) {
MUTEX_UNLOCK(lock);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_REQUEST | GE_USER,
_("TRACEKIT: routing table full, trace request dropped\n"));
return OK;
@@ -349,7 +349,7 @@
csProbe = (CS_tracekit_probe_MESSAGE*) message;
if (ntohs(csProbe->header.size) !=
sizeof(CS_tracekit_probe_MESSAGE) ) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_WARNING | GE_BULK | GE_USER,
_("TRACEKIT: received invalid `%s' message\n"),
"CS_tracekit_probe_MESSAGE");
@@ -377,7 +377,7 @@
}
clients[idx] = client;
MUTEX_UNLOCK(lock);
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: client joins in slot %u.\n",
idx);
@@ -408,7 +408,7 @@
MUTEX_LOCK(lock);
for (i=0;i<clientCount;i++)
if (clients[i] == c) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"TRACEKIT: client in slot %u exits.\n",
i);
Modified: GNUnet/src/applications/traffic/clientapi.c
===================================================================
--- GNUnet/src/applications/traffic/clientapi.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/traffic/clientapi.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -62,12 +62,12 @@
req.timePeriod
= htonl(timeframe);
if (SYSERR == connection_write(sock,
- &req.header))
- return SYSERR;
+ &req.header))
+ return SYSERR;
info = NULL;
if (SYSERR == connection_read(sock,
- (MESSAGE_HEADER**)&info))
- return SYSERR;
+ (MESSAGE_HEADER**)&info))
+ return SYSERR;
if ( (ntohs(info->header.type) !=
CS_PROTO_traffic_INFO) ||
(ntohs(info->header.size) !=
Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/applications/transport/transport.c 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -185,7 +185,7 @@
return NULL;
}
if (OK != tapis[prot]->connect(helo,
- &tsession))
+ &tsession))
return NULL;
tsession->ttype = prot;
return tsession;
@@ -238,7 +238,7 @@
(tsession->ttype >= tapis_count) ||
(tapis[tsession->ttype] == NULL) )
return SYSERR;
- return tapis[tsession->ttype]->associate(tsession);
+ return tapis[tsession->ttype]->associate(tsession);
}
/**
@@ -299,7 +299,7 @@
GE_BREAK(ectx, 0);
return SYSERR;
}
- return tapis[tsession->ttype]->disconnect(tsession);
+ return tapis[tsession->ttype]->disconnect(tsession);
}
/**
@@ -310,12 +310,12 @@
*/
static int transportVerifyHelo(const P2P_hello_MESSAGE * helo) {
unsigned short prot;
-
+
prot = ntohs(helo->protocol);
if ( (prot == NAT_PROTOCOL_NUMBER) &&
( (ntohs(helo->header.size) != P2P_hello_MESSAGE_size(helo)) ||
(ntohs(helo->header.type) != p2p_PROTO_hello) ) )
- return SYSERR; /* invalid */
+ return SYSERR; /* invalid */
if ( (ntohs(helo->protocol) >= tapis_count) ||
(tapis[prot] == NULL) )
return SYSERR; /* not supported */
@@ -501,8 +501,8 @@
ctapi.receive = mpp;
for (i=0;i<tapis_count;i++)
if (tapis[i] != NULL) {
- if (OK != tapis[i]->startTransportServer())
- unloadTransport(i);
+ if (OK != tapis[i]->startTransportServer())
+ unloadTransport(i);
}
}
@@ -683,8 +683,8 @@
int i;
forEachTransport(&doneHelper, NULL);
- for (i=0;i<tapis_count;i++)
- if (tapis[i] != NULL)
+ for (i=0;i<tapis_count;i++)
+ if (tapis[i] != NULL)
unloadTransport(i);
MUTEX_DESTROY(tapis_lock);
tapis_lock = NULL;
Modified: GNUnet/src/applications/vpn/gnunet-vpn.c
===================================================================
--- GNUnet/src/applications/vpn/gnunet-vpn.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/applications/vpn/gnunet-vpn.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -53,7 +53,7 @@
COMMAND_LINE_OPTION_HELP(gettext_noop("Print statistics about GNUnet
operations.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
- { 's', "silent", NULL,
+ { 's', "silent", NULL,
gettext_noop("Suppress display of asynchronous log messages"),
0, &gnunet_getopt_configure_set_one, &silent },
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
@@ -64,7 +64,7 @@
struct ClientServerConnection * sock = arg;
char buffer[MAX_BUFFER_SIZE];
MESSAGE_HEADER * bufp = buf;
-
+
/* buffer = MALLOC(MAX_BUFFER_SIZE); */
while (OK == connection_read(sock, &bufp)) {
switch (ntohs(buf->type)) {
@@ -117,7 +117,7 @@
* @param argv command line arguments
* @return return value from gnunet-template: 0: ok, -1: error
*/
-int main(int argc,
+int main(int argc,
const char ** argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
@@ -127,7 +127,7 @@
struct GC_Configuration * cfg;
struct GE_Context * ectx;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -143,7 +143,7 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
sock = client_connection_create(ectx,
cfg);
Modified: GNUnet/src/applications/vpn/vpn.c
===================================================================
--- GNUnet/src/applications/vpn/vpn.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/applications/vpn/vpn.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -23,7 +23,7 @@
* @author Michael John Wensley
* @brief tunnel RFC 4193 in GNUnet
*
- *
+ *
* http://gnunet.wensley.org.uk/
*
* Yes this will thoroughly break most of the coding guidelines :-/ at least
the first release.
@@ -45,7 +45,7 @@
* CHANGELOG:
* 20060110 Change ifconfig/route to ioctl's
* 20060111 P2P packet includes length of the header.
- * 20060802 Logging for multiple clients
+ * 20060802 Logging for multiple clients
*/
#include "platform.h"
@@ -148,7 +148,7 @@
static int running = 0;
static int admin_fd;
-/**
+/**
* Routing goes like this. Gather routes from all peers and put them in
prototype store.
* Only store lowest hop count if get multiple of the same public key from the
same peer.
*
@@ -272,7 +272,7 @@
return YES;
}
-/**
+/**
* clear out the prototype routes table
* called at start or when we know a peer changes its route table.
*/
@@ -292,7 +292,7 @@
route_store->owner = *(identity->getPublicPrivateKey()); /* us! */
}
-/**
+/**
* clear out the actual route at startup only
*/
static void init_realised() {
@@ -341,14 +341,14 @@
rcapacity = route_entries * sizeof(route_info);
if (rcapacity > route_capacity) {
rstore = REALLOC(route_store, rcapacity);
- if (rstore == NULL) {
+ if (rstore == NULL) {
route_entries--;
return; /* not enough ram, we will have to drop this
route. */
}
route_capacity = rcapacity;
route_store = rstore;
}
- /*
+ /*
* we really should keep the route table in ascending hop count order...
*/
if (route_entries > 0) {
@@ -500,7 +500,7 @@
*/
/* we know its going to be ipv6 cause the version tells us.
- * except that linux *assumes* it will be sent IPv4 frames
+ * except that linux *assumes* it will be sent IPv4 frames
* unless we configure IFF_PI.... hmmmm.... :-/
* lets see the tun linux module source
*
@@ -514,7 +514,7 @@
do {
used = 0;
for (i = 0; i < entries1; i++) {
- if ((store1+i)->id == id) {
+ if ((store1+i)->id == id) {
GE_LOG(ectx, GE_DEBUG | GE_DEVELOPER |
GE_REQUEST, _("RFC4193 Create skips gnu%d as we are already using it\n"), id);
id++;
used = 1;
@@ -630,8 +630,8 @@
}
/**
- * See if we already got a TUN/TAP open for the given GNUnet peer. if not,
make one, stick
- * PeerIdentity and the filehandle and name of the TUN/TAP in an array so we
remember we did it.
+ * See if we already got a TUN/TAP open for the given GNUnet peer. if not,
make one, stick
+ * PeerIdentity and the filehandle and name of the TUN/TAP in an array so we
remember we did it.
*/
static void checkensure_peer(const PeerIdentity *them, void *callerinfo) {
int i;
@@ -744,7 +744,7 @@
&tmp[0],
MAXSIG_BUF))
GE_LOG_STRERROR(ectx,
- GE_WARNING | GE_BULK | GE_USER,
+ GE_WARNING | GE_BULK | GE_USER,
"vpn could not read from exit control
pipe\n");
}
MUTEX_LOCK(lock);
@@ -840,7 +840,7 @@
tp->proto = htons(ETH_P_IP);
GE_LOG(ectx, GE_DEBUG | GE_DEVELOPER |
GE_REQUEST, _("VPN Received, not anonymous, drop.\n"));
return OK;
- default:
+ default:
GE_LOG(ectx, GE_ERROR | GE_BULK | GE_USER,
_("VPN Received unknown IP version %d...\n"), ((struct iphdr*)fp)->version);
return OK;
}
@@ -938,7 +938,7 @@
if (isEqual(sender, &((store1+i)->peer))) {
(store1+i)->active = YES;
VLOG _("Inserting with hops %d\n"),
ntohl( ((transit_route*)(gp+1))->hops));
- add_route( &(
((transit_route*)(gp+1))->owner ),
+ add_route( &(
((transit_route*)(gp+1))->owner ),
1 + ntohl(
((transit_route*)(gp+1))->hops),
i);
if ((store1+i)->route_entry <
GNUNET_VIEW_LIMIT) {
@@ -1186,8 +1186,8 @@
for (i = 0; i < entries1; i++) {
id2ip(c, &(store1+i)->peer);
cprintf(c, CS_PROTO_VPN_REPLY, "::/48 gnu%d active=%s
routeentry=%d\n",
- (store1+i)->id,
- (store1+i)->active ? _("Yes") : _("No"),
+ (store1+i)->id,
+ (store1+i)->active ? _("Yes") : _("No"),
(store1+i)->route_entry);
}
cprintf(c, CS_PROTO_VPN_TUNNELS, "%d Tunnels\n", entries1);
@@ -1300,7 +1300,7 @@
/* req route level 0
rgp = MALLOC(sizeof(MESSAGE_HEADER) +
sizeof(int));
- if (rgp != NULL) {
+ if (rgp != NULL) {
rgp->type =
htons(P2P_PROTO_aip_GETROUTE);
rgp->size =
htons(sizeof(MESSAGE_HEADER) + sizeof(int));
*((int*)(rgp+1)) = 0;
@@ -1335,8 +1335,8 @@
static int makeNonblocking(int handle) {
#if MINGW
u_long l = 1;
- if (ioctlsocket(handle,
- FIONBIO,
+ if (ioctlsocket(handle,
+ FIONBIO,
&l) == SOCKET_ERROR) {
SetErrnoFromWinsockError(WSAGetLastError());
return SYSERR;
@@ -1502,7 +1502,7 @@
/* bye bye TUNTAP ... */
for (i = 0; i < entries1; i++) {
if (((store1+i)->fd) != 0) {
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_DEVELOPER | GE_REQUEST,
_("RFC4193 Closing tunnel %d fd %d\n"), i,
(store1+i)->fd);
close((store1+i)->fd);
Modified: GNUnet/src/include/gnunet_blockstore.h
===================================================================
--- GNUnet/src/include/gnunet_blockstore.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_blockstore.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -85,7 +85,7 @@
/**
* Do a quick test if we MAY have the content.
- */
+ */
int (*fast_get)(const HashCode512 * key);
/**
Modified: GNUnet/src/include/gnunet_datastore_service.h
===================================================================
--- GNUnet/src/include/gnunet_datastore_service.h 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/include/gnunet_datastore_service.h 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -181,7 +181,7 @@
/**
* Do a quick test if we MAY have the content.
- */
+ */
int (*fast_get)(const HashCode512 * key);
/**
Modified: GNUnet/src/include/gnunet_ecrs_lib.h
===================================================================
--- GNUnet/src/include/gnunet_ecrs_lib.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_ecrs_lib.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -315,7 +315,7 @@
* @return an ECRS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct ECRS_URI *
+struct ECRS_URI *
ECRS_parseCharKeywordURI(struct GE_Context * ectx,
const char * keywords); /* helper.c */
@@ -327,7 +327,7 @@
* @return an ECRS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct ECRS_URI *
+struct ECRS_URI *
ECRS_parseArgvKeywordURI(struct GE_Context * ectx,
unsigned int argc,
const char ** argv); /* helper.c */
@@ -340,7 +340,7 @@
* @return an ECRS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct ECRS_URI *
+struct ECRS_URI *
ECRS_parseListKeywordURI(struct GE_Context * ectx,
unsigned int num_keywords,
const char ** keywords);
Modified: GNUnet/src/include/gnunet_fsui_lib.h
===================================================================
--- GNUnet/src/include/gnunet_fsui_lib.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_fsui_lib.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -33,7 +33,7 @@
* with the GUI library to display updates).<p>
*
* After creating a FSUI_Context with FSUI_start the UI can start,
- * abort and stop uploads, downloads, deletions or searches.
+ * abort and stop uploads, downloads, deletions or searches.
* The FSUI_Context can be destroyed, when it is created again
* the next time all pending operations are resumed (!).
* Clients can use the various iterator functions to obtain
@@ -62,9 +62,9 @@
* Either, the client receives an "error" (something went wrong)
* or "completed" (action finished) event. Alternatively, the
* client may call abortXXX" which will result in an "aborted"
- * event. In either case, the event itself will NOT result in
+ * event. In either case, the event itself will NOT result in
* the memory being released by FSUI -- the client must still
- * call "FSUI_stopXXX" explicitly. Clients that call
+ * call "FSUI_stopXXX" explicitly. Clients that call
* "FSUI_stopXXX" before an aborted, error or completed event
* will be blocked until either of the three events happens.<p>
*
@@ -111,7 +111,7 @@
/**
* @brief types of FSUI events.
- *
+ *
* For the types aborted, error, suspending and complete,
* the client MUST free the "cctx" context associated with
* the event (if allocated). This context is created
@@ -166,21 +166,21 @@
* and client context for the parent download.
*/
typedef struct {
-
+
/**
* What file in the download tree are we
* refering to?
*/
struct FSUI_DownloadList * pos;
-
+
void * cctx;
-
+
/**
* What is our parent download in the download tree?
* NULL if this is the top-level download.
*/
struct FSUI_DownloadList * ppos;
-
+
void * pcctx;
} FSUI_DownloadContext;
@@ -192,21 +192,21 @@
* refering to?
*/
struct FSUI_UploadList * pos;
-
+
void * cctx;
-
+
/**
* What is our parent upload in the upload tree?
* NULL if this is the top-level upload.
*/
struct FSUI_UploadList * ppos;
-
+
void * pcctx;
} FSUI_UploadContext;
typedef struct {
-
+
struct FSUI_SearchList * pos;
void * cctx;
@@ -261,7 +261,7 @@
struct {
FSUI_SearchContext sc;
-
+
const char * message;
} SearchError;
@@ -299,7 +299,7 @@
struct {
FSUI_SearchContext sc;
-
+
} SearchStopped;
@@ -640,13 +640,13 @@
struct {
FSUI_UnindexContext uc;
-
+
unsigned long long total;
unsigned long long completed;
cron_t eta;
-
+
const char * filename;
} UnindexResumed;
@@ -654,9 +654,9 @@
struct {
FSUI_UnindexContext uc;
-
+
unsigned long long total;
-
+
const char * filename;
} UnindexStarted;
@@ -665,10 +665,10 @@
struct {
FSUI_UnindexContext uc;
-
+
const char * message;
- } UnindexError;
+ } UnindexError;
} data;
@@ -724,7 +724,7 @@
* @param closure extra argument to cb
* @return NULL on error
*/
-struct FSUI_Context *
+struct FSUI_Context *
FSUI_start(struct GE_Context * ectx,
struct GC_Configuration * cfg,
const char * name,
@@ -816,14 +816,14 @@
/**
* Start uploading a file or directory.
*
- * @param ctx
+ * @param ctx
* @param filename name of file or directory to upload (directory
* implies use of recursion)
* @param doIndex use indexing, not insertion
* @param doExtract use libextractor
* @param individualKeywords add KBlocks for non-top-level files
* @param topLevelMetaData metadata for top-level file or directory
- * @param globalURI keywords for all files
+ * @param globalURI keywords for all files
* @param keyURI keywords for top-level file
* @return NULL on error
*/
@@ -882,7 +882,7 @@
/**
- * Stop an unindex operation.
+ * Stop an unindex operation.
*
* @return SYSERR on error
*/
Modified: GNUnet/src/include/gnunet_kvstore_service.h
===================================================================
--- GNUnet/src/include/gnunet_kvstore_service.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_kvstore_service.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -92,7 +92,7 @@
*/
int (* put)(KVHandle *kv, void *key, int keylen, void *val, int vallen,
unsigned long long age);
-
+
/**
* @brief Delete values from a Key/Value-Table
* @param key key to delete (may be NULL)
@@ -101,7 +101,7 @@
* @return OK on success, SYSERR otherwise
*/
int (* del)(KVHandle *kv, void *key, int keylen, unsigned long long age);
-
+
/**
* @brief Close a handle to a Key/Value-Table
* @param kv the handle to close
@@ -114,7 +114,7 @@
* @return OK on success, SYSERR otherwise
*/
int (* dropTable)(KVHandle *kv);
-
+
/**
* @brief Delete the database.
*/
Modified: GNUnet/src/include/gnunet_setup_lib.h
===================================================================
--- GNUnet/src/include/gnunet_setup_lib.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_setup_lib.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -61,14 +61,14 @@
} GNS_Type;
/**
- * @brief configuration value
+ * @brief configuration value
*
* A configuration value does not only specify a value
* but also the legal range of values.
*/
typedef union {
- struct {
+ struct {
int val;
int def;
@@ -89,9 +89,9 @@
struct {
/**
* 0-terminated string, never NULL
- */
+ */
char * val;
-
+
char * def;
/**
@@ -116,7 +116,7 @@
* attribute, but not the overall tree structure.
*/
typedef struct GNS_Tree {
-
+
/**
* Section for this node (maybe NULL)
*/
@@ -156,7 +156,7 @@
/**
* Value for this node (type of pointer is determined
* by the type field)
- */
+ */
GNS_Value value;
} GNS_Tree;
@@ -168,8 +168,8 @@
/**
* Start the setup process by loading a scheme file that
- * contains the configuration specification.
- *
+ * contains the configuration specification.
+ *
* @param ectx for error reporting
* @param cfg configuration values that have a known initial value
* @param specification name of the guile file containing the spec
@@ -194,7 +194,7 @@
/**
* Free resources associated with the GNS context.
*/
-void
+void
GNS_free_specification(struct GNS_Context * ctx);
/**
@@ -211,7 +211,7 @@
*
* @param listener callback to call whenever the tree changes
*/
-void
+void
GNS_register_tree_change_listener(struct GNS_Context * ctx,
GNS_TreeChangeListener listener,
void * cls);
@@ -220,7 +220,7 @@
* Release a tree change listener from GNS (do not call the listener
* in the future for change events).
*/
-void
+void
GNS_unregister_tree_change_listener(struct GNS_Context * ctx,
GNS_TreeChangeListener listener,
void * cls);
Modified: GNUnet/src/include/gnunet_state_service.h
===================================================================
--- GNUnet/src/include/gnunet_state_service.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_state_service.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -51,7 +51,7 @@
int (*read)(struct GE_Context * ectx,
const char * name,
void ** result);
-
+
/**
* Append content to file.
*
@@ -64,7 +64,7 @@
const char * name,
int len,
const void * block);
-
+
/**
* Write content to a file.
*
@@ -77,7 +77,7 @@
const char * name,
int len,
const void * block);
-
+
/**
* Free space in the database by removing one file
* @param name the hashcode representing the name of the file
Modified: GNUnet/src/include/gnunet_transport.h
===================================================================
--- GNUnet/src/include/gnunet_transport.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_transport.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -263,7 +263,7 @@
* or the hello_message from connect)
* @param msg the message
* @param size the size of the message, <= mtu
- * @param important YES if message is important (i.e. grow
+ * @param important YES if message is important (i.e. grow
* buffers to queue if needed)
* @return SYSERR on error, NO on temporary error (retry),
* YES/OK on success; after any persistent error,
Modified: GNUnet/src/include/gnunet_uritrack_lib.h
===================================================================
--- GNUnet/src/include/gnunet_uritrack_lib.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_uritrack_lib.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -72,8 +72,8 @@
/**
* List all URIs.
- *
- * @param need_metadata YES if metadata should be
+ *
+ * @param need_metadata YES if metadata should be
* provided, NO if metadata is not needed (faster)
*/
int URITRACK_listURIs(struct GE_Context * ectx,
Modified: GNUnet/src/include/gnunet_util_config.h
===================================================================
--- GNUnet/src/include/gnunet_util_config.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_config.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -51,7 +51,7 @@
* Note that for setting options a different context can be
* used (since failing to change an option may have to be reported
* in a fundamentally different way to the user).
- *
+ *
* @param ectx may be NULL, in that case errors will no longer
* be reported
*/
@@ -195,7 +195,7 @@
/**
* Set a configuration value that should be in a set of
- * predefined strings.
+ * predefined strings.
* @param value
* @return 0 on success, -1 on error (i.e. out of memory,
* or update refused by registered callback)
@@ -216,18 +216,18 @@
* refused
*/
typedef int (*GC_ChangeListener)(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option);
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.<p>
*
* TODO: also call callback on existing configuration and confirm
* existing configuration is OK! If not, return error!
- *
+ *
* @return 0 on success, -1 on error
*/
int GC_attach_change_listener(struct GC_Configuration * cfg,
@@ -235,7 +235,7 @@
void * ctx);
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.
* @return 0 on success, -1 on error, 1 for no such handler registered
*/
Modified: GNUnet/src/include/gnunet_util_config_impl.h
===================================================================
--- GNUnet/src/include/gnunet_util_config_impl.h 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/include/gnunet_util_config_impl.h 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -56,7 +56,7 @@
* Note that for setting options a different context can be
* used (since failing to change an option may have to be reported
* in a fundamentally different way to the user).
- *
+ *
* @parm ectx maybe NULL, in that case errors will no longer
* be reported
*/
@@ -98,7 +98,7 @@
char * (*configuration_expand_dollar)(struct GC_Configuration * cfg,
const char * section,
char * old);
-
+
/**
* Get a configuration value that should be a number.
* @param min minimal legal value
@@ -113,8 +113,8 @@
unsigned long long max,
unsigned long long def,
unsigned long long * number);
-
+
/**
* Get a configuration value that should be a string.
* @param default default value (use indicated by return value;
@@ -142,7 +142,7 @@
const char * option,
const char * def,
char ** value);
-
+
/**
* Get a configuration value that should be in a set of
* predefined strings
@@ -160,7 +160,7 @@
const char ** choices,
const char * def,
const char ** value);
-
+
/**
* Set a configuration value that should be a number.
* @return 0 on success, -1 on error (i.e. out of memory,
@@ -171,8 +171,8 @@
const char * section,
const char * option,
unsigned long long number);
-
-
+
+
/**
* Set a configuration value that should be a string.
* @param value
@@ -184,10 +184,10 @@
const char * section,
const char * option,
const char * value);
-
+
/**
* Set a configuration value that should be in a set of
- * predefined strings.
+ * predefined strings.
* @param value
* @return 0 on success, -1 on error (i.e. out of memory,
* or update refused by registered callback)
@@ -199,7 +199,7 @@
const char * choice);
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.
* @return 0 on success, -1 on error
*/
@@ -208,16 +208,16 @@
void * ctx);
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.
* @return 0 on success, -1 on error, 1 for no such handler registered
*/
int (*detach_change_listener)(struct GC_Configuration * cfg,
GC_ChangeListener callback,
void * ctx);
-
+
} GC_Configuration;
-
+
/**
* Create a GC_Configuration (C implementation).
*/
Modified: GNUnet/src/include/gnunet_util_containers.h
===================================================================
--- GNUnet/src/include/gnunet_util_containers.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_containers.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -315,12 +315,12 @@
* @param value the value associated with the key
* @return 0 if successful, -1 if an error was encountered
*/
-int ht_put(struct HashTable *hashTable,
- const void *key,
+int ht_put(struct HashTable *hashTable,
+ const void *key,
const unsigned int keylen,
- void *value,
+ void *value,
const unsigned int valuelen);
-
+
/**
* @brief retrieves the value of a key in a HashTable
* @param hashTable the HashTable to search
@@ -329,10 +329,10 @@
* @param valuelen the length of the value
* @return YES if found, NO otherwise
*/
-int ht_get(const struct HashTable *hashTable,
- const void *key,
- const unsigned int keylen,
- void **value,
+int ht_get(const struct HashTable *hashTable,
+ const void *key,
+ const unsigned int keylen,
+ void **value,
unsigned int *valuelen);
/**
@@ -340,7 +340,7 @@
* @param hashTable the HashTable to remove the key/value pair from
* @param key the key specifying the key/value pair to be removed
*/
-void ht_remove(struct HashTable *hashTable,
+void ht_remove(struct HashTable *hashTable,
const void *key,
const unsigned int keylen);
@@ -378,7 +378,7 @@
* specified, an appropriate number of buckets is
* automatically calculated.
*/
-void ht_rehash(struct HashTable *hashTable,
+void ht_rehash(struct HashTable *hashTable,
long numOfBuckets);
/**
@@ -407,9 +407,9 @@
* is considered unacceptably high, a value of 0.0 can
* be specified.
*/
-void ht_setIdealRatio(struct HashTable *hashTable,
+void ht_setIdealRatio(struct HashTable *hashTable,
float idealRatio,
- float lowerRehashThreshold,
+ float lowerRehashThreshold,
float upperRehashThreshold);
#define HT_PUT(ht, key, val) ht_put(ht, key, sizeof(key), val, sizeof(val))
Modified: GNUnet/src/include/gnunet_util_disk.h
===================================================================
--- GNUnet/src/include/gnunet_util_disk.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_disk.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -54,8 +54,8 @@
/**
* Check that fil corresponds to a filename
* (of a file that exists and that is not a directory).
- *
- * @returns YES if yes, NO if not a file, SYSERR if something
+ *
+ * @returns YES if yes, NO if not a file, SYSERR if something
* else (will print an error message in that case, too).
*/
int disk_file_test(struct GE_Context * ectx,
@@ -81,8 +81,8 @@
* @return file handle, -1 on error
*/
int disk_file_open(struct GE_Context * ectx,
- const char * filename,
- int oflag,
+ const char * filename,
+ int oflag,
...);
/**
Modified: GNUnet/src/include/gnunet_util_error.h
===================================================================
--- GNUnet/src/include/gnunet_util_error.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_error.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -77,7 +77,7 @@
GE_KIND kind,
const char * message,
...);
-
+
/**
* @brief Get user confirmation (e.g. before the app shuts down and closes the
* error message
@@ -113,13 +113,13 @@
* to be passed to this handler
* @param liberator callback to free ctx, maybe NULL
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_callback(GE_KIND mask,
GE_LogHandler handler,
void * ctx,
GE_CtxFree liberator,
GE_Confirm confirm);
-
+
/**
* Free a log context.
*/
@@ -136,7 +136,7 @@
GE_KIND mask);
/**
- * Would an event of this kind be possibly
+ * Would an event of this kind be possibly
* processed by the logger?
*
* @param ctx the logger
@@ -162,14 +162,14 @@
* Create a context that sends events to two other contexts.
* Note that the client must stop using ctx1/ctx2 henceforth.
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_multiplexer(struct GE_Context * ctx1,
struct GE_Context * ctx2);
/**
* If this context would log an event of the given kind,
* execute statement "a".
- */
+ */
#define IF_GELOG(ctx, kind, a) do { if (GE_isLogged(ctx, kind)) { a; } }
while(0);
#define GE_ASSERT(ctx, cond) do { if (! (cond)) { GE_LOG(ctx, GE_DEVELOPER |
GE_USER | GE_FATAL | GE_IMMEDIATE, _("Assertion failed at %s:%d in %s.\n"),
__FILE__, __LINE__, __FUNCTION__); GE_CONFIRM(ctx); abort(); } } while(0);
Modified: GNUnet/src/include/gnunet_util_error_loggers.h
===================================================================
--- GNUnet/src/include/gnunet_util_error_loggers.h 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/include/gnunet_util_error_loggers.h 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -42,7 +42,7 @@
/**
* Create a logger that writes events to a file.
- *
+ *
* @param ectx where to log errors in the logger
* @param mask which events should be logged?
* @param filename which file should we log to?
@@ -51,7 +51,7 @@
* value specifies after how many days logs should be deleted)
* (use 0 for no rotation)
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_logfile(struct GE_Context * ectx,
GE_KIND mask,
const char * filename,
@@ -61,19 +61,19 @@
/**
* Create a logger that writes events to stderr
- *
+ *
* @param mask which events should be logged?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_stderr(int logDate,
GE_KIND mask);
/**
* Create a logger that writes events to stderr
- *
+ *
* @param mask which events should be logged?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_stdout(int logDate,
GE_KIND mask);
@@ -81,11 +81,11 @@
* Create a logger that keeps events in memory (to be
* queried later in bulk).
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_memory(GE_KIND mask,
struct GE_Memory * memory);
-#if FICTION
+#if FICTION
/**
* @param ectx where to log errors in the logger
* @param address e-mail address to send the logs to
@@ -95,7 +95,7 @@
* @param bulkSize for GE_BULK messages, how many lines of messages
* should be accumulated before an e-mail is transmitted?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_email(struct GE_Context * ectx,
GE_KIND mask,
const char * address,
@@ -111,12 +111,12 @@
* log messages of an operation to provide the
* final error in bulk to the client (i.e. as
* a return value, possibly over the network).
- *
+ *
* @param maxSize the maximum number of messages to keep, 0 for unbounded
* (if more than maxSize messages are received, message number maxSize
* will be set to a corresponding warning)
*/
-struct GE_Memory *
+struct GE_Memory *
GE_create_memory(unsigned int maxSize);
/**
Modified: GNUnet/src/include/gnunet_util_getopt.h
===================================================================
--- GNUnet/src/include/gnunet_util_getopt.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_getopt.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -46,7 +46,7 @@
* Name of the application
*/
const char * binaryName;
-
+
/**
* Array with all command line options.
*/
@@ -85,9 +85,9 @@
* @param ctx context for all options
* @param scls specific closure (for this processor)
* @param option long name of the option (i.e. "config" for --config)
- * @param value argument, NULL if none was given
+ * @param value argument, NULL if none was given
* @return OK to continue processing other options, SYSERR to abort
- */
+ */
typedef int (*CommandLineOptionProcessor)(CommandLineProcessorContext * ctx,
void * scls,
const char * option,
@@ -125,9 +125,9 @@
/**
* Handler for the option.
- */
+ */
CommandLineOptionProcessor processor;
-
+
/**
* Specific closure to pass to the processor.
*/
@@ -137,7 +137,7 @@
/**
* Macro defining the option to print the command line
- * help text.
+ * help text.
*
* @param about string with brief description of the application
*/
@@ -152,7 +152,7 @@
*/
#define COMMAND_LINE_OPTION_VERSION(version) \
{ 'v', "version", NULL, gettext_noop("print the version number"), 0,
&gnunet_getopt_print_version, version }
-
+
/**
* Set the configuration option for logging.
*/
@@ -190,7 +190,7 @@
* @param ectx for reporting errors
* @param cfg for storing/accessing configuration data
* @param allOptions defined options and handlers
- * @param argc number of arguments
+ * @param argc number of arguments
* @param argv actual arguments
* @return index into argv with first non-option
* argument, or -1 on error
Modified: GNUnet/src/include/gnunet_util_network.h
===================================================================
--- GNUnet/src/include/gnunet_util_network.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_network.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -135,9 +135,9 @@
*/
typedef struct {
/**
- * struct in_addr
+ * struct in_addr
*/
- unsigned int addr;
+ unsigned int addr;
} IPaddr;
/**
@@ -150,9 +150,9 @@
*/
typedef struct {
/**
- * struct in6_addr addr;
+ * struct in6_addr addr;
*/
- unsigned int addr[4];
+ unsigned int addr[4];
} IP6addr;
/**
@@ -182,7 +182,7 @@
struct SelectHandle * sh,
struct SocketHandle * sock,
void * sock_ctx,
- const MESSAGE_HEADER * msg);
+ const MESSAGE_HEADER * msg);
/**
* We've accepted a connection, check that
@@ -239,7 +239,7 @@
* @param routeList a string specifying the forbidden networks
* @return the converted list, NULL if the synatx is flawed
*/
-struct CIDRNetwork *
+struct CIDRNetwork *
parse_ipv4_network_specification(struct GE_Context * ectx,
const char * routeList);
@@ -254,7 +254,7 @@
* @param routeList a string specifying the forbidden networks
* @return the converted list, NULL if the synatx is flawed
*/
-struct CIDR6Network *
+struct CIDR6Network *
parse_ipv6_network_specification(struct GE_Context * ectx,
const char * routeList);
@@ -299,7 +299,7 @@
* The OS socket should henceforth be no longer used
* directly. socket_destroy will close it.
*/
-struct SocketHandle *
+struct SocketHandle *
socket_create(struct GE_Context * ectx,
struct LoadMonitor * mon,
int osSocket);
@@ -321,7 +321,7 @@
* @return Upon successful completion, it returns zero.
* @return Otherwise -1 is returned.
*/
-int socket_set_blocking(struct SocketHandle * s,
+int socket_set_blocking(struct SocketHandle * s,
int doBlock);
/**
@@ -332,7 +332,7 @@
int socket_test_blocking(struct SocketHandle * s);
/**
- * Do a read on the given socket.
+ * Do a read on the given socket.
*
* @brief reads at most max bytes to buf. Interrupts are IGNORED.
* @param s socket
Modified: GNUnet/src/include/gnunet_util_network_client.h
===================================================================
--- GNUnet/src/include/gnunet_util_network_client.h 2006-10-21 19:57:31 UTC
(rev 3529)
+++ GNUnet/src/include/gnunet_util_network_client.h 2006-10-21 19:58:30 UTC
(rev 3530)
@@ -46,7 +46,7 @@
/**
* Get a connection with gnunetd.
*/
-struct ClientServerConnection *
+struct ClientServerConnection *
client_connection_create(struct GE_Context * ectx,
struct GC_Configuration * cfg);
@@ -104,7 +104,7 @@
*
* @param sock the socket to write to
* @param buffer the buffer to write
- * @return OK if the write was sucessful,
+ * @return OK if the write was sucessful,
* SYSERR if the write failed (error will be logged)
*/
int connection_write(struct ClientServerConnection * sock,
@@ -116,7 +116,7 @@
* errors and pass those to the error context used when
* the socket was created. In that case, read_result
* will return SYSERR for the corresponding communication.
- *
+ *
* @param sock the TCP socket
* @param ret the return value from TCP
* @return SYSERR on error, OK if the return value was
@@ -141,7 +141,7 @@
* a serious error to the other side.
*
* @param sock the TCP socket
- * @param mask GE_MASK
+ * @param mask GE_MASK
* @param date date string
* @param msg message string
* @return SYSERR on error, OK if the error code was send
Modified: GNUnet/src/include/gnunet_util_os.h
===================================================================
--- GNUnet/src/include/gnunet_util_os.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/include/gnunet_util_os.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -20,7 +20,7 @@
/**
* @file include/gnunet_util_os.h
- * @brief low level process routines (fork, IPC,
+ * @brief low level process routines (fork, IPC,
* OS statistics, OS properties)
* @author Christian Grothoff
* @author Krista Bennett
@@ -54,7 +54,7 @@
/**
* @brief plugin (shared library) handle
- */
+ */
struct PluginHandle;
/**
@@ -84,7 +84,7 @@
struct LoadMonitor;
-struct IPC_SEMAPHORE *
+struct IPC_SEMAPHORE *
IPC_SEMAPHORE_CREATE(struct GE_Context * ectx,
const char * basename,
unsigned int initialValue);
@@ -102,7 +102,7 @@
/**
* Load plugin
*/
-struct PluginHandle *
+struct PluginHandle *
os_plugin_load(struct GE_Context * ectx,
const char * libprefix,
const char * dsoname);
@@ -116,14 +116,14 @@
* with the respective dsoname of the plugin
* @return NULL on error, otherwise pointer to the function
*/
-void *
+void *
os_plugin_resolve_function(struct PluginHandle * plugin,
const char * methodprefix,
int logError);
void os_plugin_unload(struct PluginHandle * plugin);
-struct LoadMonitor *
+struct LoadMonitor *
os_network_monitor_create(struct GE_Context * ectx,
struct GC_Configuration * cfg);
@@ -178,7 +178,7 @@
* a) autostart is not supported,
* b) the application does not seem to exist
* c) the user or group do not exist
- * d) the user has insufficient permissions for
+ * d) the user has insufficient permissions for
* changing autostart
* e) doAutoStart is NO, but autostart is already
* disabled
@@ -194,7 +194,7 @@
int testCapability,
int doAutoStart,
const char * application,
- const char * username,
+ const char * username,
const char * groupname);
/**
@@ -204,7 +204,7 @@
* functionality (in that case, no actual operation is
* performed). SYSERR is returned if
* a) adding users is not supported,
- * b) the user has insufficient permissions for
+ * b) the user has insufficient permissions for
* adding/removing users
* c) doAdd is NO, but user does not exist
* d) doAdd is YES, and user already exists
@@ -233,7 +233,7 @@
* Get the current CPU load.
* @param ectx for error reporting
* @param cfg to determine acceptable load level (LOAD::MAXCPULOAD)
- * @return -1 on error, otherwise load value
+ * @return -1 on error, otherwise load value
*/
int os_cpu_get_load(struct GE_Context * ectx,
struct GC_Configuration * cfg);
@@ -273,7 +273,7 @@
IPK_BINDIR,
IPK_LIBDIR,
IPK_DATADIR,
- IPK_LOCALEDIR
+ IPK_LOCALEDIR
};
/**
Modified: GNUnet/src/include/gnunet_util_string.h
===================================================================
--- GNUnet/src/include/gnunet_util_string.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_string.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -153,7 +153,7 @@
#define GROW(arr,size,tsize) xgrow_((void**)&arr, sizeof(arr[0]), &size,
tsize, __FILE__, __LINE__, __FUNCTION__)
/**
- * Append an element to a list (growing the
+ * Append an element to a list (growing the
* list by one).
*/
#define APPEND(arr,size,element) GROW(arr,size,(size)+1); arr[(size)-1] =
(element)
@@ -203,8 +203,8 @@
* String functions
*/
#if !HAVE_STRLCPY
-size_t strlcpy(char *dest,
- const char *src,
+size_t strlcpy(char *dest,
+ const char *src,
size_t size);
#endif
Modified: GNUnet/src/include/gnunet_util_threads.h
===================================================================
--- GNUnet/src/include/gnunet_util_threads.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/include/gnunet_util_threads.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -154,7 +154,7 @@
* @param block set to NO to never block (and
* thus fail if semaphore counter is 0)
* @return SYSERR if would block, otherwise
- * new count value after change
+ * new count value after change
*/
int SEMAPHORE_DOWN(struct SEMAPHORE * sem,
int mayblock);
@@ -181,7 +181,7 @@
/**
* Wait until the shutdown has been initiated. This
- * should be called by the main thread (if it has
+ * should be called by the main thread (if it has
* nothing better to do) to wait for a user signal
* (or other thread) to initiate the shutdown.
*/
@@ -201,7 +201,7 @@
/**
* Install a signal handler that will be run if the
- * given signal is received.
+ * given signal is received.
*/
struct SignalHandlerContext * signal_handler_install(int signal,
SignalHandler handler);
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/connection.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -535,8 +535,8 @@
GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"%s: Sender `%s', key `%s', IV %u msg CRC %u\n",
- prefix,
- &enc,
+ prefix,
+ &enc,
skey,
*((int *) iv),
crc);
@@ -867,7 +867,7 @@
if (be->lastSendAttempt + be->MAX_SEND_FREQUENCY > get_time()) {
#if DEBUG_CONNECTION || 1
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"Send frequency too high (CPU load), send deferred.\n");
#endif
return NO; /* frequency too high, wait */
@@ -912,10 +912,10 @@
deadline = entry->transmissionTime;
(*priority) += entry->pri;
#if DEBUG_CONNECTION
- GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- "Selecting msg %u with length %u\n",
- i,
+ GE_LOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Selecting msg %u with length %u\n",
+ i,
entry->len);
#endif
totalMessageSize += entry->len;
@@ -940,7 +940,7 @@
if (entry->transmissionTime < deadline)
deadline = entry->transmissionTime;
#if DEBUG_CONNECTION
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Selecting msg %u with length %u\n", i, entry->len);
#endif
@@ -984,7 +984,7 @@
sizeof(P2P_PACKET_HEADER));
#if DEBUG_COLLECT_PRIO == YES
FPRINTF(prioFile,
- "%llu 0 %d\n",
+ "%llu 0 %d\n",
get_time(),
priority);
#endif
@@ -995,8 +995,8 @@
sizeof(P2P_PACKET_HEADER));
#if DEBUG_COLLECT_PRIO == YES
FPRINTF(prioFile,
- "%llu 1 %d\n",
- get_time(),
+ "%llu 1 %d\n",
+ get_time(),
priority);
#endif
}
@@ -1007,7 +1007,7 @@
sizeof(P2P_PACKET_HEADER));
#if DEBUG_COLLECT_PRIO == YES
FPRINTF(prioFile,
- "%llu 2 %d\n",
+ "%llu 2 %d\n",
get_time(),
priority);
#endif
@@ -1024,12 +1024,12 @@
j,
be->sendBufferSize,
be->session.mtu - sizeof(P2P_PACKET_HEADER));
-
+
for(j = 0; j < be->sendBufferSize; j++)
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_DEVELOPER,
_("Message details: %u: length %d, priority: %d\n"),
- j,
+ j,
be->sendBuffer[j]->len,
be->sendBuffer[j]->pri);
return 0;
@@ -1261,7 +1261,7 @@
unsigned int j;
int changed;
- if (be->session.mtu == 0)
+ if (be->session.mtu == 0)
return; /* clearly not necessary */
/* MTU change may require new fragmentation! */
@@ -1272,25 +1272,25 @@
ret = be->sendBufferSize;
for (i=0;i<ret;i++) {
entry = entries[i];
- if (entry->len <= be->session.mtu - sizeof(P2P_PACKET_HEADER))
+ if (entry->len <= be->session.mtu - sizeof(P2P_PACKET_HEADER))
continue;
ret--;
for (j = i; j < ret; j++)
entries[j] = entries[j + 1]; /* preserve ordering */
GROW(be->sendBuffer,
- be->sendBufferSize,
+ be->sendBufferSize,
ret);
/* calling fragment will change be->sendBuffer;
thus we need to restart from the beginning afterwards... */
fragmentation->fragment(&be->session.sender,
- be->session.mtu - sizeof(P2P_PACKET_HEADER),
+ be->session.mtu - sizeof(P2P_PACKET_HEADER),
entry->pri,
- entry->transmissionTime,
+ entry->transmissionTime,
entry->len,
- entry->callback,
+ entry->callback,
entry->closure);
FREE(entry);
- changed = YES;
+ changed = YES;
break; /* "entries" changed as side-effect of fragment call */
}
} /* while changed */
@@ -1305,7 +1305,7 @@
* @return OK on success, NO on error
*/
static int ensureTransportConnected(BufferEntry * be) {
- if (be->session.tsession != NULL)
+ if (be->session.tsession != NULL)
return OK;
be->session.tsession = transport->connectFreely(&be->session.sender, YES);
if (be->session.tsession == NULL)
@@ -1346,14 +1346,14 @@
return SYSERR;
}
if ( (be->status != STAT_UP) ||
- (be->sendBufferSize == 0) ||
+ (be->sendBufferSize == 0) ||
(be->inSendBuffer == YES) ) {
return NO; /* must not run */
}
be->inSendBuffer = YES;
if ( (OK != ensureTransportConnected(be)) ||
- (OK != checkSendFrequency(be)) ){
+ (OK != checkSendFrequency(be)) ){
be->inSendBuffer = NO;
#if 0
GE_LOG(ectx,
@@ -1379,7 +1379,7 @@
if (totalMessageSize == 0) {
expireSendBufferEntries(be);
be->inSendBuffer = NO;
-#if DEBUG_CONNECTION
+#if DEBUG_CONNECTION
GE_LOG(ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"No messages selected for sending (%d)\n",
@@ -1421,9 +1421,9 @@
continue;
if(entry->knapsackSolution == YES) {
#if DEBUG_CONNECTION
- GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- "Queuing msg %u with length %u\n",
+ GE_LOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Queuing msg %u with length %u\n",
perm[i],
entry->len);
#endif
@@ -1441,7 +1441,7 @@
while(pos != NULL) {
if(pos->minimumPadding + p <= totalMessageSize) {
p += pos->callback(&be->session.sender,
- &plaintextMsg[p],
+ &plaintextMsg[p],
be->session.mtu - p);
}
pos = pos->next;
@@ -1468,15 +1468,15 @@
encryptedMsg = MALLOC(p);
hash(&p2pHdr->sequenceNumber,
p - sizeof(HashCode512), (HashCode512 *) encryptedMsg);
- ret = encryptBlock(&p2pHdr->sequenceNumber,
- p - sizeof(HashCode512),
- &be->skey_local,
+ ret = encryptBlock(&p2pHdr->sequenceNumber,
+ p - sizeof(HashCode512),
+ &be->skey_local,
(const INITVECTOR *) encryptedMsg, /* IV */
&((P2P_PACKET_HEADER *) encryptedMsg)->sequenceNumber);
#if DEBUG_CONNECTION
printMsg("Encrypting P2P data",
&be->session.sender,
- &be->skey_local,
+ &be->skey_local,
(const INITVECTOR *) encryptedMsg,
crc32N(&((P2P_PACKET_HEADER *) encryptedMsg)->sequenceNumber,
ret));
@@ -1490,15 +1490,15 @@
"Asking transport to send message with priority %u\n",
priority);
#endif
- ret = transport->send(be->session.tsession,
+ ret = transport->send(be->session.tsession,
encryptedMsg,
p,
NO);
- if ( (ret == NO) &&
+ if ( (ret == NO) &&
(priority >= EXTREME_PRIORITY) ) {
- ret = transport->send(be->session.tsession,
+ ret = transport->send(be->session.tsession,
encryptedMsg,
- p,
+ p,
YES);
}
if (ret == YES) {
@@ -1561,7 +1561,7 @@
unsigned long long queueSize;
ENTRY();
- if ( (se == NULL) ||
+ if ( (se == NULL) ||
(se->len == 0) ) {
GE_BREAK(ectx, 0);
FREENONNULL(se);
@@ -1575,7 +1575,7 @@
se->pri,
se->transmissionTime,
se->len,
- se->callback,
+ se->callback,
se->closure);
FREE(se);
return;
@@ -1583,8 +1583,8 @@
#if DEBUG_CONNECTION
IF_GELOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- hash2enc(&be->session.sender.hashPubKey,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ hash2enc(&be->session.sender.hashPubKey,
&enc));
GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
@@ -1592,13 +1592,13 @@
se->len,
&enc);
#endif
- if ( (be->sendBufferSize > 0) &&
+ if ( (be->sendBufferSize > 0) &&
(be->status != STAT_UP) ) {
/* as long as we do not have a confirmed
connection, do NOT queue messages! */
#if DEBUG_CONNECTION
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
"not connected to `%s', message dropped\n",
&enc);
#endif
@@ -1623,10 +1623,10 @@
/* we need to enforce some hard limit here, otherwise we may take
FAR too much memory (200 MB easily) */
#if DEBUG_CONNECTION
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"queueSize (%llu) >= %d, refusing to queue message.\n",
- queueSize,
+ queueSize,
MAX_SEND_BUFFER_SIZE);
#endif
FREE(se->closure);
@@ -1687,7 +1687,7 @@
* @param hostId for which peer should we get/create a connection
* @return the table entry for the host
*/
-static BufferEntry *addHost(const PeerIdentity * hostId,
+static BufferEntry *addHost(const PeerIdentity * hostId,
int establishSession) {
BufferEntry *root;
BufferEntry *prev;
@@ -1695,8 +1695,8 @@
EncName enc;
GE_IFLOG(ectx,
- GE_DEBUG,
- hash2enc(&hostId->hashPubKey,
+ GE_DEBUG,
+ hash2enc(&hostId->hashPubKey,
&enc));
GE_LOG(ectx,
GE_DEBUG,
@@ -1820,8 +1820,8 @@
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&be->session.sender.hashPubKey, &enc));
GE_LOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- "Shutting down connection with `%s'\n",
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ "Shutting down connection with `%s'\n",
&enc);
#endif
if(be->status == STAT_DOWN)
@@ -2022,14 +2022,14 @@
if(adjustedRR[u] > entries[u]->idealized_limit) {
EncName enc;
IF_GELOG(ectx,
- GE_INFO | GE_BULK | GE_USER,
- hash2enc(&entries[u]->session.sender.hashPubKey,
+ GE_INFO | GE_BULK | GE_USER,
+ hash2enc(&entries[u]->session.sender.hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_BULK | GE_USER,
"peer `%s' transmitted above limit: %llu bpm > %u bpm\n",
- &enc,
- adjustedRR[u],
+ &enc,
+ adjustedRR[u],
entries[u]->idealized_limit);
}
#endif
@@ -2046,11 +2046,11 @@
entries[u]->violations++;
entries[u]->recently_received = 0; /* "clear" slate */
if (entries[u]->violations > 10) {
- IF_GELOG(ectx,
+ IF_GELOG(ectx,
GE_INFO | GE_BULK | GE_USER,
hash2enc(&entries[u]->session.sender.hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_INFO | GE_BULK | GE_USER,
"blacklisting `%s': sent repeatedly %llu bpm "
"(limit %u bpm, target %u bpm)\n",
@@ -2101,7 +2101,7 @@
for (u = 0; u < activePeerCount; u++)
entries[u]->idealized_limit = 0;
while ( (schedulableBandwidth > CONNECTION_MAX_HOSTS_ * 100) &&
- (activePeerCount > 0) &&
+ (activePeerCount > 0) &&
(didAssign == YES) ) {
didAssign = NO;
decrementSB = 0;
@@ -2140,7 +2140,7 @@
schedulableBandwidth = 0;
break;
}
- if ( (activePeerCount > 0) &&
+ if ( (activePeerCount > 0) &&
(didAssign == NO) ) {
perm = permute(WEAK, activePeerCount);
/* assign also to random "worthless" (zero-share) peers */
@@ -2158,7 +2158,7 @@
if ((firstRound == YES) && (share > adjustedRR[u] * 2))
share = adjustedRR[u] * 2;
- schedulableBandwidth -= share - entries[v]->idealized_limit;
+ schedulableBandwidth -= share - entries[v]->idealized_limit;
entries[v]->idealized_limit = share;
}
}
@@ -2174,20 +2174,20 @@
firstRound = NO;
} /* while bandwidth to distribute */
- if ( (schedulableBandwidth > 0) &&
+ if ( (schedulableBandwidth > 0) &&
(activePeerCount > 0) ) {
/* assign rest disregarding traffic limits */
perm = permute(WEAK, activePeerCount);
for(u = 0; u < activePeerCount; u++) {
unsigned int share;
-
+
share =
entries[perm[u]]->idealized_limit +
(unsigned int) (schedulableBandwidth / activePeerCount);
if (share > entries[perm[u]]->idealized_limit) { /* no int-overflow? */
entries[perm[u]]->idealized_limit = share;
} else {
- entries[perm[u]]->idealized_limit = 0xFFFF0000;
+ entries[perm[u]]->idealized_limit = 0xFFFF0000;
}
}
schedulableBandwidth = 0;
@@ -2210,14 +2210,14 @@
EncName enc;
IF_GELOG(ectx,
- GE_DEBUG | GE_BULK | GE_USER,
- hash2enc(&entries[u]->session.sender.hashPubKey,
+ GE_DEBUG | GE_BULK | GE_USER,
+ hash2enc(&entries[u]->session.sender.hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_BULK | GE_USER,
"inbound limit for peer %u: %s set to %u bpm\n",
- u,
- &enc,
+ u,
+ &enc,
entries[u]->idealized_limit);
#endif
if ( (timeDifference > 50) &&
@@ -2249,7 +2249,7 @@
IF_GELOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
- hash2enc(&be->session.sender.hashPubKey,
+ hash2enc(&be->session.sender.hashPubKey,
&enc));
GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
@@ -2260,7 +2260,7 @@
/* We need to avoid giving a too low limit (especially 0, which
would indicate a plaintex msg). So we set the limit to the
minimum value AND try to shutdown the connection. */
- be->idealized_limit = MIN_BPM_PER_PEER;
+ be->idealized_limit = MIN_BPM_PER_PEER;
shutdownConnection(be);
}
}
@@ -2308,13 +2308,13 @@
/* switch state form UP to DOWN: too much inactivity */
IF_GELOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&root->session.sender.hashPubKey, &enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"closing connection with `%s': "
"too much inactivity (%llu ms)\n",
- &enc,
+ &enc,
now - root->isAlive);
shutdownConnection(root);
/* the host may still be worth trying again soon: */
@@ -2323,7 +2323,7 @@
if ( (root->available_send_window >= 60000) &&
(root->sendBufferSize < 4) &&
(scl_nextHead != NULL) &&
- (os_network_monitor_get_load(load_monitor, Upload) < 25) &&
+ (os_network_monitor_get_load(load_monitor, Upload) < 25) &&
(os_cpu_get_load(ectx, cfg) < 50) ) {
/* create some traffic by force! */
char * msgBuf;
@@ -2339,8 +2339,8 @@
60000);
if (mSize > 0)
unicast(&root->session.sender,
- (MESSAGE_HEADER *) msgBuf,
- 0,
+ (MESSAGE_HEADER *) msgBuf,
+ 0,
5 * cronMINUTES);
}
pos = pos->next;
@@ -2352,14 +2352,14 @@
if ( (now > root->isAlive) &&
(now - root->isAlive > SECONDS_NOPINGPONG_DROP * cronSECONDS)) {
EncName enc;
- IF_GELOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
- hash2enc(&root->session.sender.hashPubKey,
+ IF_GELOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
+ hash2enc(&root->session.sender.hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"closing connection to %s: %s not answered.\n",
- &enc,
+ &enc,
(root->status == STAT_SETKEY_SENT) ? "SETKEY" : "PING");
shutdownConnection(root);
}
@@ -2410,10 +2410,10 @@
if (equalsHashCode512(&hc,
&msg->hash) &&
(msg->sequenceNumber == 0) &&
- (msg->bandwidth == 0) &&
+ (msg->bandwidth == 0) &&
(msg->timeStamp == 0) )
return NO; /* plaintext */
- if (stats != NULL)
+ if (stats != NULL)
stats->change(stat_received, size);
#if DEBUG_CONNECTION
@@ -2435,9 +2435,9 @@
return SYSERR; /* could not decrypt */
}
tmp = MALLOC(size - sizeof(HashCode512));
- res = decryptBlock(&be->skey_remote,
- &msg->sequenceNumber,
- size - sizeof(HashCode512),
+ res = decryptBlock(&be->skey_remote,
+ &msg->sequenceNumber,
+ size - sizeof(HashCode512),
(const INITVECTOR *) &msg->hash, /* IV */
tmp);
hash(tmp, size - sizeof(HashCode512), &hc);
@@ -2455,8 +2455,8 @@
FREE(tmp);
return SYSERR;
}
- if(stats != NULL)
- stats->change(stat_decrypted, size - sizeof(HashCode512));
+ if(stats != NULL)
+ stats->change(stat_decrypted, size - sizeof(HashCode512));
memcpy(&msg->sequenceNumber, tmp, size - sizeof(HashCode512));
FREE(tmp);
res = YES;
@@ -2496,9 +2496,9 @@
be->max_bpm = ntohl(msg->bandwidth);
#if DEBUG_CONNECTION
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
- "Received bandwidth cap of %u bpm\n",
+ "Received bandwidth cap of %u bpm\n",
be->max_bpm);
#endif
if(be->available_send_window >= be->max_bpm) {
@@ -2599,7 +2599,7 @@
identity->whitelistHost(peer);
if( ((be->status & STAT_SETKEY_SENT) > 0) &&
((be->status & STAT_SETKEY_RECEIVED) > 0) &&
- (OK == ensureTransportConnected(be)) &&
+ (OK == ensureTransportConnected(be)) &&
(be->status != STAT_UP) ) {
be->status = STAT_UP;
be->lastSequenceNumberReceived = 0;
@@ -2677,7 +2677,7 @@
* OK if the sessionkey was set.
*/
int getCurrentSessionKey(const PeerIdentity * peer,
- SESSIONKEY * key,
+ SESSIONKEY * key,
TIME_T * age,
int forSending) {
int ret;
@@ -2719,7 +2719,7 @@
* @param tsession the transport session that is for grabs
* @param sender the identity of the other node
*/
-void considerTakeover(const PeerIdentity * sender,
+void considerTakeover(const PeerIdentity * sender,
TSession * tsession) {
BufferEntry * be;
unsigned int cost;
@@ -2739,7 +2739,7 @@
cost = transport->getCost(be->session.tsession->ttype);
/* Question: doesn't this always do takeover in tcp/udp
case, which have the same costs? Should it? -IW
-
+
Answer: this will always switch to TCP in the long run (if
that is possible) since udpAssociate always
returns SYSERR. This is intended since for long-running
@@ -2755,7 +2755,7 @@
be->session.tsession = tsession;
be->session.mtu = transport->getMTU(tsession->ttype);
fragmentIfNecessary(be);
- }
+ }
transport->disconnect(tsession);
MUTEX_UNLOCK(lock);
}
@@ -2767,7 +2767,7 @@
* accordingly.
*/
static int connectionConfigChangeCallback(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
@@ -2907,7 +2907,7 @@
due to resource constraints */
"# outgoing messages dropped"));
stat_sizeMessagesDropped
- = stats->create(gettext_noop(/* bytes of messages dropped by GNUnet core
+ = stats->create(gettext_noop(/* bytes of messages dropped by GNUnet core
due to resource constraints */
"# bytes of outgoing messages dropped"));
stat_hangupSent
@@ -2915,7 +2915,7 @@
stat_encrypted = stats->create(gettext_noop(/* includes encrypted but then
not transmitted data */
"# bytes encrypted"));
- stat_transmitted = stats->create(gettext_noop(/* encrypted data, confirmed
by
+ stat_transmitted = stats->create(gettext_noop(/* encrypted data, confirmed
by
transport, without transport
headers */
"# bytes transmitted"));
@@ -3051,8 +3051,8 @@
tmp->recently_received,
tmp->idealized_limit,
tmp->sendBufferSize,
- &hostName,
- &skey_local,
+ &hostName,
+ &skey_local,
&skey_remote);
}
tmp = tmp->overflowChain;
@@ -3155,8 +3155,8 @@
* @param msg the message to transmit, should contain MESSAGE_HEADERs
* @return OK on success, SYSERR on failure, NO on temporary failure
*/
-int sendPlaintext(TSession * tsession,
- const char *msg,
+int sendPlaintext(TSession * tsession,
+ const char *msg,
unsigned int size) {
char *buf;
int ret;
@@ -3178,7 +3178,7 @@
hash(&hdr->sequenceNumber,
size + sizeof(P2P_PACKET_HEADER) - sizeof(HashCode512), &hdr->hash);
ret = transport->send(tsession,
- buf,
+ buf,
size + sizeof(P2P_PACKET_HEADER),
NO);
FREE(buf);
@@ -3205,14 +3205,14 @@
#if DEBUG_CONNECTION
EncName enc;
- IF_GELOG(ectx,
- GE_DEBUG | GE_REQUEST | GE_USER,
+ IF_GELOG(ectx,
+ GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&hostId->hashPubKey, &enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"%s: sending message to host %s message of size %d\n",
- __FUNCTION__,
- &enc,
+ __FUNCTION__,
+ &enc,
len);
#endif
ENTRY();
@@ -3339,7 +3339,7 @@
* @param node the identity of the other peer
* @param preference how much should the traffic preference be increased?
*/
-void updateTrafficPreference(const PeerIdentity * node,
+void updateTrafficPreference(const PeerIdentity * node,
double preference) {
BufferEntry *be;
@@ -3369,7 +3369,7 @@
GE_DEBUG | GE_REQUEST | GE_USER,
hash2enc(&node->hashPubKey,
&enc));
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Closing connection to `%s' as requested by application.\n",
&enc);
Modified: GNUnet/src/server/core.c
===================================================================
--- GNUnet/src/server/core.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/core.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -237,11 +237,11 @@
pos->dsoName,
pos->dsoName);
return SYSERR;
- }
+ }
mptr();
pos->applicationInitialized = NO;
- if (pos->serviceCount > 0)
- return OK;
+ if (pos->serviceCount > 0)
+ return OK;
/* compute prev! */
if (pos == shutdownList) {
@@ -251,7 +251,7 @@
while (prev->next != pos)
prev = prev->next;
}
- os_plugin_unload(pos->library);
+ os_plugin_unload(pos->library);
if (prev == NULL)
shutdownList = pos->next;
else
@@ -386,13 +386,13 @@
mptr = os_plugin_resolve_function(pos->library,
"release_",
YES);
- if (mptr == NULL)
- return SYSERR;
+ if (mptr == NULL)
+ return SYSERR;
mptr();
pos->serviceCount--;
pos->servicePTR = NULL;
- if (pos->applicationInitialized == YES)
+ if (pos->applicationInitialized == YES)
return OK; /* protocol still in use! */
/* compute prev */
if (pos == shutdownList) {
@@ -417,7 +417,7 @@
char * next;
char * pos;
int ok;
-
+
ok = OK;
dso = NULL;
if (-1 == GC_get_configuration_value_string(applicationCore.cfg,
@@ -482,7 +482,7 @@
int initCore(struct GE_Context * ectx,
struct GC_Configuration * cfg,
struct CronManager * cron,
- struct LoadMonitor * monitor) {
+ struct LoadMonitor * monitor) {
applicationCore.ectx = ectx;
applicationCore.cfg = cfg;
applicationCore.load_monitor = monitor;
Modified: GNUnet/src/server/gnunet-peer-info.c
===================================================================
--- GNUnet/src/server/gnunet-peer-info.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/server/gnunet-peer-info.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -103,12 +103,12 @@
FREE(info);
}
-int main(int argc,
+int main(int argc,
const char *argv[]) {
struct GC_Configuration * cfg;
struct CronManager * cron;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -124,13 +124,13 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
- }
+ return -1;
+ }
if (-1 == GC_parse_configuration(cfg,
cfgFilename)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
GE_ASSERT(ectx,
0 == GC_set_configuration_value_string(cfg,
Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/server/gnunet-transport-check.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -234,7 +234,7 @@
GC_get_configuration_value_number(cfg,
"GNUNET-TRANSPORT-CHECK",
"VERBOSE",
- 0,
+ 0,
(unsigned long long) -1,
0,
&verbose);
@@ -322,7 +322,7 @@
(ok != YES) )
FPRINTF(stderr,
_("No reply received within %llums.\n"),
- timeout);
+ timeout);
cron_suspend(cron,
NO);
cron_del_job(cron,
@@ -350,8 +350,8 @@
COMMAND_LINE_OPTION_HELP(gettext_noop("Tool to test if GNUnet transport
services are operational.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
- { 'p', "ping", NULL,
- gettext_noop("ping peers from HOSTLISTURL that match transports"),
+ { 'p', "ping", NULL,
+ gettext_noop("ping peers from HOSTLISTURL that match transports"),
0, &gnunet_getopt_configure_set_option, "TRANSPORT-CHECK:PING=YES" },
{ 'r', "repeat", "COUNT",
gettext_noop("send COUNT messages"),
@@ -376,7 +376,7 @@
COMMAND_LINE_OPTION_END,
};
-int main(int argc,
+int main(int argc,
const char *argv[]) {
int res;
unsigned long long Xrepeat;
@@ -385,7 +385,7 @@
int stats[3];
int pos;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -401,13 +401,13 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (-1 == GC_parse_configuration(cfg,
cfgFilename)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (OK != changeUser(ectx, cfg)) {
GC_free(cfg);
@@ -433,7 +433,7 @@
&timeout)) {
return 1;
}
-
+
expectedValue = MALLOC(expectedSize);
pos = expectedSize;
expectedValue[--pos] = '\0';
@@ -445,7 +445,7 @@
"GNUNETD",
"TRANSPORTS",
"udp tcp http",
- &trans))
+ &trans))
return 1;
GE_ASSERT(ectx, trans != NULL);
ping = GC_get_configuration_value_yesno(cfg,
@@ -539,7 +539,7 @@
cron_destroy(cron);
GC_free(cfg);
GE_free_context(ectx);
-
+
if (res == OK)
return 0;
else
Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/gnunet-update.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -214,8 +214,8 @@
*/
static struct CommandLineOption gnunetupdateOptions[] = {
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
- { 'g', "get", "",
- gettext_noop("ping peers from HOSTLISTURL that match transports"),
+ { 'g', "get", "",
+ gettext_noop("ping peers from HOSTLISTURL that match transports"),
0, &gnunet_getopt_configure_set_option, "GNUNET-UPDATE:GET" },
COMMAND_LINE_OPTION_HELP(gettext_noop("Updates GNUnet datastructures after
version change.")), /* -h */
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
@@ -236,7 +236,7 @@
const char * argv[]) {
char * get;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -253,13 +253,13 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (-1 == GC_parse_configuration(cfg,
cfgFilename)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (OK != changeUser(ectx, cfg)) {
GC_free(cfg);
@@ -271,7 +271,7 @@
"GET",
NULL,
&get)) {
- doGet(get);
+ doGet(get);
FREE(get);
} else {
work();
Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/gnunetd.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -78,7 +78,7 @@
GE_LOG(ectx,
GE_INFO | GE_USER | GE_REQUEST,
_("`%s' startup complete.\n"),
- "gnunetd");
+ "gnunetd");
GNUNET_SHUTDOWN_WAITFOR();
GE_LOG(ectx,
GE_INFO | GE_USER | GE_REQUEST,
@@ -120,7 +120,7 @@
cron_destroy(cron);
os_network_monitor_destroy(mon);
#ifndef WINDOWS
- signal_handler_uninstall(SIGHUP,
+ signal_handler_uninstall(SIGHUP,
&reread_config,
shc_hup);
#endif
@@ -130,7 +130,7 @@
NO);
return SYSERR;
}
- initConnection(ectx, cfg, mon, cron);
+ initConnection(ectx, cfg, mon, cron);
loadApplicationModules();
writePIDFile(ectx, cfg);
if (NO == debug_flag)
@@ -139,17 +139,17 @@
YES);
cron_start(cron);
enableCoreProcessing();
- waitForSignalHandler(ectx);
- disableCoreProcessing();
+ waitForSignalHandler(ectx);
+ disableCoreProcessing();
cron_stop(cron);
deletePIDFile(ectx, cfg);
stopTCPServer();
- unloadApplicationModules();
- doneConnection();
+ unloadApplicationModules();
+ doneConnection();
doneCore();
os_network_monitor_destroy(mon);
#ifndef WINDOWS
- signal_handler_uninstall(SIGHUP,
+ signal_handler_uninstall(SIGHUP,
&reread_config,
shc_hup);
#endif
@@ -162,22 +162,22 @@
*/
static struct CommandLineOption gnunetdOptions[] = {
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
- { '@', "win-service", NULL, "", 0,
+ { '@', "win-service", NULL, "", 0,
&gnunet_getopt_configure_set_option, "GNUNETD:WINSERVICE" },
- { 'd', "debug", NULL,
+ { 'd', "debug", NULL,
gettext_noop("run in debug mode; gnunetd will "
"not daemonize and error messages will "
- "be written to stderr instead of a logfile"),
+ "be written to stderr instead of a logfile"),
0, &gnunet_getopt_configure_set_one, &debug_flag },
COMMAND_LINE_OPTION_HELP(gettext_noop("Starts the gnunetd daemon.")), /* -h
*/
COMMAND_LINE_OPTION_HOSTNAME, /* -H */
COMMAND_LINE_OPTION_LOGGING, /* -L */
- { 'p', "padding-disable", "YES/NO",
+ { 'p', "padding-disable", "YES/NO",
gettext_noop("disable padding with random data (experimental)"), 0,
&gnunet_getopt_configure_set_option, "GNUNETD-EXPERIMENTAL:PADDING" },
#ifndef MINGW
- { 'u', "user", "USERNAME",
- gettext_noop("specify username as which gnunetd should run"), 1,
+ { 'u', "user", "USERNAME",
+ gettext_noop("specify username as which gnunetd should run"), 1,
&gnunet_getopt_configure_set_option, "GNUNETD:USERNAME" },
#endif
COMMAND_LINE_OPTION_VERSION(PACKAGE_VERSION), /* -v */
@@ -188,7 +188,7 @@
* Initialize util (parse command line, options) and
* call the main routine.
*/
-int main(int argc,
+int main(int argc,
const char * argv[]) {
int ret;
struct GE_Context * ectx;
@@ -199,7 +199,7 @@
"Sorry, your C compiler did not properly align the C structs.
Aborting.\n");
return -1;
}
- ectx = GE_create_context_stderr(YES,
+ ectx = GE_create_context_stderr(YES,
GE_DEBUG |
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
@@ -216,13 +216,13 @@
argv)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (-1 == GC_parse_configuration(cfg,
cfgFilename)) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (OK != changeUser(ectx, cfg)) {
GC_free(cfg);
@@ -238,7 +238,7 @@
GC_free(cfg);
GE_free_context(ectx);
return 1;
- }
+ }
ret = gnunet_main(ectx);
GC_free(cfg);
GE_free_context(ectx);
Modified: GNUnet/src/server/handler.c
===================================================================
--- GNUnet/src/server/handler.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/handler.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -501,7 +501,7 @@
size - sizeof(P2P_PACKET_HEADER),
ret,
tsession);
-
+
confirmSessionUp(sender);
}
Modified: GNUnet/src/server/startup.c
===================================================================
--- GNUnet/src/server/startup.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/startup.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -59,7 +59,7 @@
static char * getPIDFile(struct GC_Configuration * cfg) {
char * pif;
-
+
if (0 != GC_get_configuration_value_filename(cfg,
"GNUNETD",
"PIDFILE",
@@ -88,18 +88,18 @@
pif);
return;
}
- if (0 > FPRINTF(pidfd,
- "%u",
- (unsigned int) getpid()))
+ if (0 > FPRINTF(pidfd,
+ "%u",
+ (unsigned int) getpid()))
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"fprintf",
- pif);
+ pif);
if (0 != fclose(pidfd))
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"fclose",
- pif);
+ pif);
FREE(pif);
}
Modified: GNUnet/src/server/startup.h
===================================================================
--- GNUnet/src/server/startup.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/startup.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -2,7 +2,7 @@
This file is part of GNUnet
(C) 2001, 2002, 2004, 2005, 2006 Christian Grothoff (and other
contributing authors)
-
+
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation; either version 2, or (at your
Modified: GNUnet/src/server/tcpserver.c
===================================================================
--- GNUnet/src/server/tcpserver.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/tcpserver.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -149,14 +149,14 @@
IPaddr ip;
struct sockaddr_in * a;
- if (addr_len != sizeof(struct sockaddr_in))
- return NULL;
+ if (addr_len != sizeof(struct sockaddr_in))
+ return NULL;
a = (struct sockaddr_in *) addr;
memcpy(&ip,
&a->sin_addr,
sizeof(IPaddr));
- if (! isWhitelisted(ip))
- return NULL;
+ if (! isWhitelisted(ip))
+ return NULL;
session = MALLOC(sizeof(ClientHandle));
session->sock = sock;
return session;
@@ -263,8 +263,8 @@
1,
65535,
2087,
- &port))
- port = 0;
+ &port))
+ port = 0;
return (unsigned short) port;
}
@@ -302,7 +302,7 @@
&on,
sizeof(on)) < 0 )
GE_LOG_STRERROR(ectx,
- GE_ERROR | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_BULK,
"setsockopt");
/* bind the socket */
if (BIND(listenerFD,
@@ -334,7 +334,7 @@
0 /* no memory quota */);
if (selector == NULL) {
CLOSE(listenerFD);
- return SYSERR;
+ return SYSERR;
}
return OK;
}
@@ -375,7 +375,7 @@
"NETWORK",
"TRUSTED",
"127.0.0.0/8;",
- &ch))
+ &ch))
return SYSERR;
GE_ASSERT(ectx, ch != NULL);
trustedNetworks_ = parse_ipv4_network_specification(ectx,
@@ -386,7 +386,7 @@
_("Malformed network specification in the configuration in section
`%s' for entry `%s': %s\n"),
"NETWORK",
"TRUSTED",
- ch);
+ ch);
FREE(ch);
return SYSERR;
}
Modified: GNUnet/src/server/version.c
===================================================================
--- GNUnet/src/server/version.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/server/version.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -92,15 +92,15 @@
configuration change, but that again would be too strict. */
dyncat(cfg,
&string,
- "GNUNETD",
+ "GNUNETD",
"APPLICATIONS");
dyncat(cfg,
- &string,
+ &string,
"FS",
"QUOTA");
- dyncat(cfg,
- &string,
- "MODULES",
+ dyncat(cfg,
+ &string,
+ "MODULES",
"sqstore");
hash(string,
strlen(string),
@@ -113,7 +113,7 @@
struct GC_Configuration * cfg) {
char * en;
char * cn;
-
+
en = NULL;
if (-1 == GC_get_configuration_value_filename(cfg,
"GNUNETD",
@@ -171,8 +171,8 @@
if ( (len != strlen(VERSION) + 1 + sizeof(EncName)) ||
(0 != memcmp(VERSION,
version,
- strlen(VERSION)+1)) )
- return SYSERR; /* wrong version */
+ strlen(VERSION)+1)) )
+ return SYSERR; /* wrong version */
getVersionHash(cfg,
&enc);
if (0 != memcmp(&enc,
Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gnunet-setup.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -56,7 +56,7 @@
*/
static struct CommandLineOption gnunetsetupOptions[] = {
COMMAND_LINE_OPTION_CFG_FILE(&cfgFilename), /* -c */
- { 'd', "daemon", NULL,
+ { 'd', "daemon", NULL,
gettext_noop("generate configuration for gnunetd, the GNUnet daemon"),
0, &gnunet_getopt_configure_set_one, &config_daemon },
COMMAND_LINE_OPTION_HELP(gettext_noop("Tool to setup GNUnet.")), /* -h */
@@ -65,9 +65,9 @@
COMMAND_LINE_OPTION_END,
};
-static int dyn_config(const char * module,
- const char * mainfunc,
- int argc,
+static int dyn_config(const char * module,
+ const char * mainfunc,
+ int argc,
const char **argv,
const char * filename) {
ConfigurationPluginMain mptr;
@@ -76,22 +76,22 @@
library = os_plugin_load(ectx,
"libgnunet",
module);
- if (!library)
+ if (!library)
return SYSERR;
mptr = os_plugin_resolve_function(library,
mainfunc,
YES);
if (! mptr)
return SYSERR;
- mptr(argc,
+ mptr(argc,
argv,
library,
- ectx,
+ ectx,
cfg,
gns,
filename,
- config_daemon);
- os_plugin_unload(library);
+ config_daemon);
+ os_plugin_unload(library);
return YES;
}
@@ -115,20 +115,20 @@
"menuconfig", "setup_curses", "mconf_main" ,
"config", "setup_text", "main_" ,
"wizard-curses", "setup_curses", "wizard_curs_main",
- "wizard-gtk", "setup_gtk", "gtk_wizard_main",
+ "wizard-gtk", "setup_gtk", "gtk_wizard_main",
NULL,
};
-int main(int argc,
+int main(int argc,
const char * argv[]) {
const char * operation;
int done;
char * dirname;
char * specname;
- int i;
+ int i;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -145,7 +145,7 @@
if (i < 0) {
GC_free(cfg);
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (i != argc - 1) {
if (i < argc - 1) {
@@ -168,8 +168,8 @@
}
if (cfgFilename == NULL)
- cfgFilename = config_daemon
- ? STRDUP(DEFAULT_DAEMON_CONFIG_FILE)
+ cfgFilename = config_daemon
+ ? STRDUP(DEFAULT_DAEMON_CONFIG_FILE)
: STRDUP(DEFAULT_CLIENT_CONFIG_FILE);
dirname = string_expandFileName(ectx, cfgFilename);
i = strlen(dirname) - 1;
@@ -180,18 +180,18 @@
break;
}
i--;
- }
+ }
disk_directory_create(ectx, dirname);
if ( ( (0 != ACCESS(cfgFilename, W_OK)) &&
( (errno != ENOENT) ||
- (0 != ACCESS(dirname, W_OK))) ) )
+ (0 != ACCESS(dirname, W_OK))) ) )
GE_DIE_STRERROR_FILE(ectx,
GE_FATAL | GE_USER | GE_ADMIN | GE_IMMEDIATE,
"access",
- dirname);
+ dirname);
FREE(dirname);
-
- if (0 == ACCESS(cfgFilename, F_OK))
+
+ if (0 == ACCESS(cfgFilename, F_OK))
GC_parse_configuration(cfg,
cfgFilename);
dirname = os_get_installation_path(IPK_DATADIR);
@@ -199,15 +199,15 @@
specname = MALLOC(strlen(dirname) + strlen("config-daemon.scm") + 1);
strcpy(specname, dirname);
FREE(dirname);
- if (config_daemon)
+ if (config_daemon)
strcat(specname, "config-daemon.scm");
- else
- strcat(specname, "config-client.scm");
+ else
+ strcat(specname, "config-client.scm");
gns = GNS_load_specification(ectx,
cfg,
- specname);
+ specname);
FREE(specname);
- if (gns == NULL) {
+ if (gns == NULL) {
GC_free(cfg);
GE_free_context(ectx);
FREE(cfgFilename);
@@ -221,12 +221,12 @@
if (strcmp(operation, modules[i]) == 0) {
if (dyn_config(modules[i+1],
modules[i+2],
- argc,
+ argc,
argv,
cfgFilename) != YES) {
GE_LOG(ectx,
GE_FATAL | GE_USER | GE_ADMIN | GE_IMMEDIATE,
- _("`%s' is not available."),
+ _("`%s' is not available."),
operation);
GNS_free_specification(gns);
GC_free(cfg);
@@ -242,7 +242,7 @@
FREE(cfgFilename);
if (done == NO) {
fprintf(stderr,
- _("Unknown operation `%s'\n"),
+ _("Unknown operation `%s'\n"),
operation);
fprintf(stderr,
_("Use --help to get a list of options.\n"));
Modified: GNUnet/src/setup/gnunet-win-tool.c
===================================================================
--- GNUnet/src/setup/gnunet-win-tool.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gnunet-win-tool.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -338,7 +338,7 @@
res = OK;
/* startup */
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -351,7 +351,7 @@
if (res == SYSERR)
{
GE_free_context(ectx);
- return -1;
+ return -1;
}
if (bPrintAdapters)
Modified: GNUnet/src/setup/gtk/gconf.c
===================================================================
--- GNUnet/src/setup/gtk/gconf.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gtk/gconf.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -97,7 +97,7 @@
SETUP_HELPTEXT, pos->help,
-1);
switch (pos->type & GNS_KindMask) {
- case GNS_Node:
+ case GNS_Node:
i = 0;
while (pos->children[i] != NULL) {
addToTree(model,
@@ -173,13 +173,13 @@
gtk_list_store_insert_with_values(cmodel,
&it2,
-1,
- 0, valStr,
+ 0, valStr,
-1);
if (0 != strcmp(valStr, defStr)) {
gtk_list_store_insert_with_values(cmodel,
&it2,
-1,
- 0, valStr,
+ 0, valStr,
-1);
}
gtk_tree_store_set(model,
@@ -199,13 +199,13 @@
gtk_list_store_insert_with_values(cmodel,
&it2,
-1,
- 0, valStr,
+ 0, valStr,
-1);
if (0 != strcmp(valStr, defStr)) {
gtk_list_store_insert_with_values(cmodel,
&it2,
-1,
- 0, valStr,
+ 0, valStr,
-1);
}
gtk_tree_store_set(model,
@@ -223,14 +223,14 @@
&it);
return;
}
- break;
+ break;
case GNS_Root:
default:
GE_ASSERT(NULL, 0);
gtk_tree_store_remove(model,
&it);
return;
- }
+ }
}
typedef struct {
@@ -242,11 +242,11 @@
GtkTreePath * path,
gpointer user_data) {
CR_Context * ctx = user_data;
-
+
GROW(ctx->paths,
ctx->size,
ctx->size+1);
- ctx->paths[ctx->size-1] = gtk_tree_path_to_string(path);
+ ctx->paths[ctx->size-1] = gtk_tree_path_to_string(path);
}
static void updateTreeModel(struct GNS_Context * gns) {
@@ -276,7 +276,7 @@
G_TYPE_BOOLEAN, /* combo visible? */
G_TYPE_STRING, /* description */
G_TYPE_STRING); /* help text */
-
+
tree = GNS_get_tree(gns);
i = 0;
while (tree->children[i] != NULL) {
@@ -291,7 +291,7 @@
treeView = lookup_widget("configTreeView");
gtk_tree_view_map_expanded_rows(GTK_TREE_VIEW(treeView),
&collectRows,
- &crCTX);
+ &crCTX);
/* update model */
gtk_tree_view_set_model(GTK_TREE_VIEW(treeView),
GTK_TREE_MODEL(model));
@@ -454,9 +454,9 @@
*/
void on_saveButton_activatesetup_gtk() {
GtkWidget * dialog;
-
+
if (0 == GC_write_configuration(cfg,
- cfg_filename)) {
+ cfg_filename)) {
dialog = gtk_message_dialog_new(NULL,
GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO,
@@ -502,7 +502,7 @@
return FALSE;
case GTK_RESPONSE_NO:
return FALSE;
- case GTK_RESPONSE_CANCEL:
+ case GTK_RESPONSE_CANCEL:
default:
return TRUE;
}
@@ -544,7 +544,7 @@
#endif
gtk_main();
gdk_threads_leave();
- destroyMainXML();
+ destroyMainXML();
setLibrary(NULL);
g_object_unref(G_OBJECT(no_model));
no_model = NULL;
@@ -553,8 +553,8 @@
/* Main */
-int gconf_mainsetup_gtk(int argc,
- const char ** argv,
+int gconf_mainsetup_gtk(int argc,
+ const char ** argv,
struct PluginHandle * self,
struct GE_Context * ectx,
struct GC_Configuration * cfg,
@@ -572,7 +572,7 @@
return gconf_main_post_init(self,
ectx,
cfg,
- gns,
+ gns,
filename,
is_daemon);
}
Modified: GNUnet/src/setup/gtk/gconf.h
===================================================================
--- GNUnet/src/setup/gtk/gconf.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gtk/gconf.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -28,8 +28,8 @@
#ifndef GNUNET_SETUP_GCONF_H
#define GNUNET_SETUP_GCONF_H
-int gconf_mainsetup_gtk(int argc,
- const char ** argv,
+int gconf_mainsetup_gtk(int argc,
+ const char ** argv,
struct PluginHandle * self,
struct GE_Context * ectx,
struct GC_Configuration * cfg,
@@ -38,5 +38,5 @@
int is_daemon);
void gconf_main_post_init(struct PluginHandle * lib);
-
+
#endif
Modified: GNUnet/src/setup/gtk/glade_support.c
===================================================================
--- GNUnet/src/setup/gtk/glade_support.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/setup/gtk/glade_support.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -69,8 +69,8 @@
method = os_plugin_resolve_function(library,
handler_name,
YES);
- if (method == NULL)
- return;
+ if (method == NULL)
+ return;
glade_xml_signal_connect(xml,
handler_name,
(GCallback) method);
@@ -84,7 +84,7 @@
ret = glade_xml_new(gladeFile,
dialog_name,
PACKAGE_NAME);
- if (ret == NULL)
+ if (ret == NULL)
GE_DIE_STRERROR_FILE(NULL,
GE_USER | GE_ADMIN | GE_FATAL | GE_IMMEDIATE,
"open",
@@ -112,7 +112,7 @@
GtkWidget * msgSave;
char * gladeFile;
GladeXML * myXML;
-
+
gladeFile = get_glade_filename();
myXML = glade_xml_new(gladeFile,
name,
Modified: GNUnet/src/setup/gtk/glade_support.h
===================================================================
--- GNUnet/src/setup/gtk/glade_support.h 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/setup/gtk/glade_support.h 2006-10-21 19:58:30 UTC (rev
3530)
@@ -34,9 +34,9 @@
void setLibrary(struct PluginHandle * lib);
GtkWidget * get_xml(const char * dialog_name);
-
+
GladeXML * load_xml(const char * dialog_name);
-
+
/**
* Helper function to just show a simple dialog
* that requires no initialization.
Modified: GNUnet/src/setup/gtk/wizard_gtk.c
===================================================================
--- GNUnet/src/setup/gtk/wizard_gtk.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gtk/wizard_gtk.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -42,7 +42,7 @@
#include "confdata.h"
/**
- * Current open window.
+ * Current open window.
*/
static GtkWidget * curwnd;
@@ -74,7 +74,7 @@
quit = 1;
}
-void on_assi_destroy (GtkObject * object,
+void on_assi_destroy (GtkObject * object,
gpointer user_data) {
/* Don't terminate if the user just clicked "Next" */
if (quit)
@@ -87,7 +87,7 @@
int nic_item_count;
};
-void on_cmbNIC_changed (GtkComboBox * combobox,
+void on_cmbNIC_changed (GtkComboBox * combobox,
gpointer user_data) {
GtkTreeIter iter;
GValue val;
@@ -100,13 +100,13 @@
#endif
struct symbol *sym;
GtkTreeModel *model;
-
+
gtk_combo_box_get_active_iter(combobox, &iter);
model = gtk_combo_box_get_model(combobox);
memset(&val, 0, sizeof(val));
gtk_tree_model_get_value(model, &iter, 0, &val);
entry = (char *) g_value_get_string(&val);
-
+
#ifdef MINGW
idx = strrchr(entry, '-');
if (! idx)
@@ -133,7 +133,7 @@
gtk_combo_box_append_text(GTK_COMBO_BOX(cmbNIC), name);
defaultNIC = wiz_is_nic_default(name, defaultNIC);
- if (defaultNIC)
+ if (defaultNIC)
gtk_combo_box_set_active(GTK_COMBO_BOX(cmbNIC), inc->nic_item_count);
}
@@ -161,27 +161,27 @@
sym = sym_find("INTERFACE", "NETWORK");
if (sym != NULL) {
-
+
enumNetworkIfs(&insert_nic, &cls);
-
+
if (cls.nic_item_count != 0) {
/* ifconfig unavailable */
-
+
sym_calc_value_ext(sym, 1);
nic = (char *) sym_get_string_value(sym);
-
+
if (!nic || strlen(nic) == 0)
nic = "eth0";
gtk_combo_box_append_text(GTK_COMBO_BOX(cls.cmbNIC), nic);
- gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model),
+ gtk_tree_model_get_iter_first(GTK_TREE_MODEL(model),
&iter);
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(cls.cmbNIC), &iter);
on_cmbNIC_changed(GTK_COMBO_BOX(cls.cmbNIC), NULL);
}
-
+
gtk_widget_set_usize(cls.cmbNIC, 10, -1);
}
-
+
entIP = lookup_widget("entIP");
sym = sym_find("IP", "NETWORK");
if (sym != NULL) {
@@ -191,7 +191,7 @@
val = "";
gtk_entry_set_text(GTK_ENTRY(entIP), val);
}
-
+
chkFW = lookup_widget("chkFW");
sym = sym_find("LIMITED", "NAT");
if (sym != NULL) {
@@ -211,13 +211,13 @@
GtkWidget * radShare;
GtkWidget * entCPU;
const char * val;
-
+
destroyCurrentWindow();
curwnd = get_xml("assi_step3");
entUp = lookup_widget("entUp");
- entDown = lookup_widget("entDown");
+ entDown = lookup_widget("entDown");
radGNUnet = lookup_widget("radGNUnet");
- radShare = lookup_widget("radShare");
+ radShare = lookup_widget("radShare");
entCPU = lookup_widget("entCPU");
sym = sym_find("MAXNETUPBPSTOTAL", "LOAD");
@@ -239,9 +239,9 @@
sym = sym_find("BASICLIMITING", "LOAD");
if (sym) {
sym_calc_value_ext(sym, 1);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_get_tristate_value(sym)
!= no
- ? radGNUnet
- : radShare ),
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(sym_get_tristate_value(sym)
!= no
+ ? radGNUnet
+ : radShare ),
TRUE);
}
sym = sym_find("MAXCPULOAD", "LOAD");
@@ -350,14 +350,14 @@
GtkWidget * chkEnh;
GtkWidget * chkStart;
const char * val;
-
+
destroyCurrentWindow();
curwnd = get_xml("assi_step5");
- entQuota = lookup_widget("entQuota");
+ entQuota = lookup_widget("entQuota");
chkMigr = lookup_widget("chkMigr");
chkStart = lookup_widget("chkStart");
chkEnh = lookup_widget("chkEnh");
-
+
sym = sym_find("QUOTA", "FS");
if (sym) {
sym_calc_value_ext(sym, 1);
@@ -366,17 +366,17 @@
val = "";
gtk_entry_set_text(GTK_ENTRY(entQuota), val);
}
-
+
sym = sym_find("ACTIVEMIGRATION", "FS");
if (sym) {
sym_calc_value_ext(sym, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chkMigr),
sym_get_tristate_value(sym) != no);
}
-
+
if (isOSAutostartCapable())
gtk_widget_set_sensitive(chkStart, TRUE);
-
+
sym = sym_find("AUTOSTART", "GNUNETD");
if (sym) {
sym_calc_value_ext(sym, 1);
@@ -395,24 +395,24 @@
gtk_widget_destroy(msgSaveFailed);
}
-static void showErr(const char * prefix,
+static void showErr(const char * prefix,
const char * error) {
GtkWidget * label98;
GtkWidget * msgSaveFailed;
- char * err;
+ char * err;
GladeXML * myXML;
-
+
myXML = load_xml("msgSaveFailed");
msgSaveFailed = glade_xml_get_widget(myXML,
"msgSaveFailed");
- label98 = glade_xml_get_widget(myXML, "label98");
+ label98 = glade_xml_get_widget(myXML, "label98");
err = MALLOC(strlen(prefix) + strlen(error) + 2);
- sprintf(err,
- "%s %s",
- prefix,
- error);
- gtk_label_set_text(GTK_LABEL(label98), err);
- FREE(err);
+ sprintf(err,
+ "%s %s",
+ prefix,
+ error);
+ gtk_label_set_text(GTK_LABEL(label98), err);
+ FREE(err);
gtk_widget_show(msgSaveFailed);
g_object_unref(myXML);
}
@@ -440,12 +440,12 @@
return OK;
}
-void on_saveYes_clicked (GtkButton * button,
+void on_saveYes_clicked (GtkButton * button,
gpointer user_data) {
int i;
GtkWidget * msgSave = user_data;
- i = save_conf();
+ i = save_conf();
gtk_widget_destroy(msgSave);
if (OK == i) {
quit = 1;
@@ -453,7 +453,7 @@
}
}
-void on_saveNo_clicked (GtkButton * button,
+void on_saveNo_clicked (GtkButton * button,
gpointer user_data) {
GtkWidget * msgSave = user_data;
@@ -462,13 +462,13 @@
gtk_widget_destroy(curwnd);
}
-void on_abort_clicked(GtkButton * button,
+void on_abort_clicked(GtkButton * button,
gpointer user_data) {
showDialog("msgSave");
}
-void on_finish_clicked (GtkButton * button,
- gpointer user_data) {
+void on_finish_clicked (GtkButton * button,
+ gpointer user_data) {
if (doAutoStart && (user_name != NULL))
if (!wiz_createGroupUser(group_name, user_name)) {
#ifndef MINGW
@@ -476,34 +476,34 @@
#endif
return;
}
-
+
if (!wiz_autostartService(doAutoStart, user_name, group_name)) {
#ifndef MINGW
showErr(_("Unable to change startup process:"), STRERROR(errno));
#endif
}
-
+
if (OK != save_conf())
return;
-
+
if (doUpdate &&
(system("gnunet-update") != 0) )
- showDialog("msgUpdateFailed");
+ showDialog("msgUpdateFailed");
else
gtk_widget_destroy(curwnd);
}
-void on_updateFailedOK_clicked (GtkButton * button,
+void on_updateFailedOK_clicked (GtkButton * button,
gpointer user_data) {
GtkWidget * dialog = user_data;
gtk_widget_destroy(dialog);
}
-void on_entIP_changed (GtkEditable * editable,
+void on_entIP_changed (GtkEditable * editable,
gpointer user_data) {
struct symbol *sym;
gchar * ret;
-
+
sym = sym_lookup("IP", "NETWORK", 0);
ret = gtk_editable_get_chars(editable, 0, -1);
sym_set_string_value(sym, ret);
@@ -511,18 +511,18 @@
}
-void on_chkFW_toggled (GtkToggleButton * togglebutton,
+void on_chkFW_toggled (GtkToggleButton * togglebutton,
gpointer user_data) {
struct symbol *sym = sym_lookup("LIMITED", "NAT", 0);
sym_set_tristate_value(sym,
gtk_toggle_button_get_active(togglebutton) ? yes : no);
}
-void on_entUp_changed (GtkEditable * editable,
+void on_entUp_changed (GtkEditable * editable,
gpointer user_data) {
gchar * ret;
struct symbol *sym;
-
+
sym = sym_lookup("MAXNETUPBPSTOTAL", "LOAD", 0);
ret = gtk_editable_get_chars(editable, 0, -1);
sym_set_string_value(sym, ret);
@@ -530,7 +530,7 @@
}
-void on_entDown_changed (GtkEditable * editable,
+void on_entDown_changed (GtkEditable * editable,
gpointer user_data) {
struct symbol *sym;
gchar * ret;
@@ -542,7 +542,7 @@
}
-void on_radGNUnet_toggled(GtkToggleButton * togglebutton,
+void on_radGNUnet_toggled(GtkToggleButton * togglebutton,
gpointer user_data) {
struct symbol *sym = sym_lookup("BASICLIMITING", "LOAD", 0);
sym_set_tristate_value(sym,
@@ -550,7 +550,7 @@
}
-void on_radShare_toggled (GtkToggleButton * togglebutton,
+void on_radShare_toggled (GtkToggleButton * togglebutton,
gpointer user_data) {
struct symbol *sym = sym_lookup("BASICLIMITING", "LOAD", 0);
sym_set_tristate_value(sym,
@@ -558,7 +558,7 @@
}
-void on_entCPU_changed (GtkEditable * editable,
+void on_entCPU_changed (GtkEditable * editable,
gpointer user_data) {
struct symbol *sym;
gchar * ret;
@@ -569,14 +569,14 @@
g_free(ret);
}
-void on_chkMigr_toggled (GtkToggleButton * togglebutton,
+void on_chkMigr_toggled (GtkToggleButton * togglebutton,
gpointer user_data) {
struct symbol *sym = sym_lookup("ACTIVEMIGRATION", "FS", 0);
sym_set_tristate_value(sym,
gtk_toggle_button_get_active(togglebutton) ? yes : no);
}
-void on_entQuota_changed (GtkEditable * editable,
+void on_entQuota_changed (GtkEditable * editable,
gpointer user_data) {
struct symbol *sym;
gchar * ret;
@@ -588,7 +588,7 @@
}
-void on_chkStart_toggled (GtkToggleButton * togglebutton,
+void on_chkStart_toggled (GtkToggleButton * togglebutton,
gpointer user_data) {
struct symbol *sym = sym_lookup("AUTOSTART", "GNUNETD", 0);
doAutoStart = gtk_toggle_button_get_active(togglebutton);
@@ -596,12 +596,12 @@
}
-void on_chkEnh_toggled (GtkToggleButton * togglebutton,
+void on_chkEnh_toggled (GtkToggleButton * togglebutton,
gpointer user_data) {
doOpenEnhConfigurator = gtk_toggle_button_get_active(togglebutton);
}
-void on_chkUpdate_toggled(GtkToggleButton * togglebutton,
+void on_chkUpdate_toggled(GtkToggleButton * togglebutton,
gpointer user_data) {
doUpdate = gtk_toggle_button_get_active(togglebutton);
}
@@ -621,7 +621,7 @@
else
user_name = NULL;
g_free(ret);
-
+
}
void on_entGroup_changed (GtkEditable * editable,
@@ -642,7 +642,7 @@
}
-int gtk_wizard_main(int argc,
+int gtk_wizard_main(int argc,
char **argv,
void * lib) {
struct symbol * sym;
@@ -650,7 +650,7 @@
setLibrary(lib);
g_thread_init(NULL);
- gtk_init(&argc, &argv);
+ gtk_init(&argc, &argv);
#ifdef ENABLE_NLS
bind_textdomain_codeset(PACKAGE, "UTF-8"); /* for gtk */
#endif
Modified: GNUnet/src/setup/gtk/wizard_gtk.h
===================================================================
--- GNUnet/src/setup/gtk/wizard_gtk.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/gtk/wizard_gtk.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -28,7 +28,7 @@
#ifndef WIZARD_GTK_H
#define WIZARD_GTK_H
-int gtk_wizard_main(int argc,
+int gtk_wizard_main(int argc,
char **argv,
void * library);
Modified: GNUnet/src/setup/lib/gns.c
===================================================================
--- GNUnet/src/setup/lib/gns.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/lib/gns.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -50,7 +50,7 @@
struct GC_Configuration * cfg;
struct GNS_Tree * root;
-
+
GNS_TCL * listeners;
unsigned int in_notify;
@@ -58,7 +58,7 @@
};
static void notify_listeners(void * ctx,
- struct GNS_Tree * tree) {
+ struct GNS_Tree * tree) {
struct GNS_Context * g = ctx;
GNS_TCL * lpos;
@@ -84,15 +84,15 @@
* refused
*/
int configChangeListener(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
struct GNS_Context * g = ctx;
struct GNS_Tree * pos;
-
+
pos = tree_lookup(g->root,
- section,
+ section,
option);
if (pos == NULL) {
GE_LOG(g->ectx,
@@ -118,7 +118,7 @@
val = GC_get_configuration_value_yesno(cfg,
section,
option,
- pos->value.Boolean.def);
+ pos->value.Boolean.def);
if (val == SYSERR) {
return SYSERR;
}
@@ -216,7 +216,7 @@
i++;
}
switch (t->type & GNS_TypeMask) {
- case 0:
+ case 0:
break; /* no value */
case GNS_Boolean:
case GNS_UInt64:
@@ -244,8 +244,8 @@
/**
* Start the setup process by loading a scheme file that
- * contains the configuration specification.
- *
+ * contains the configuration specification.
+ *
* @param ectx for error reporting
* @param cfg configuration values that have a known initial value
* @param specification name of the guile file containing the spec
@@ -276,7 +276,7 @@
FREE(ctx);
free_tree(root);
return NULL;
- }
+ }
return ctx;
}
@@ -296,7 +296,7 @@
/**
* Free resources associated with the GNS context.
*/
-void
+void
GNS_free_specification(struct GNS_Context * ctx) {
GC_detach_change_listener(ctx->cfg,
&configChangeListener,
@@ -311,12 +311,12 @@
*
* @param listener callback to call whenever the tree changes
*/
-void
+void
GNS_register_tree_change_listener(struct GNS_Context * ctx,
GNS_TreeChangeListener listener,
void * cls) {
GNS_TCL * n;
-
+
n = MALLOC(sizeof(GNS_TCL));
n->l = listener;
n->c = cls;
@@ -328,7 +328,7 @@
* Release a tree change listener from GNS (do not call the listener
* in the future for change events).
*/
-void
+void
GNS_unregister_tree_change_listener(struct GNS_Context * ctx,
GNS_TreeChangeListener listener,
void * cls) {
Modified: GNUnet/src/setup/lib/tree.c
===================================================================
--- GNUnet/src/setup/lib/tree.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/lib/tree.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -33,7 +33,7 @@
typedef struct {
VisibilityChangeListener vcl;
- void * ctx;
+ void * ctx;
struct GNS_Tree * root;
struct GC_Configuration * cfg;
} TC;
@@ -43,19 +43,19 @@
static scm_t_bits tc_tag;
static scm_t_bits tree_tag;
-
+
static SCM
box_tc(TC * tc) {
SCM smob;
-
+
SCM_NEWSMOB (smob, tc_tag, tc);
return smob;
}
-static SCM
+static SCM
box_tree(struct GNS_Tree * tree) {
SCM smob;
-
+
SCM_NEWSMOB (smob, tree_tag, tree);
return smob;
}
@@ -64,31 +64,31 @@
free_box(SCM smob) {
return 0;
}
-
+
static int
-print_tc(SCM tc_smob,
- SCM port,
+print_tc(SCM tc_smob,
+ SCM port,
scm_print_state *pstate) {
- /* TC * tc = (TC *) SCM_SMOB_DATA (tc_smob); */
+ /* TC * tc = (TC *) SCM_SMOB_DATA (tc_smob); */
scm_puts ("TC", port);
/* non-zero means success */
return 1;
}
static int
-print_tree(SCM tree_smob,
- SCM port,
+print_tree(SCM tree_smob,
+ SCM port,
scm_print_state *pstate) {
/* struct GNS_Tree * tree = (struct GNS_Tree *) SCM_SMOB_DATA (tree_smob); */
-
+
scm_puts ("Tree", port);
/* non-zero means success */
return 1;
}
/* **************************** tree API ****************** */
-
-struct GNS_Tree *
+
+struct GNS_Tree *
tree_lookup(struct GNS_Tree * root,
const char * section,
const char * option) {
@@ -135,7 +135,7 @@
case 0:
return SCM_EOL; /* no value */
case GNS_Boolean:
- return (t->value.Boolean.val) ? SCM_BOOL_T : SCM_BOOL_F;
+ return (t->value.Boolean.val) ? SCM_BOOL_T : SCM_BOOL_F;
case GNS_UInt64:
return scm_from_uint64(t->value.UInt64.val);
case GNS_Double:
@@ -146,7 +146,7 @@
GE_BREAK(NULL, 0);
return SCM_EOL;
}
-
+
/**
* Change the visibility of an entry in the
* tree (and notify listeners about change).
@@ -176,7 +176,7 @@
if (t != NULL) {
t->visible = val;
tc->vcl(tc->ctx,
- t);
+ t);
} else {
fprintf(stderr,
_("Internal error: entry `%s' in section `%s' not found for
visibility change!\n"),
@@ -188,7 +188,7 @@
if (opt != NULL)
free(opt);
return SCM_EOL;
-}
+}
/**
* Set an option.
@@ -210,7 +210,7 @@
tc = (TC *) SCM_SMOB_DATA(smob);
opt = scm_to_locale_string(option);
sec = scm_to_locale_string(section);
- val = scm_to_locale_string(value);
+ val = scm_to_locale_string(value);
GC_set_configuration_value_string(tc->cfg,
NULL,
sec,
@@ -227,7 +227,7 @@
/**
* Create a node in the tree.
- *
+ *
* @param value the current value (must also be default value)
* @param range information about the legal range of values;
* maybe list of strings for string values or pair
@@ -263,7 +263,7 @@
if (scm_is_string(value)) {
SCM_ASSERT(scm_list_p(range), range, SCM_ARGn, "build_tree_node");
len = scm_to_int(scm_length(range));
- for (i=0;i<len;i++)
+ for (i=0;i<len;i++)
SCM_ASSERT(scm_string_p(scm_list_ref(range, scm_from_signed_integer(i))),
range, SCM_ARGn, "build_tree_node");
} else if (scm_is_integer(value)) {
@@ -278,9 +278,9 @@
} else if (scm_is_true(scm_boolean_p(value))) {
/* no checks */
} else {
- SCM_ASSERT(0,
+ SCM_ASSERT(0,
range,
- SCM_ARG7,
+ SCM_ARG7,
"build_tree_node"); /* invalid type */
}
@@ -291,7 +291,7 @@
tree->description = scm_to_locale_string(description);
tree->help = scm_to_locale_string(help);
tree->children = MALLOC(sizeof(struct GNS_Tree*) * (clen + 1));
- for (i=0;i<clen;i++) {
+ for (i=0;i<clen;i++) {
child = scm_list_ref(children, scm_from_signed_integer(i));
tree->children[i] = (struct GNS_Tree*) SCM_SMOB_DATA(child);
}
@@ -303,10 +303,10 @@
tree->value.String.val = scm_to_locale_string(value);
tree->value.String.def = scm_to_locale_string(value);
len = scm_to_int(scm_length(range));
- tree->value.String.legalRange = MALLOC(sizeof(char*) * (len + 1));
- for (i=0;i<len;i++)
- tree->value.String.legalRange[i]
- = scm_to_locale_string(scm_list_ref(range,
+ tree->value.String.legalRange = MALLOC(sizeof(char*) * (len + 1));
+ for (i=0;i<len;i++)
+ tree->value.String.legalRange[i]
+ = scm_to_locale_string(scm_list_ref(range,
scm_from_signed_integer(i)));
tree->value.String.legalRange[len] = NULL;
tree->type |= GNS_String;
@@ -348,7 +348,7 @@
struct GNS_Tree *
tree_parse(struct GE_Context * ectx,
- const char * specification) {
+ const char * specification) {
struct GNS_Tree * ret;
ret = scm_with_guile(parse_internal,
@@ -388,7 +388,7 @@
struct GNS_Tree * root,
struct GNS_Tree * change) {
TC tc;
-
+
tc.cfg = cfg;
tc.vcl = vcl;
tc.ctx = ctx;
@@ -407,7 +407,7 @@
scm_set_smob_free (tree_tag, free_box);
scm_set_smob_print (tree_tag, print_tree);
scm_c_define_gsubr("change-visible",
- 4, 0, 0,
+ 4, 0, 0,
&change_visible);
scm_c_define_gsubr("build-tree-node",
8, 0, 0,
@@ -432,7 +432,7 @@
char *oldpath, *env;
char load[MAX_PATH + 1];
int len;
-
+
InitWinEnv();
/* add path of "system" .scm files to guile's load path */
Modified: GNUnet/src/setup/lib/tree.h
===================================================================
--- GNUnet/src/setup/lib/tree.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/lib/tree.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -32,7 +32,7 @@
tree_parse(struct GE_Context * ectx,
const char * specification);
-struct GNS_Tree *
+struct GNS_Tree *
tree_lookup(struct GNS_Tree * root,
const char * section,
const char * option);
@@ -41,7 +41,7 @@
struct GNS_Tree * tree);
/**
- * A value in the tree has been changed.
+ * A value in the tree has been changed.
* Update visibility (and notify about changes).
*/
void tree_notify_change(struct GC_Configuration * cfg,
Modified: GNUnet/src/setup/ncurses/mconf.c
===================================================================
--- GNUnet/src/setup/ncurses/mconf.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/ncurses/mconf.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -53,7 +53,7 @@
static void run_menu(struct GNS_Context * ctx,
struct GNS_Tree * pos,
- struct GC_Configuration * cfg) {
+ struct GC_Configuration * cfg) {
int st;
int i;
DIALOG_LISTITEM * items;
@@ -100,22 +100,22 @@
if (pos->children[i]->visible) {
items[st].name = pos->children[i]->option;
items[st].text = gettext(pos->children[i]->description);
- items[st].help = gettext(pos->children[i]->help);
+ items[st].help = gettext(pos->children[i]->help);
items[st].state = 0;
st++;
}
i++;
- }
+ }
st = dlg_menu(gettext(pos->description),
"Select configuration option to change",
- 20,
+ 20,
70,
13,
st,
items,
&msel,
NULL);
- FREE(items);
+ FREE(items);
switch (st) {
case DLG_EXIT_OK:
i = 0;
@@ -160,8 +160,8 @@
show_help(pos->option,
gettext_noop("Internal error! (Choice invalid?)"));
break;
- }
- return;
+ }
+ return;
case DLG_EXIT_HELP:
show_help(pos->option, pos->help);
break;
@@ -174,7 +174,7 @@
break;
case GNS_String:
if (pos->value.String.legalRange[0] == NULL) {
- /* free form */
+ /* free form */
fitem.text = MALLOC(65536);
strcpy(fitem.text,
pos->value.String.val);
@@ -200,7 +200,7 @@
gettext_noop("Internal error! (Value invalid?)"));
break;
}
- FREE(fitem.text);
+ FREE(fitem.text);
return;
case DLG_EXIT_HELP:
show_help(pos->option, pos->help);
@@ -208,21 +208,21 @@
default:
break;
}
- FREE(fitem.text);
+ FREE(fitem.text);
/* end free form */
} else {
/* begin choice */
val = &pos->value;
i = 0;
- while (val->String.legalRange[i] != NULL)
+ while (val->String.legalRange[i] != NULL)
i++;
GE_ASSERT(ectx, i != 0);
items = MALLOC(sizeof(DIALOG_LISTITEM) * i);
i = 0;
- msel = -1;
-
- while (val->String.legalRange[i] != NULL) {
+ msel = -1;
+
+ while (val->String.legalRange[i] != NULL) {
items[i].name = "";
items[i].text = val->String.legalRange[i];
items[i].help = "";
@@ -234,7 +234,7 @@
}
if ( (msel == -1) &&
(0 == strcmp(val->String.legalRange[i],
- val->String.def)) )
+ val->String.def)) )
msel = i;
i++;
}
@@ -247,7 +247,7 @@
items,
" *",
FLAG_RADIO,
- &msel);
+ &msel);
FREE(items);
switch (st) {
case DLG_EXIT_OK:
@@ -259,7 +259,7 @@
show_help(pos->option,
gettext_noop("Internal error! (Choice invalid?)"));
break;
- }
+ }
return;
case DLG_EXIT_HELP:
show_help(pos->option,
@@ -300,7 +300,7 @@
show_help(pos->option,
gettext_noop("Invalid input, expecting floating point
value."));
break;
- }
+ }
if (0 != GC_set_configuration_value_string(cfg,
ectx,
pos->section,
@@ -308,10 +308,10 @@
fitem.text)) {
show_help(pos->option,
gettext_noop("Internal error! (Value invalid?)"));
- FREE(fitem.text);
+ FREE(fitem.text);
break;
}
- FREE(fitem.text);
+ FREE(fitem.text);
return;
case DLG_EXIT_HELP:
show_help(pos->option, pos->help);
@@ -319,10 +319,10 @@
default:
break;
}
- FREE(fitem.text);
+ FREE(fitem.text);
break;
- case GNS_UInt64:
+ case GNS_UInt64:
fitem.text = MALLOC(64);
SNPRINTF(fitem.text,
64,
@@ -349,7 +349,7 @@
show_help(pos->option,
gettext_noop("Invalid input, expecting integer."));
continue;
- }
+ }
if ( (lval < pos->value.UInt64.min) ||
(lval > pos->value.UInt64.max)) {
show_help(pos->option,
@@ -373,7 +373,7 @@
break;
}
}
- FREE(fitem.text);
+ FREE(fitem.text);
return;
default:
GE_BREAK(ectx, 0);
@@ -385,8 +385,8 @@
GE_BREAK(ectx, 0);
break;
- } /* end switch type & Kind */
- } /* end while(1) */
+ } /* end switch type & Kind */
+ } /* end while(1) */
}
@@ -405,7 +405,7 @@
#ifndef MINGW
tcgetattr(1, &ios_org);
#endif
- dialog_vars.backtitle = _("GNUnet Configuration");
+ dialog_vars.backtitle = _("GNUnet Configuration");
dialog_vars.item_help = 1;
dialog_vars.help_button = 1;
@@ -419,7 +419,7 @@
if ( (0 == GC_test_dirty(cfg)) &&
(0 == ACCESS(filename, R_OK)) ) {
end_dialog();
- printf(_("Configuration unchanged, no need to save.\n"));
+ printf(_("Configuration unchanged, no need to save.\n"));
} else {
dialog_vars.help_button = 0;
ret = dialog_yesno(NULL,
@@ -432,7 +432,7 @@
/* error message already printed... */
ret = 1;
} else {
- ret = 0;
+ ret = 0;
}
printf(_("\nEnd of configuration.\n"));
} else {
Modified: GNUnet/src/setup/ncurses/wizard_curs.c
===================================================================
--- GNUnet/src/setup/ncurses/wizard_curs.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/setup/ncurses/wizard_curs.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -87,7 +87,7 @@
struct GC_Configuration * cfg,
struct GNS_Context * gns,
const char * filename,
- int is_daemon)
+ int is_daemon)
void *active_ptr = NULL;
int idx, ret, autostart = 0, adv = 0;
struct symbol *sym;
Modified: GNUnet/src/setup/text/conf.c
===================================================================
--- GNUnet/src/setup/text/conf.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/text/conf.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -28,7 +28,7 @@
* @author Roman Zippel
* @author Nils Durner
* @author Christian Grothoff
- *
+ *
* TODO:
* - support editing of string inputs...
*/
@@ -50,7 +50,7 @@
/**
* printf with indentation
- */
+ */
static void iprintf(int indent,
const char * format,
...) {
@@ -97,7 +97,7 @@
switch (type & GNS_TypeMask) {
case GNS_Boolean:
- iprintf(indent,
+ iprintf(indent,
_("\tEnter yes (%s), no (%s) or help (%s): "),
val->Boolean.def ? "Y" : "y",
val->Boolean.def ? "n" : "N",
@@ -118,7 +118,7 @@
while (val->String.legalRange[i] != NULL) {
iprintf(indent,
"\t (%c) %s\n",
- (i < 10) ? '0' + i : 'a' + i - 10,
+ (i < 10) ? '0' + i : 'a' + i - 10,
val->String.legalRange[i]);
if (0 == strcmp(val->String.legalRange[i],
val->String.def))
@@ -162,7 +162,7 @@
int i;
int j;
unsigned long long l;
-
+
switch (type & GNS_TypeMask) {
case GNS_Boolean:
while (1) {
@@ -267,7 +267,7 @@
i = -1;
break;
}
- if (i == -1)
+ if (i == -1)
continue; /* invalid entry */
FREE(val->String.val);
val->String.val = STRDUP(val->String.legalRange[i]);
@@ -297,7 +297,7 @@
if ( (buf[i] == 'd') && (i == 0) ) {
val->Double.val = val->Double.def;
printf("%f\n",
- val->Double.val);
+ val->Double.val);
return YES; /* default */
}
if (buf[i] == '?') {
@@ -313,7 +313,7 @@
}
if (i == 0) {
printf("%f\n",
- val->Double.val);
+ val->Double.val);
return YES; /* keep */
}
buf[i+1] = '\0';
@@ -347,7 +347,7 @@
if ( (buf[i] == 'd') && (i == 0) ) {
val->UInt64.val = val->UInt64.def;
printf("%llu\n",
- val->UInt64.val);
+ val->UInt64.val);
return YES; /* default */
}
if (buf[i] == '?') {
@@ -363,7 +363,7 @@
}
if (i == 0) {
printf("%llu\n",
- val->UInt64.val);
+ val->UInt64.val);
return YES; /* keep */
}
buf[i+1] = '\0';
@@ -413,7 +413,7 @@
iprintf(indent,
"%s\n",
gettext(tree->description));
- printChoice(indent,
+ printChoice(indent,
tree->type,
&tree->value);
i = readValue(tree->type,
@@ -441,7 +441,7 @@
FREE(value);
FREE(ovalue);
return conf(indent,
- cfg,
+ cfg,
ectx,
tree); /* try again */
}
@@ -462,7 +462,7 @@
case 'N':
case 'n':
iprintf(indent,
- "%c\n",
+ "%c\n",
choice);
return OK;
case 'q':
@@ -471,7 +471,7 @@
return SYSERR; /* escape */
case '?':
iprintf(indent,
- "%c\n",
+ "%c\n",
choice);
iprintf(indent,
"%s\n",
@@ -481,19 +481,19 @@
case 'Y':
case 'y':
iprintf(indent,
- "%c\n",
+ "%c\n",
choice);
break;
default:
iprintf(indent,
- "%c\n",
+ "%c\n",
choice);
iprintf(indent,
_("Invalid entry.\n"));
choice = '\0';
break;
}
- }
+ }
/* fall-through! */
case GNS_Root:
i = 0;
@@ -515,8 +515,8 @@
return SYSERR;
}
-int main_setup_text(int argc,
- const char **argv,
+int main_setup_text(int argc,
+ const char **argv,
struct PluginHandle * self,
struct GE_Context * ectx,
struct GC_Configuration * cfg,
@@ -547,14 +547,14 @@
while (c == 'r') {
if (OK != conf(-1,
cfg,
- ectx,
+ ectx,
root)) {
ioctl(0, TCSETS, &oldT);
return 1;
}
if ( (0 == GC_test_dirty(cfg)) &&
(0 == ACCESS(filename, R_OK)) ) {
- printf(_("Configuration unchanged, no need to save.\n"));
+ printf(_("Configuration unchanged, no need to save.\n"));
ioctl(0, TCSETS, &oldT);
return 0;
}
@@ -564,12 +564,12 @@
c = rd();
} while ( (c != 'y') && (c != 'n') && (c != 'r') );
printf("%c\n", c);
- }
+ }
if (c == 'y') {
ret = GC_write_configuration(cfg,
filename);
if (ret == 1) {
- printf(_("Configuration was unchanged, no need to save.\n"));
+ printf(_("Configuration was unchanged, no need to save.\n"));
} else if (ret == -1) { /* error */
ioctl(0, TCSETS, &oldT);
return 1;
Modified: GNUnet/src/setup/text/conf.h
===================================================================
--- GNUnet/src/setup/text/conf.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/setup/text/conf.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -31,8 +31,8 @@
#include "gnunet_util.h"
#include "gnunet_setup_lib.h"
-int main_setup_text(int argc,
- const char ** argv,
+int main_setup_text(int argc,
+ const char ** argv,
struct PluginHandle * self,
struct GE_Context * ectx,
struct GC_Configuration * cfg,
Modified: GNUnet/src/transports/smtp.c
===================================================================
--- GNUnet/src/transports/smtp.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/smtp.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -286,7 +286,7 @@
int fd;
fd = disk_file_open(ectx,
- pipename,
+ pipename,
O_RDONLY);
if (fd == -1) {
if (smtp_shutdown == NO)
@@ -348,7 +348,7 @@
&mp->sender,
sizeof(PeerIdentity));
#if DEBUG_SMTP
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"SMTP message passed to the core.\n");
#endif
@@ -538,7 +538,7 @@
helo = (P2P_hello_MESSAGE*)tsession->internal;
if (helo == NULL)
return SYSERR;
-
+
smtp_sock = smtp_create_session();
if (smtp_sock == NULL) {
GE_LOG(ectx,
@@ -562,7 +562,7 @@
size);
ebody = NULL;
#if DEBUG_SMTP
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_REQUEST | GE_USER,
"Base64-encoding %d byte message.\n",
ssize);
@@ -590,7 +590,7 @@
smtp_set_messagecb(message,
&getMessage,
&msg);
-
+
#if 0
if (OK == writeSMTPLine(smtp_sock,
"%-*s\r\n",
@@ -701,7 +701,7 @@
if (mtu == 0)
mtu = MESSAGE_SIZE;
if (mtu < 1200)
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_ERROR | GE_BULK | GE_USER,
_("MTU for `%s' is probably too low (fragmentation not
implemented!)\n"),
"SMTP");
Modified: GNUnet/src/transports/tcp.c
===================================================================
--- GNUnet/src/transports/tcp.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/tcp.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -79,7 +79,7 @@
unsigned int addr_len) {
IPaddr ip;
int ret;
-
+
if (addr_len == sizeof(struct sockaddr_in)) {
memcpy(&ip,
&((struct sockaddr_in*) addr)->sin_addr,
@@ -164,7 +164,7 @@
if (once == 0) {
once = 1;
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"TCP port is 0, will only send using TCP.\n");
}
return NULL; /* TCP transport is configured SEND-only! */
@@ -182,7 +182,7 @@
return NULL;
}
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"TCP uses IP address %u.%u.%u.%u.\n",
PRIP(ntohl(*(int*)&haddr->ip)));
haddr->port = htons(port);
@@ -213,7 +213,7 @@
haddr = (HostAddress*) &helo[1];
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Creating TCP connection to %u.%u.%u.%u:%u.\n",
PRIP(ntohl(*(int*)&haddr->ip.addr)),
ntohs(haddr->port));
@@ -286,7 +286,7 @@
return SYSERR;
}
port = getGNUnetTCPPort();
- if (port == 0) {
+ if (port == 0) {
/* read-only TCP */
return OK;
}
@@ -304,7 +304,7 @@
SO_REUSEADDR,
&on,
sizeof(on)) < 0 )
- GE_DIE_STRERROR(ectx,
+ GE_DIE_STRERROR(ectx,
GE_FATAL | GE_ADMIN | GE_IMMEDIATE,
"setsockopt");
memset((char *) &serverAddr,
@@ -351,7 +351,7 @@
* configuration on error, syslog errors!)
*/
static int reloadConfiguration(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/tcp6.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -90,7 +90,7 @@
memcpy(&ip,
&((struct sockaddr_in6*) addr)->sin6_addr,
sizeof(IP6addr));
- } else {
+ } else {
return SYSERR;
}
MUTEX_LOCK(tcplock);
@@ -272,9 +272,9 @@
break;
}
freeaddrinfo(res0);
- if (sock == -1)
+ if (sock == -1)
return SYSERR;
-
+
return tcpConnectHelper(helo,
s,
tcp6API.protocolNumber,
@@ -360,7 +360,7 @@
* configuration on error, syslog errors!)
*/
static int reloadConfiguration(void * ctx,
- struct GC_Configuration * cfg,
+ struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
const char * option) {
@@ -374,7 +374,7 @@
"TCP",
"BLACKLIST",
NULL,
- &ch))
+ &ch))
filteredNetworks_ = parse_ipv6_network_specification(ectx,
"");
else {
Modified: GNUnet/src/transports/tcp_helper.c
===================================================================
--- GNUnet/src/transports/tcp_helper.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/tcp_helper.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -109,7 +109,7 @@
(tcpsession->in_select == YES) ) {
MUTEX_UNLOCK(tcpsession->lock);
return OK;
- }
+ }
#if DEBUG_TCP
GE_LOG(ectx,
GE_DEBUG | GE_USER | GE_BULK,
@@ -120,7 +120,7 @@
MUTEX_UNLOCK(tcpsession->lock);
if (tcpsession->in_select == NO) {
MUTEX_DESTROY(tcpsession->lock);
- FREE(tcpsession);
+ FREE(tcpsession);
FREE(tsession);
}
return OK;
@@ -182,15 +182,15 @@
stats->change(stat_bytesReceived,
len);
tcpSession = tsession->internal;
- if (YES == tcpSession->expectingWelcome) {
+ if (YES == tcpSession->expectingWelcome) {
welcome = (const TCPWelcome*) msg;
if ( (ntohs(welcome->header.type) != 0) ||
(len != sizeof(TCPWelcome)) ) {
GE_LOG(ectx,
GE_WARNING | GE_USER | GE_BULK,
_("Received malformed message instead of welcome message.
Closing.\n"));
- tcpDisconnect(tsession);
- return SYSERR;
+ tcpDisconnect(tsession);
+ return SYSERR;
}
tcpSession->expectingWelcome = NO;
tcpSession->sender = welcome->clientIdentity;
@@ -235,14 +235,14 @@
if (NO != blt(addr, addr_len)) {
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Rejecting TCP connection (blacklisted).\n");
#endif
return NULL;
}
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Accepting TCP connection.\n");
#endif
tcpSession = MALLOC(sizeof(TCPSession));
@@ -307,7 +307,7 @@
size);
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Could not sent TCP message -- tcp transport is down.\n");
#endif
return SYSERR;
@@ -322,7 +322,7 @@
size);
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Could not sent TCP message -- other side closed connection.\n");
#endif
return SYSERR; /* other side closed connection */
@@ -379,7 +379,7 @@
tcpSession->sender = helo->senderIdentity;
tcpSession->expectingWelcome = NO;
MUTEX_LOCK(tcplock);
- if (OK ==
+ if (OK ==
select_connect(selector,
tcpSession->sock,
tsession))
@@ -394,20 +394,20 @@
welcome.clientIdentity
= *(coreAPI->myIdentity);
if (SYSERR == select_write(selector,
- s,
+ s,
&welcome.header,
NO,
YES)) {
#if DEBUG_TCP
GE_LOG(ectx,
- GE_DEBUG | GE_USER | GE_BULK,
+ GE_DEBUG | GE_USER | GE_BULK,
"Could not sent TCP welcome message, closing connection.\n");
#endif
/* disconnect caller -- error! */
tcpDisconnect(tsession);
MUTEX_UNLOCK(tcplock);
return SYSERR;
- } else if (stats != NULL)
+ } else if (stats != NULL)
stats->change(stat_bytesSent,
sizeof(TCPWelcome));
MUTEX_UNLOCK(tcplock);
Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/udp.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -73,7 +73,7 @@
static unsigned short getGNUnetUDPPort() {
struct servent * pse; /* pointer to service information entry */
unsigned long long port;
-
+
if (-1 == GC_get_configuration_value_number(cfg,
"UDP",
"PORT",
@@ -106,7 +106,7 @@
}
if ( SETSOCKOPT(sock,
SOL_SOCKET,
- SO_REUSEADDR,
+ SO_REUSEADDR,
&on,
sizeof(on)) < 0 ) {
GE_DIE_STRERROR(ectx,
@@ -115,8 +115,8 @@
return -1;
}
GE_ASSERT(NULL, port != 0);
- memset(&sin,
- 0,
+ memset(&sin,
+ 0,
sizeof(sin));
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = INADDR_ANY;
@@ -290,7 +290,7 @@
&haddr->senderIP,
sizeof(IPaddr));
#if DEBUG_UDP
- GE_LOG(ectx,
+ GE_LOG(ectx,
GE_DEBUG | GE_USER | GE_BULK,
"Sending message of %d bytes via UDP to %u.%u.%u.%u:%u.\n",
ssize,
@@ -389,7 +389,7 @@
&ch);
filteredNetworks_ = parse_ipv4_network_specification(ectx,
ch);
- FREE(ch);
+ FREE(ch);
MUTEX_UNLOCK(configLock);
return 0;
}
@@ -457,7 +457,7 @@
= stats->create(gettext_noop("# bytes dropped by UDP (outgoing)"));
}
configLock = MUTEX_CREATE(NO);
- reloadConfiguration();
+ reloadConfiguration();
udpAPI.protocolNumber = UDP_PROTOCOL_NUMBER;
udpAPI.mtu = mtu - sizeof(UDPMessage);
udpAPI.cost = 20000;
Modified: GNUnet/src/transports/udp6.c
===================================================================
--- GNUnet/src/transports/udp6.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/udp6.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -149,7 +149,7 @@
memcpy(&ip,
&((struct sockaddr_in6*) addr)->sin6_addr,
sizeof(IP6addr));
- } else {
+ } else {
return SYSERR;
}
MUTEX_LOCK(configLock);
@@ -215,7 +215,7 @@
haddr = (Host6Address*) &msg[1];
if (SYSERR == getPublicIP6Address(cfg,
- ectx,
+ ectx,
&haddr->senderIP)) {
FREE(msg);
GE_LOG(ectx,
@@ -307,7 +307,7 @@
ssize);
} else {
GE_LOG_STRERROR(ectx,
- GE_WARNING,
+ GE_WARNING,
"sendto");
if (stats != NULL)
stats->change(stat_bytesDropped,
@@ -376,7 +376,7 @@
"UDP",
"BLACKLIST",
NULL,
- &ch))
+ &ch))
filteredNetworks_ = parse_ipv6_network_specification(ectx,
"");
else {
Modified: GNUnet/src/transports/udp_helper.c
===================================================================
--- GNUnet/src/transports/udp_helper.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/transports/udp_helper.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -116,7 +116,7 @@
BlacklistedTester blt = ah_cls;
if (NO != blt(addr,
addr_len))
- return NULL;
+ return NULL;
return &nonnullpointer;
}
@@ -190,7 +190,7 @@
if (selector != NULL) {
select_destroy(selector);
selector = NULL;
- }
+ }
socket_destroy(udp_sock);
udp_sock = NULL;
return OK;
Modified: GNUnet/src/util/config/config.c
===================================================================
--- GNUnet/src/util/config/config.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/config/config.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -40,7 +40,7 @@
* Note that for setting options a different context can be
* used (since failing to change an option may have to be reported
* in a fundamentally different way to the user).
- *
+ *
* @parm ectx maybe NULL, in that case errors will no longer
* be reported
*/
@@ -214,7 +214,7 @@
/**
* Set a configuration value that should be in a set of
- * predefined strings.
+ * predefined strings.
* @param value
* @return 0 on success, -1 on error (i.e. out of memory,
* or update refused by registered callback)
@@ -228,7 +228,7 @@
}
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.
* @return 0 on success, -1 on error
*/
@@ -239,7 +239,7 @@
}
/**
- * Attach a callback that is notified whenever a
+ * Attach a callback that is notified whenever a
* configuration option changes.
* @return 0 on success, -1 on error, 1 for no such handler registered
*/
Modified: GNUnet/src/util/config_impl/configtest.c
===================================================================
--- GNUnet/src/util/config_impl/configtest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/config_impl/configtest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -41,7 +41,7 @@
&c))
return 1;
if (0 != strcmp("b",
- c))
+ c))
return 1;
FREE(c);
if (0 != GC_get_configuration_value_number(cfg,
@@ -50,7 +50,7 @@
0,
10,
9,
- &l))
+ &l))
return 1;
if (5 != l)
return 1;
@@ -62,17 +62,17 @@
if (NO == GC_get_configuration_value_yesno(cfg,
"more",
"c",
- NO))
+ NO))
return 1;
return 0;
}
-int main(int argc,
+int main(int argc,
char * argv[]) {
struct GE_Context * ectx;
int failureCount = 0;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
Modified: GNUnet/src/util/config_impl/impl.c
===================================================================
--- GNUnet/src/util/config_impl/impl.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/config_impl/impl.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -35,17 +35,17 @@
typedef struct GC_Entry {
/**
- * key for this entry
+ * key for this entry
*/
char * key;
/**
- * current, commited value
+ * current, commited value
*/
char * val;
- /**
- * non-null during uncommited update
+ /**
+ * non-null during uncommited update
*/
char * dirty_val;
} GC_Entry;
@@ -61,12 +61,12 @@
char * name;
/**
- * number of entries in section
+ * number of entries in section
*/
unsigned int size;
/**
- * entries in the section
+ * entries in the section
*/
GC_Entry * entries;
} GC_Section;
@@ -165,7 +165,7 @@
cfg->data->ectx = ectx;
}
-static int
+static int
_parse_configuration(struct GC_Configuration * cfg,
const char * filename) {
int dirty;
@@ -199,14 +199,14 @@
nr++;
for (i=0;i<255;i++)
if (line[i] == '\t')
- line[i] = ' ';
+ line[i] = ' ';
if (line[0] == '\n' || line[0] == '#' || line[0] == '%' ||
line[0] == '\r')
continue;
emptyline = 1;
- for (i=0;(i<255 && line[i] != 0);i++)
+ for (i=0;(i<255 && line[i] != 0);i++)
if (line[i] != ' ' && line[i] != '\n' && line[i] != '\r')
- emptyline = 0;
+ emptyline = 0;
if (emptyline == 1)
continue;
/* remove tailing whitespace */
@@ -220,7 +220,7 @@
expanded))
ret = -1; /* failed to parse included config */
} else if (1 == sscanf(line,
- "[%99[^]]]",
+ "[%99[^]]]",
value)) {
/* [value] */
FREE(section);
@@ -277,12 +277,12 @@
return ret;
}
-static int
+static int
_test_dirty(struct GC_Configuration * cfg) {
return cfg->data->dirty;
}
-static int
+static int
_write_configuration(struct GC_Configuration * cfg,
const char * filename) {
GC_ConfigurationData * data;
@@ -293,7 +293,7 @@
FILE *fp;
int error;
int ret;
-
+
data = cfg->data;
if (NULL == (fp = FOPEN(filename, "w"))) {
GE_LOG_STRERROR_FILE(data->ectx,
@@ -308,7 +308,7 @@
for (i=0;i<data->ssize;i++) {
sec = &data->sections[i];
if (0 > fprintf(fp,
- "[%s]\n",
+ "[%s]\n",
sec->name)) {
error = 1;
break;
@@ -374,7 +374,7 @@
/**
* Call only with lock held!
*/
-static GC_Entry *
+static GC_Entry *
findEntry(GC_ConfigurationData * data,
const char * section,
const char * key) {
@@ -391,7 +391,7 @@
return NULL;
}
-static int
+static int
_get_configuration_value_number(struct GC_Configuration * cfg,
const char * section,
const char * option,
@@ -446,8 +446,8 @@
MUTEX_UNLOCK(cfg->data->lock);
return ret;
}
-
-static int
+
+static int
_get_configuration_value_string(struct GC_Configuration * cfg,
const char * section,
const char * option,
@@ -473,7 +473,7 @@
"Configuration value for option `%s' in section `%s' required.\n",
option,
section);
- return -1;
+ return -1;
}
*value = STRDUP(def);
ret = 1; /* default */
@@ -481,8 +481,8 @@
MUTEX_UNLOCK(cfg->data->lock);
return ret;
}
-
-static int
+
+static int
_get_configuration_value_choice(struct GC_Configuration * cfg,
const char * section,
const char * option,
@@ -531,7 +531,7 @@
return ret;
}
-static int
+static int
_set_configuration_value_string(struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
@@ -544,7 +544,7 @@
GC_Entry ne;
int ret;
int i;
-
+
data = cfg->data;
MUTEX_LOCK(data->lock);
e = findEntry(data, section, option);
@@ -638,7 +638,7 @@
* @param old string to $-expand (will be freed!)
* @return $-expanded string
*/
-static char *
+static char *
_configuration_expand_dollar(struct GC_Configuration * cfg,
const char * section,
char * orig) {
@@ -701,7 +701,7 @@
* value, or NULL if option is not specified and no default given
* @return 0 on success, -1 on error, 1 for default
*/
-static int
+static int
_get_configuration_value_filename(struct GC_Configuration * cfg,
const char * section,
const char * option,
@@ -710,7 +710,7 @@
GC_ConfigurationData * data;
int ret;
char * tmp;
-
+
data = cfg->data;
tmp = NULL;
ret = _get_configuration_value_string(cfg, section, option, def, &tmp);
@@ -718,7 +718,7 @@
tmp = _configuration_expand_dollar(cfg,
section,
tmp);
- *value = string_expandFileName(data->ectx,
+ *value = string_expandFileName(data->ectx,
tmp);
FREE(tmp);
} else {
@@ -727,7 +727,7 @@
return ret;
}
-static int
+static int
_set_configuration_value_number(struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
@@ -737,8 +737,8 @@
SNPRINTF(s, 64, "%llu", number);
return _set_configuration_value_string(cfg, ectx, section, option, s);
}
-
-static int
+
+static int
_set_configuration_value_choice(struct GC_Configuration * cfg,
struct GE_Context * ectx,
const char * section,
@@ -747,7 +747,7 @@
return _set_configuration_value_string(cfg, ectx, section, option, choice);
}
-static int
+static int
_attach_change_listener(struct GC_Configuration * cfg,
GC_ChangeListener callback,
void * ctx) {
@@ -780,7 +780,7 @@
return 0;
}
-static int
+static int
_detach_change_listener(struct GC_Configuration * cfg,
GC_ChangeListener callback,
void * ctx) {
@@ -792,7 +792,7 @@
l = &cfg->data->listeners[i];
if ( (l->listener == callback) &&
(l->ctx == ctx) ) {
- cfg->data->listeners[i]
+ cfg->data->listeners[i]
= cfg->data->listeners[cfg->data->lsize-1];
GROW(cfg->data->listeners,
cfg->data->lsize,
@@ -804,11 +804,11 @@
MUTEX_UNLOCK(cfg->data->lock);
return -1;
}
-
+
/**
* Create a GC_Configuration (C implementation).
*/
-GC_Configuration *
+GC_Configuration *
GC_create_C_impl() {
GC_Configuration * ret;
Modified: GNUnet/src/util/containers/bloomfilter.c
===================================================================
--- GNUnet/src/util/containers/bloomfilter.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/containers/bloomfilter.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -46,13 +46,13 @@
typedef struct Bloomfilter {
/**
- * Concurrency control
+ * Concurrency control
*/
struct MUTEX * lock;
/**
- * The actual bloomfilter bit array
+ * The actual bloomfilter bit array
*/
char * bitArray;
@@ -62,17 +62,17 @@
struct GE_Context * ectx;
/**
- * The bit counter file on disk
+ * The bit counter file on disk
*/
int fd;
/**
- * How many bits we set for each stored element
+ * How many bits we set for each stored element
*/
unsigned int addressesPerElement;
/**
- * Size of bitArray in bytes
+ * Size of bitArray in bytes
*/
unsigned int bitArraySize;
@@ -422,14 +422,14 @@
bf->ectx = ectx;
/* Try to open a bloomfilter file */
#ifndef _MSC_VER
- bf->fd = disk_file_open(ectx,
- filename,
- O_RDWR|O_CREAT,
+ bf->fd = disk_file_open(ectx,
+ filename,
+ O_RDWR|O_CREAT,
S_IRUSR|S_IWUSR);
#else
bf->fd = disk_file_open(ectx,
filename,
- O_WRONLY|O_CREAT,
+ O_WRONLY|O_CREAT,
S_IREAD|S_IWRITE);
#endif
if (-1 == bf->fd) {
Modified: GNUnet/src/util/containers/bloomtest.c
===================================================================
--- GNUnet/src/util/containers/bloomtest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/containers/bloomtest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -48,7 +48,7 @@
srand(1);
UNLINK("/tmp/bloomtest.dat");
bf = loadBloomfilter(NULL,
- "/tmp/bloomtest.dat",
+ "/tmp/bloomtest.dat",
SIZE,
K);
@@ -73,7 +73,7 @@
bf=loadBloomfilter(NULL,
- "/tmp/bloomtest.dat",
+ "/tmp/bloomtest.dat",
SIZE,
K);
Modified: GNUnet/src/util/containers/hashtable.c
===================================================================
--- GNUnet/src/util/containers/hashtable.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/containers/hashtable.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -73,7 +73,7 @@
return 1;
else if (oddNumber%i == 0)
return 0;
-
+
return 1; /* maybe */
}
@@ -124,7 +124,7 @@
FREE(hashTable);
return NULL;
}
-
+
hashTable->numOfBuckets = numOfBuckets;
hashTable->numOfElements = 0;
@@ -167,12 +167,12 @@
* @return whether or not the specified HashTable contains the
* specified key
*/
-int ht_containsKey(const struct HashTable *hashTable,
- const void *key,
+int ht_containsKey(const struct HashTable *hashTable,
+ const void *key,
const unsigned int keylen) {
void *ret;
unsigned int retlen;
-
+
return ht_get(hashTable, key, keylen, &ret, &retlen);
}
@@ -183,15 +183,15 @@
* @return whether or not the specified HashTable contains the
* specified value
*/
-int ht_containsValue(const struct HashTable *hashTable,
- const void *value,
+int ht_containsValue(const struct HashTable *hashTable,
+ const void *value,
const unsigned int valuelen) {
int i;
for (i=0; i<hashTable->numOfBuckets; i++) {
KeyValuePair *pair = hashTable->bucketArray[i];
while (pair != NULL) {
- if ( (pair->valuelen == valuelen) &&
+ if ( (pair->valuelen == valuelen) &&
(memcmp(value, pair->value, valuelen) == 0) )
return 1;
pair = pair->next;
@@ -208,10 +208,10 @@
* @param value the value associated with the key
* @return YES if successful, NO if an error was encountered
*/
-int ht_put(struct HashTable *hashTable,
- const void *key,
+int ht_put(struct HashTable *hashTable,
+ const void *key,
const unsigned int keylen,
- void *value,
+ void *value,
const unsigned int valuelen) {
long hashValue;
KeyValuePair *pair;
@@ -270,8 +270,8 @@
* @param valuelen the length of the value
* @return YES if found, NO otherwise
*/
-int ht_get(const struct HashTable *hashTable,
- const void *key,
+int ht_get(const struct HashTable *hashTable,
+ const void *key,
const unsigned int keylen,
void **value,
unsigned int *valuelen) {
@@ -295,7 +295,7 @@
* @param hashTable the HashTable to remove the key/value pair from
* @param key the key specifying the key/value pair to be removed
*/
-void ht_remove(struct HashTable *hashTable,
+void ht_remove(struct HashTable *hashTable,
const void *key,
const unsigned int keylen) {
long hashValue = weakHash(key, keylen) % hashTable->numOfBuckets;
@@ -445,9 +445,9 @@
* is considered unacceptably high, a value of 0.0 can
* be specified.
*/
-void ht_setIdealRatio(struct HashTable *hashTable,
+void ht_setIdealRatio(struct HashTable *hashTable,
float idealRatio,
- float lowerRehashThreshold,
+ float lowerRehashThreshold,
float upperRehashThreshold) {
if (idealRatio <= 0.0 || lowerRehashThreshold >= idealRatio ||
Modified: GNUnet/src/util/containers/hashtabletest.c
===================================================================
--- GNUnet/src/util/containers/hashtabletest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/containers/hashtabletest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -32,7 +32,7 @@
struct HashTable *ht = ht_create(10);
void *val;
unsigned int vallen;
-
+
if (HT_PUT(ht, "Sweden", "Stockholm") != YES ||
HT_PUT(ht, "Germany", "Berlin") != YES ||
HT_PUT(ht, "France", "Paris") != YES ||
@@ -43,55 +43,55 @@
puts("ht_put failed\n");
return 1;
}
-
+
if (HT_CONTAINS_KEY(ht, "France") != YES ||
HT_CONTAINS_KEY(ht, "Iceland") != NO)
{
puts("ht_contains_key failed!\n");
return 1;
}
-
+
if (HT_CONTAINS_VALUE(ht, "Paris") != YES ||
HT_CONTAINS_VALUE(ht, "London") != NO)
{
puts("ht_contains_value failed!\n");
return 1;
}
-
+
if (HT_GET(ht, "USA", &val, &vallen) != YES)
{
puts("ht_get failed!\n");
return 1;
}
-
+
if (strcmp((char *) val, "Washington") != 0)
{
puts("ht_get result invalid!\n");
return 1;
}
-
+
HT_REMOVE(ht, "Spain");
if (HT_CONTAINS_KEY(ht, "Spain") != NO)
{
puts("ht_remove failed!\n");
- return 1;
+ return 1;
}
-
+
if (ht_size(ht) != 5)
{
puts("ht_size failed!\n");
- return 1;
+ return 1;
}
-
+
ht_removeAll(ht);
if (ht_size(ht) != 0)
{
puts("ht_size#2 failed!\n");
- return 1;
+ return 1;
}
-
+
ht_destroy(ht);
-
+
return 0;
}
Modified: GNUnet/src/util/containers/vector.c
===================================================================
--- GNUnet/src/util/containers/vector.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/containers/vector.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -453,7 +453,7 @@
return NULL;
v->iteratorSegment = NULL;
segmentIndex = vectorFindIndex(v, index, &segment);
- if (segmentIndex == -1)
+ if (segmentIndex == -1)
return NULL;
rvalue = vectorSegmentRemoveAtIndex(segment,
segmentIndex);
Modified: GNUnet/src/util/cron/cron.c
===================================================================
--- GNUnet/src/util/cron/cron.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/cron/cron.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -85,23 +85,23 @@
typedef struct {
/**
- * The method to call at that point.
+ * The method to call at that point.
*/
CronJob method;
/**
- * data ptr (argument to the method)
+ * data ptr (argument to the method)
*/
void * data;
/**
- * The start-time for this event (in milliseconds).
+ * The start-time for this event (in milliseconds).
*/
cron_t delta;
/**
* for cron-jobs: when this should be repeated
- * automatically, 0 if this was a once-only job
+ * automatically, 0 if this was a once-only job
*/
unsigned int deltaRepeat;
@@ -164,12 +164,12 @@
/**
* Set to yes if we are shutting down or shut down.
- */
+ */
int cron_shutdown;
/**
* Are we in block?
- */
+ */
int inBlock;
struct SEMAPHORE * sig;
@@ -219,9 +219,9 @@
#endif
cron->cron_shutdown = YES;
cron_add_job(cron,
- &noJob,
- 0,
+ &noJob,
0,
+ 0,
NULL);
SEMAPHORE_DOWN(cron->cron_signal, YES);
SEMAPHORE_DESTROY(cron->cron_signal);
@@ -527,10 +527,10 @@
data,
repeat);
#endif
- cron_add_job(cron,
+ cron_add_job(cron,
method,
repeat,
- repeat,
+ repeat,
data);
}
/* run */
@@ -601,7 +601,7 @@
#endif
if (next > MAXSLEEP)
next = MAXSLEEP;
- if (cron->cron_shutdown == NO)
+ if (cron->cron_shutdown == NO)
PTHREAD_SLEEP(next);
#if DEBUG_CRON
GE_LOG(cron->ectx,
@@ -646,7 +646,7 @@
* Start the cron jobs.
*/
void cron_start(struct CronManager * cron) {
- GE_ASSERT(cron->ectx,
+ GE_ASSERT(cron->ectx,
cron->cron_signal == NULL);
cron->cron_shutdown = NO;
cron->cron_signal = SEMAPHORE_CREATE(0);
@@ -656,8 +656,8 @@
cron,
256 * 1024);
if (cron->cron_handle == 0)
- GE_DIE_STRERROR(cron->ectx,
- GE_FATAL | GE_ADMIN | GE_USER | GE_BULK,
+ GE_DIE_STRERROR(cron->ectx,
+ GE_FATAL | GE_ADMIN | GE_USER | GE_BULK,
"pthread_create");
}
Modified: GNUnet/src/util/cron/crontest.c
===================================================================
--- GNUnet/src/util/cron/crontest.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/cron/crontest.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -111,7 +111,7 @@
failureCount += testDelCron();
cron_stop(cron);
cron_destroy(cron);
- if (failureCount != 0)
+ if (failureCount != 0)
return 1;
return 0;
} /* end of main */
Modified: GNUnet/src/util/cron/timertest.c
===================================================================
--- GNUnet/src/util/cron/timertest.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/cron/timertest.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -95,9 +95,9 @@
failureCount += check();
cron_stop(cron);
cron_destroy(cron);
- if (failureCount != 0)
+ if (failureCount != 0)
return 1;
return 0;
-}
+}
/* end of timertest.c */
Modified: GNUnet/src/util/crypto/hashing.c
===================================================================
--- GNUnet/src/util/crypto/hashing.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/crypto/hashing.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -138,7 +138,7 @@
}
static void
-sha512_transform(unsigned long long *state,
+sha512_transform(unsigned long long *state,
const unsigned char *input) {
unsigned long long a, b, c, d, e, f, g, h, t1, t2;
unsigned long long W[80];
@@ -343,7 +343,7 @@
O_RDONLY | O_LARGEFILE);
if (fh == -1) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_ADMIN | GE_REQUEST,
+ GE_ERROR | GE_USER | GE_ADMIN | GE_REQUEST,
"open",
filename);
return SYSERR;
@@ -359,12 +359,12 @@
buf,
delta)) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"read",
filename);
- if (0 != CLOSE(fh))
+ if (0 != CLOSE(fh))
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"close",
filename);
FREE(buf);
@@ -378,9 +378,9 @@
else
break;
}
- if (0 != CLOSE(fh))
+ if (0 != CLOSE(fh))
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"close",
filename);
sha512_final(&ctx,
Modified: GNUnet/src/util/crypto/hostkey_gcrypt.c
===================================================================
--- GNUnet/src/util/crypto/hostkey_gcrypt.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/crypto/hostkey_gcrypt.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -104,9 +104,9 @@
"(genkey(rsa(nbits %d)(rsa-use-e 3:257)))",
HOSTKEY_LEN);
if (rc) {
- LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_sexp_build",
+ LOG_GCRY(NULL,
+ LOG_ERROR,
+ "gcry_sexp_build",
rc);
unlockGcrypt();
return NULL;
@@ -116,8 +116,8 @@
gcry_sexp_release(s_keyparam);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_pk_genkey",
+ LOG_ERROR,
+ "gcry_pk_genkey",
rc);
unlockGcrypt();
return NULL;
@@ -126,8 +126,8 @@
#if EXTRA_CHECKS
if ((rc=gcry_pk_testkey(s_key))) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_pk_testkey",
+ LOG_ERROR,
+ "gcry_pk_testkey",
rc);
unlockGcrypt();
return NULL;
@@ -264,7 +264,7 @@
* Note that the return type is not actually a private
* key but rather an sexpression for the public key!
*/
-static struct PrivateKey *
+static struct PrivateKey *
public2PrivateKey(const PublicKey * publicKey) {
struct PrivateKey * ret;
gcry_sexp_t result;
@@ -327,7 +327,7 @@
* @returns encoding of the private key.
* The first 4 bytes give the size of the array, as usual.
*/
-PrivateKeyEncoded *
+PrivateKeyEncoded *
encodePrivateKey(const struct PrivateKey * hostkey) {
PrivateKeyEncoded * retval;
gcry_mpi_t pkv[6];
@@ -378,8 +378,8 @@
"ned");
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "key_from_sexp",
+ LOG_ERROR,
+ "key_from_sexp",
rc);
unlockGcrypt();
return NULL;
@@ -394,8 +394,8 @@
size += sizes[i];
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_aprint",
+ LOG_ERROR,
+ "gcry_mpi_aprint",
rc);
while (i>0)
if (pbu[i] != NULL)
@@ -460,7 +460,7 @@
* Decode the private key from the file-format back
* to the "normal", internal format.
*/
-struct PrivateKey *
+struct PrivateKey *
decodePrivateKey(const PrivateKeyEncoded * encoding) {
struct PrivateKey * ret;
gcry_sexp_t res;
@@ -480,8 +480,8 @@
pos += ntohs(encoding->sizen);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_scan",
+ LOG_ERROR,
+ "gcry_mpi_scan",
rc);
unlockGcrypt();
return NULL;
@@ -496,7 +496,7 @@
if (rc) {
LOG_GCRY(NULL,
LOG_ERROR,
- "gcry_mpi_scan",
+ "gcry_mpi_scan",
rc);
gcry_mpi_release(n);
unlockGcrypt();
@@ -511,8 +511,8 @@
pos += ntohs(encoding->sized);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_scan",
+ LOG_ERROR,
+ "gcry_mpi_scan",
rc);
gcry_mpi_release(n);
gcry_mpi_release(e);
@@ -531,7 +531,7 @@
if (rc) {
LOG_GCRY(NULL,
LOG_ERROR,
- "gcry_mpi_scan",
+ "gcry_mpi_scan",
rc);
gcry_mpi_release(n);
gcry_mpi_release(e);
@@ -551,8 +551,8 @@
pos += ntohs(encoding->sizeq);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_scan",
+ LOG_ERROR,
+ "gcry_mpi_scan",
rc);
gcry_mpi_release(n);
gcry_mpi_release(e);
@@ -575,7 +575,7 @@
&size);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
+ LOG_ERROR,
"gcry_mpi_scan",
rc);
gcry_mpi_release(n);
@@ -624,7 +624,7 @@
if (rc)
LOG_GCRY(NULL,
- LOG_ERROR,
+ LOG_ERROR,
"gcry_sexp_build", rc);
#if EXTRA_CHECKS
if (gcry_pk_testkey(res)) {
@@ -675,7 +675,7 @@
&isize);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
+ LOG_ERROR,
"gcry_mpi_scan", rc);
freePrivateKey(pubkey);
unlockGcrypt();
@@ -688,8 +688,8 @@
gcry_mpi_release(val);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_sexp_build",
+ LOG_ERROR,
+ "gcry_sexp_build",
rc); /* more info in erroff */
freePrivateKey(pubkey);
unlockGcrypt();
@@ -699,8 +699,8 @@
rc = gcry_pk_encrypt(&result, data, pubkey->sexp);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_pk_encrypt",
+ LOG_ERROR,
+ "gcry_pk_encrypt",
rc);
gcry_sexp_release(data);
freePrivateKey(pubkey);
@@ -717,8 +717,8 @@
gcry_sexp_release(result);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "key_from_sexp",
+ LOG_ERROR,
+ "key_from_sexp",
rc);
unlockGcrypt();
return SYSERR;
@@ -732,8 +732,8 @@
gcry_mpi_release(rval);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_print",
+ LOG_ERROR,
+ "gcry_mpi_print",
rc);
unlockGcrypt();
return SYSERR;
@@ -773,8 +773,8 @@
rc = gcry_pk_testkey(hostkey->sexp);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_pk_testkey",
+ LOG_ERROR,
+ "gcry_pk_testkey",
rc);
unlockGcrypt();
return -1;
@@ -788,8 +788,8 @@
&size);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_scan",
+ LOG_ERROR,
+ "gcry_mpi_scan",
rc);
unlockGcrypt();
return SYSERR;
@@ -801,7 +801,7 @@
gcry_mpi_release(val);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
+ LOG_ERROR,
"gcry_sexp_build",
rc); /* more info in erroff */
unlockGcrypt();
@@ -814,7 +814,7 @@
if (rc) {
LOG_GCRY(NULL,
LOG_ERROR,
- "gcry_pk_decrypt",
+ "gcry_pk_decrypt",
rc);
unlockGcrypt();
return SYSERR;
@@ -826,7 +826,7 @@
if (val == NULL) {
LOG_GCRY(NULL,
LOG_ERROR,
- "gcry_sexp_nth_mpi",
+ "gcry_sexp_nth_mpi",
rc);
unlockGcrypt();
return SYSERR;
@@ -900,8 +900,8 @@
FREE(buff);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_sexp_new",
+ LOG_ERROR,
+ "gcry_sexp_new",
rc);
unlockGcrypt();
return SYSERR;
@@ -910,8 +910,8 @@
gcry_sexp_release(data);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_pk_sign",
+ LOG_ERROR,
+ "gcry_pk_sign",
rc);
unlockGcrypt();
return SYSERR;
@@ -923,8 +923,8 @@
gcry_sexp_release(result);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "key_from_sexp",
+ LOG_ERROR,
+ "key_from_sexp",
rc);
unlockGcrypt();
return SYSERR;
@@ -938,8 +938,8 @@
gcry_mpi_release(rval);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_print",
+ LOG_ERROR,
+ "gcry_mpi_print",
rc);
unlockGcrypt();
return SYSERR;
@@ -984,8 +984,8 @@
&size);
if (rc) {
LOG_GCRY(NULL,
- LOG_ERROR,
- "gcry_mpi_scan",
+ LOG_ERROR,
+ "gcry_mpi_scan",
rc);
unlockGcrypt();
return SYSERR;
@@ -998,7 +998,7 @@
if (rc) {
LOG_GCRY(NULL,
LOG_ERROR,
- "gcry_sexp_build",
+ "gcry_sexp_build",
rc);
unlockGcrypt();
return SYSERR;
Modified: GNUnet/src/util/crypto/random.c
===================================================================
--- GNUnet/src/util/crypto/random.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/crypto/random.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -43,7 +43,7 @@
lockGcrypt();
/* see http://lists.gnupg.org/pipermail/gcrypt-devel/2004-May/000613.html */
#ifdef gcry_fast_random_poll
- if ( (invokeCount++ % 256) == 0)
+ if ( (invokeCount++ % 256) == 0)
gcry_fast_random_poll();
#endif
ret = rand(); /* in case gcry_randomize fails,
@@ -106,7 +106,7 @@
unsigned int ret;
GE_ASSERT(NULL, i > 0);
- ret = i * ((double) RANDOM() / RAND_MAX);
+ ret = i * ((double) RANDOM() / RAND_MAX);
if (ret >= i)
ret = i - 1;
return ret;
Modified: GNUnet/src/util/crypto/symcipher_gcrypt.c
===================================================================
--- GNUnet/src/util/crypto/symcipher_gcrypt.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/crypto/symcipher_gcrypt.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -97,7 +97,7 @@
if (rc) {
LOG_GCRY(NULL,
GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_open",
+ "gcry_cipher_open",
rc);
unlockGcrypt();
return -1;
@@ -108,8 +108,8 @@
if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_setkey",
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ "gcry_cipher_setkey",
rc);
gcry_cipher_close(handle);
unlockGcrypt();
@@ -117,11 +117,11 @@
}
rc = gcry_cipher_setiv(handle,
iv,
- sizeof(INITVECTOR));
+ sizeof(INITVECTOR));
if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
LOG_GCRY(NULL,
GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_setiv",
+ "gcry_cipher_setiv",
rc);
gcry_cipher_close(handle);
unlockGcrypt();
@@ -134,9 +134,9 @@
block,
len);
if (rc) {
- LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_encrypt",
+ LOG_GCRY(NULL,
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ "gcry_cipher_encrypt",
rc);
gcry_cipher_close(handle);
unlockGcrypt();
@@ -177,8 +177,8 @@
0);
if (rc) {
LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_open",
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ "gcry_cipher_open",
rc);
unlockGcrypt();
return -1;
@@ -189,7 +189,7 @@
if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
"gcry_cipher_setkey",
rc);
gcry_cipher_close(handle);
@@ -202,8 +202,8 @@
if (rc && ((char)rc != GPG_ERR_WEAK_KEY)) {
LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_setiv",
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ "gcry_cipher_setiv",
rc);
gcry_cipher_close(handle);
unlockGcrypt();
@@ -216,8 +216,8 @@
size);
if (rc) {
LOG_GCRY(NULL,
- GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
- "gcry_cipher_decrypt",
+ GE_ERROR | GE_USER | GE_DEVELOPER | GE_BULK,
+ "gcry_cipher_decrypt",
rc);
gcry_cipher_close(handle);
unlockGcrypt();
Modified: GNUnet/src/util/disk/storage.c
===================================================================
--- GNUnet/src/util/disk/storage.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/disk/storage.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -178,7 +178,7 @@
if (0 != statvfs(part, &buf)) {
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
+ GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
"statfs",
part);
return -1;
@@ -191,16 +191,16 @@
memcpy(szDrive, part, 3);
szDrive[3] = 0;
- if (!GetDiskFreeSpace(szDrive,
+ if (!GetDiskFreeSpace(szDrive,
&dwDummy,
- &dwDummy,
+ &dwDummy,
&dwBlocks,
&dwDummy)) {
GE_LOG(ectx,
GE_WARNING | GE_USER | GE_ADMIN | GE_BULK,
_("`%s' failed for drive `%s': %u\n"),
"GetDiskFreeSpace",
- szDrive,
+ szDrive,
GetLastError());
return -1;
@@ -222,7 +222,7 @@
/**
* Test if fil is a directory.
*
- * @return YES if yes, NO if not, SYSERR if it
+ * @return YES if yes, NO if not, SYSERR if it
* does not exist
*/
int disk_directory_test(struct GE_Context * ectx,
@@ -234,19 +234,19 @@
if (ret != 0) {
if (errno != ENOENT) {
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
+ GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
"stat",
fil);
return SYSERR;
}
return NO;
}
- if (! S_ISDIR(filestat.st_mode))
+ if (! S_ISDIR(filestat.st_mode))
return NO;
if (ACCESS(fil, R_OK | X_OK) < 0 ) {
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
- "access",
+ GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
+ "access",
fil);
return SYSERR;
}
@@ -256,7 +256,7 @@
/**
* Check that fil corresponds to a filename
* (of a file that exists and that is not a directory).
- * @returns YES if yes, NO if not a file, SYSERR if something
+ * @returns YES if yes, NO if not a file, SYSERR if something
* else (will print an error message in that case, too).
*/
int disk_file_test(struct GE_Context * ectx,
@@ -268,19 +268,19 @@
if (ret != 0) {
if (errno != ENOENT) {
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
+ GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
"stat",
fil);
return SYSERR;
}
return NO;
}
- if (! S_ISREG(filestat.st_mode))
+ if (! S_ISREG(filestat.st_mode))
return NO;
if (ACCESS(fil, R_OK) < 0 ) {
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
- "access",
+ GE_WARNING | GE_USER | GE_ADMIN | GE_REQUEST,
+ "access",
fil);
return SYSERR;
}
@@ -344,14 +344,14 @@
if ( (ret != 0) &&
(errno != EEXIST) ) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_BULK,
- "mkdir",
+ GE_ERROR | GE_USER | GE_BULK,
+ "mkdir",
rdir);
FREE(rdir);
return SYSERR;
}
}
- rdir[pos] = DIR_SEPARATOR;
+ rdir[pos] = DIR_SEPARATOR;
}
pos++;
}
@@ -429,7 +429,7 @@
S_IRUSR | S_IWUSR);
if (handle == -1)
return SYSERR;
- GE_ASSERT(ectx,
+ GE_ASSERT(ectx,
(n == 0) || (buffer != NULL));
/* write the buffer take length from the beginning */
if (n != WRITE(handle, buffer, n)) {
@@ -547,7 +547,7 @@
*/
int disk_directory_remove(struct GE_Context * ectx,
const char * fileName) {
- if (UNLINK(fileName) == 0)
+ if (UNLINK(fileName) == 0)
return OK;
if ( (errno != EISDIR) &&
/* EISDIR is not sufficient in all cases, e.g.
@@ -563,7 +563,7 @@
if (SYSERR == disk_directory_scan(ectx,
fileName,
&rmHelper,
- ectx))
+ ectx))
return SYSERR;
if (0 != RMDIR(fileName)) {
GE_LOG_STRERROR_FILE(ectx,
@@ -578,7 +578,7 @@
void disk_file_close(struct GE_Context * ectx,
const char * filename,
int fd) {
- if (0 != CLOSE(fd))
+ if (0 != CLOSE(fd))
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_USER | GE_BULK,
"close",
@@ -596,7 +596,7 @@
char szFile[_MAX_PATH + 1];
long lRet;
- if ((lRet = plibc_conv_to_win_path(filename,
+ if ((lRet = plibc_conv_to_win_path(filename,
szFile)) != ERROR_SUCCESS) {
errno = ENOENT;
SetLastError(lRet);
@@ -623,7 +623,7 @@
oflag |= O_BINARY;
#endif
ret = open(fn, oflag, mode);
- if (ret == -1)
+ if (ret == -1)
GE_LOG_STRERROR_FILE(ectx,
GE_WARNING | GE_USER | GE_BULK,
"open",
@@ -651,13 +651,13 @@
if (OK != disk_file_size(ectx,
src,
&size,
- YES))
+ YES))
return SYSERR;
pos = 0;
in = disk_file_open(ectx,
src,
O_RDONLY | O_LARGEFILE);
- if (in == -1)
+ if (in == -1)
return SYSERR;
out = disk_file_open(ectx,
dst,
Modified: GNUnet/src/util/disk/storagetest.c
===================================================================
--- GNUnet/src/util/disk/storagetest.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/disk/storagetest.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -34,12 +34,12 @@
disk_file_write(NULL,
".testfile",
- TESTSTRING,
- strlen(TESTSTRING),
+ TESTSTRING,
+ strlen(TESTSTRING),
"644");
tmp[disk_file_read(NULL,
".testfile",
- 100,
+ 100,
tmp)] = '\0';
if (0 != memcmp(tmp,
TESTSTRING,
Modified: GNUnet/src/util/error/error.c
===================================================================
--- GNUnet/src/util/error/error.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/error/error.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -101,7 +101,7 @@
buf);
else
fprintf(stderr,
- "%s %s",
+ "%s %s",
date,
buf);
free(buf);
@@ -128,7 +128,7 @@
#endif
}
else if (ctx->confirm)
- ctx->confirm(ctx->cls);
+ ctx->confirm(ctx->cls);
}
/**
@@ -139,7 +139,7 @@
* an event must be non-zero in all 3 GE_KIND categories
* to be passed to this handler
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_callback(GE_KIND mask,
GE_LogHandler handler,
void * ctx,
@@ -170,7 +170,7 @@
}
/**
- * Would an event of this kind be possibly
+ * Would an event of this kind be possibly
* processed by the logger?
* @param ctx the logger
* @param have the kind of event
@@ -225,7 +225,7 @@
if (0 == strcasecmp(log,
_("ALL")))
return GE_ALL;
-
+
return GE_INVALID;
}
@@ -259,7 +259,7 @@
}
-typedef struct {
+typedef struct {
struct GE_Context * c1;
struct GE_Context * c2;
} CPair;
@@ -288,7 +288,7 @@
* Create a context that sends events to two other contexts.
* Note that the client must stop using ctx1/ctx2 henceforth.
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_multiplexer(struct GE_Context * ctx1,
struct GE_Context * ctx2) {
CPair * cls;
Modified: GNUnet/src/util/getopt/getopt.c
===================================================================
--- GNUnet/src/util/getopt/getopt.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/getopt/getopt.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -22,7 +22,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-USA.
+USA.
This code was heavily modified for GNUnet.
@@ -968,14 +968,14 @@
}
static int
-GNgetopt_long(int argc,
- const char ** argv,
- const char * options,
+GNgetopt_long(int argc,
+ const char ** argv,
+ const char * options,
const struct GNoption * long_options,
int * opt_index) {
return GN_getopt_internal(argc,
- argv,
- options,
+ argv,
+ options,
long_options,
opt_index,
0);
@@ -990,7 +990,7 @@
* @param ectx for reporting errors
* @param cfg for storing/accessing configuration data
* @param allOptions defined options and handlers
- * @param argc number of arguments
+ * @param argc number of arguments
* @param argv actual arguments
* @return index into argv with first non-option
* argument, or -1 on error
@@ -1049,7 +1049,7 @@
if (c == SYSERR)
break; /* No more flags to process */
-
+
for (i=0;i<count;i++) {
clpc.currentArgument = GNoptind - 1;
if ((char)c == allOptions[i].shortName) {
@@ -1065,7 +1065,7 @@
GE_INFO | GE_USER | GE_IMMEDIATE,
_("Use --help to get a list of options.\n"));
cont = SYSERR;
- }
+ }
}
FREE(shorts);
Modified: GNUnet/src/util/getopt/printversion.c
===================================================================
--- GNUnet/src/util/getopt/printversion.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/getopt/printversion.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -33,7 +33,7 @@
const char * option,
const char * value) {
const char * version = scls;
-
+
printf("%s v%s",
ctx->binaryName,
version);
Modified: GNUnet/src/util/getopt/setoption.c
===================================================================
--- GNUnet/src/util/getopt/setoption.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/getopt/setoption.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -51,7 +51,7 @@
section,
option,
value);
-
+
if (ret != 0) {
GE_LOG(ctx->ectx,
GE_USER | GE_BULK | GE_ERROR,
@@ -128,7 +128,7 @@
const char * value) {
unsigned long long * val = scls;
if (1 != SSCANF(value, "%llu", val)) {
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_ERROR | GE_IMMEDIATE | GE_USER,
_("You must pass a number to the `%s' option.\n"),
"-X");
@@ -144,7 +144,7 @@
unsigned int * val = scls;
if (1 != SSCANF(value, "%u", val)) {
- GE_LOG(ctx->ectx,
+ GE_LOG(ctx->ectx,
GE_ERROR | GE_IMMEDIATE | GE_USER,
_("You must pass a number to the `%s' option.\n"),
"-X");
Modified: GNUnet/src/util/loggers/file.c
===================================================================
--- GNUnet/src/util/loggers/file.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/loggers/file.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -38,12 +38,12 @@
/**
* Error context for errors
- */
+ */
struct GE_Context * ectx;
/**
* File handle used for logging.
- */
+ */
FILE * handle;
/**
@@ -67,7 +67,7 @@
* (0: NO, 1: YES)
*/
int logdate;
-
+
/**
* Should log files be rotated? 0: no,
* otherwise number of days to keep.
@@ -86,7 +86,7 @@
} FileContext;
-static char *
+static char *
getDateFormat() {
char * datefmt;
char *idx;
@@ -103,14 +103,14 @@
if ((c == '\\') || (c == '/'))
*idx = '_';
idx++;
- }
+ }
return datefmt;
}
/**
* Remove file if it is an old log
*/
-static int
+static int
removeOldLog(const char * fil,
const char * dir,
void * ptr) {
@@ -148,7 +148,7 @@
return OK; /* not a logfile */
}
if (ctx->logrotate
- + t.tm_year * 365 + t.tm_yday
+ + t.tm_year * 365 + t.tm_yday
- lcltime.tm_year * 365 - lcltime.tm_yday
<= 0 )
UNLINK(fullname); /* TODO: add ctx->fctx */
@@ -157,10 +157,10 @@
}
/**
- * Get the current day of the year
+ * Get the current day of the year
* formatted for appending to the filename.
*/
-static char *
+static char *
getLogFileName(struct GE_Context * fctx,
const char * name) {
time_t curtime;
@@ -188,14 +188,14 @@
size = strlen(name) + 82;
ret = MALLOC(size);
SNPRINTF(ret,
- size,
+ size,
"%s-%s",
name,
date);
return ret;
}
-static void
+static void
filelogger(void * cls,
GE_KIND kind,
const char * date,
@@ -203,8 +203,8 @@
FileContext * fctx = cls;
char * name;
int ret;
-
- MUTEX_LOCK(fctx->lock);
+
+ MUTEX_LOCK(fctx->lock);
if (fctx->logrotate) {
name = getLogFileName(fctx->ectx,
fctx->basename);
@@ -220,7 +220,7 @@
fctx);
} else {
FREE(name);
- }
+ }
}
if (fctx->logdate) {
ret = fprintf(fctx->handle,
@@ -258,17 +258,17 @@
"fclose");
FREE(fctx);
}
-
+
/**
* Create a logger that writes events to a file.
- *
+ *
* @param mask which events should be logged?
* @param filename which file should we log to?
* @param logDate should the context log event dates?
* @param logrotate after how many days should rotated log
* files be deleted (use 0 for no rotation)
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_logfile(struct GE_Context * ectx,
GE_KIND mask,
const char * filename,
@@ -279,7 +279,7 @@
char * name;
TIME_T start;
- TIME(&start);
+ TIME(&start);
if (logrotate != 0) {
name = getLogFileName(NULL,
filename);
@@ -313,10 +313,10 @@
/**
* Create a logger that writes events to stderr
- *
+ *
* @param mask which events should be logged?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_stderr(int logDate,
GE_KIND mask) {
FileContext * fctx;
@@ -340,10 +340,10 @@
/**
* Create a logger that writes events to stderr
- *
+ *
* @param mask which events should be logged?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_stdout(int logDate,
GE_KIND mask) {
FileContext * fctx;
Modified: GNUnet/src/util/loggers/memory.c
===================================================================
--- GNUnet/src/util/loggers/memory.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/loggers/memory.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -43,7 +43,7 @@
unsigned int pos;
} GE_Memory;
-static void
+static void
memorylogger(void * cls,
GE_KIND kind,
const char * date,
@@ -69,7 +69,7 @@
ctx->messages[ctx->pos].date = STRDUP(date);
if (ctx->pos == ctx->maxSize-1) {
ctx->messages[ctx->pos].msg = STRDUP(_("Out of memory (for logging)"));
- ctx->messages[ctx->pos].mask = GE_STATUS | GE_USER | GE_BULK;
+ ctx->messages[ctx->pos].mask = GE_STATUS | GE_USER | GE_BULK;
} else {
ctx->messages[ctx->pos].msg = STRDUP(msg);
ctx->messages[ctx->pos].mask = kind;
@@ -82,7 +82,7 @@
* Create a logger that keeps events in memory (to be
* queried later in bulk).
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_memory(GE_KIND mask,
struct GE_Memory * memory) {
return GE_create_context_callback(mask,
@@ -98,12 +98,12 @@
* log messages of an operation to provide the
* final error in bulk to the client (i.e. as
* a return value, possibly over the network).
- *
+ *
* @param maxSize the maximum number of messages to keep, 0 for unbounded
* (if more than maxSize messages are received, message number maxSize
* will be set to a corresponding warning)
*/
-struct GE_Memory *
+struct GE_Memory *
GE_create_memory(unsigned int maxSize) {
GE_Memory * ret;
@@ -134,7 +134,7 @@
FREE(memory->messages[i].date);
FREE(memory->messages[i].msg);
}
- memory->pos = 0;
+ memory->pos = 0;
MUTEX_UNLOCK(memory->lock);
}
Modified: GNUnet/src/util/loggers/smtp.c
===================================================================
--- GNUnet/src/util/loggers/smtp.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/loggers/smtp.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -25,7 +25,7 @@
*/
#include "gnunet_error_loging.h"
-#if FICTION
+#if FICTION
/**
* @param address e-mail address to send the logs to
* @param server hostname of SMTP gateway, NULL for using local "mail" command
@@ -34,7 +34,7 @@
* @param bulkSize for GE_BULK messages, how many lines of messages
* should be accumulated before an e-mail is transmitted?
*/
-struct GE_Context *
+struct GE_Context *
GE_create_context_email(struct GE_Context * ectx,
GE_MASK mask,
const char * address,
Modified: GNUnet/src/util/network/io.c
===================================================================
--- GNUnet/src/util/network/io.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/network/io.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -95,7 +95,7 @@
-struct SocketHandle *
+struct SocketHandle *
socket_create(struct GE_Context * ectx,
struct LoadMonitor * mon,
int osSocket) {
@@ -112,9 +112,9 @@
GE_ASSERT(NULL, s != NULL);
if ( (0 != SHUTDOWN(s->handle,
SHUT_RDWR)) &&
- (errno != ENOTCONN) )
+ (errno != ENOTCONN) )
GE_LOG_STRERROR(s->ectx,
- GE_WARNING | GE_ADMIN | GE_BULK,
+ GE_WARNING | GE_ADMIN | GE_BULK,
"shutdown");
if (0 != CLOSE(s->handle))
GE_LOG_STRERROR(s->ectx,
@@ -128,9 +128,9 @@
if (s->handle != -1) {
if ( (0 != SHUTDOWN(s->handle,
SHUT_RDWR)) &&
- (errno != ENOTCONN) )
+ (errno != ENOTCONN) )
GE_LOG_STRERROR(s->ectx,
- GE_WARNING | GE_ADMIN | GE_BULK,
+ GE_WARNING | GE_ADMIN | GE_BULK,
"shutdown");
if (0 != CLOSE(s->handle))
GE_LOG_STRERROR(s->ectx,
@@ -141,14 +141,14 @@
}
/* TODO: log errors! */
-int socket_set_blocking(struct SocketHandle * s,
+int socket_set_blocking(struct SocketHandle * s,
int doBlock) {
#if MINGW
u_long l = !doBlock;
- if (ioctlsocket(s->handle,
+ if (ioctlsocket(s->handle,
FIONBIO, &l) == SOCKET_ERROR) {
SetErrnoFromWinsockError(WSAGetLastError());
-
+
return -1;
} else {
/* store the blocking mode */
@@ -170,7 +170,7 @@
int socket_test_blocking(struct SocketHandle * s)
{
#ifndef MINGW
- return (fcntl(s->handle,
+ return (fcntl(s->handle,
F_GETFL) & O_NONBLOCK) ? NO : YES;
#else
return __win_IsHandleMarkedAsBlocking(s->handle);
@@ -186,7 +186,7 @@
size_t pos;
size_t ret;
- socket_set_blocking(s,
+ socket_set_blocking(s,
0 != (nc & NC_Blocking));
flags = 0;
#ifdef CYGWIN
@@ -213,15 +213,15 @@
flags);
if ( (ret == (size_t) -1) &&
(errno == EINTR) &&
- (0 != (nc & NC_IgnoreInt)) )
- continue;
+ (0 != (nc & NC_IgnoreInt)) )
+ continue;
if (ret == (size_t) -1) {
if (errno == EINTR) {
*read = pos;
return YES;
}
if (errno == EWOULDBLOCK) {
- if (0 != (nc & NC_Blocking))
+ if (0 != (nc & NC_Blocking))
continue;
*read = pos;
return (pos == 0) ? NO : YES;
@@ -235,7 +235,7 @@
if (ret == 0) {
/* most likely: other side closed connection */
*read = pos;
- return SYSERR;
+ return SYSERR;
}
if (s->mon != NULL)
os_network_monitor_notify_transmission(s->mon,
@@ -259,7 +259,7 @@
size_t pos;
size_t ret;
- socket_set_blocking(s,
+ socket_set_blocking(s,
0 != (nc & NC_Blocking));
flags = 0;
#ifdef CYGWIN
@@ -310,7 +310,7 @@
if (ret == 0) {
/* most likely: other side closed connection */
*read = pos;
- return SYSERR;
+ return SYSERR;
}
if (s->mon != NULL)
os_network_monitor_notify_transmission(s->mon,
@@ -332,7 +332,7 @@
size_t pos;
size_t ret;
- socket_set_blocking(s,
+ socket_set_blocking(s,
0 != (nc & NC_Blocking));
flags = 0;
#if SOMEBSD || SOLARIS
@@ -382,7 +382,7 @@
if (ret == 0) {
/* strange error; most likely: other side closed connection */
*sent = pos;
- return SYSERR;
+ return SYSERR;
}
if (s->mon != NULL)
os_network_monitor_notify_transmission(s->mon,
@@ -406,7 +406,7 @@
size_t pos;
size_t ret;
- socket_set_blocking(s,
+ socket_set_blocking(s,
0 != (nc & NC_Blocking));
flags = 0;
#if SOMEBSD || SOLARIS
@@ -458,7 +458,7 @@
if (ret == 0) {
/* strange error; most likely: other side closed connection */
*sent = pos;
- return SYSERR;
+ return SYSERR;
}
if (s->mon != NULL)
os_network_monitor_notify_transmission(s->mon,
@@ -478,12 +478,12 @@
int socket_test_valid(struct SocketHandle * s) {
#ifndef MINGW
struct stat buf;
- return -1 != fstat(s->handle,
+ return -1 != fstat(s->handle,
&buf);
#else
long l;
- return ioctlsocket(s->handle,
- FIONREAD,
+ return ioctlsocket(s->handle,
+ FIONREAD,
&l) != SOCKET_ERROR;
#endif
}
Modified: GNUnet/src/util/network/network.h
===================================================================
--- GNUnet/src/util/network/network.h 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/network/network.h 2006-10-21 19:58:30 UTC (rev 3530)
@@ -31,11 +31,11 @@
typedef struct SocketHandle {
struct LoadMonitor * mon;
-
+
struct GE_Context * ectx;
int handle;
-
+
} SocketHandle;
#endif
Modified: GNUnet/src/util/network/select.c
===================================================================
--- GNUnet/src/util/network/select.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/network/select.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -105,7 +105,7 @@
struct SocketHandle * listen_sock;
struct GE_Context * ectx;
-
+
struct LoadMonitor * load_monitor;
/**
@@ -119,14 +119,14 @@
SelectCloseHandler ch;
- void * mh_cls;
-
+ void * mh_cls;
+
void * ah_cls;
-
+
void * ch_cls;
-
+
cron_t timeout;
-
+
/**
* tcp_pipe is used to signal the thread that is
* blocked in a select call that the set of sockets to listen
@@ -169,7 +169,7 @@
GE_LOG(sh->ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Signaling select %p.\n",
- sh);
+ sh);
#endif
ret = WRITE(sh->signal_pipe[1],
&i,
@@ -189,7 +189,7 @@
* already held by the caller.
*/
static void destroySession(SelectHandle * sh,
- Session * s) {
+ Session * s) {
int i;
if (s->locked == 1) {
@@ -203,7 +203,7 @@
s,
sh,
s->rsize,
- s->wsize);
+ s->wsize);
#endif
sh->ch(sh->ch_cls,
sh,
@@ -231,7 +231,7 @@
}
/**
- * The socket of a session has data waiting, read and
+ * The socket of a session has data waiting, read and
* process!
*
* This function may only be called if the lock is
@@ -244,7 +244,7 @@
int ret;
size_t recvd;
unsigned short len;
-
+
if (session->rsize == session->pos) {
/* read buffer too small, grow */
GROW(session->rbuff,
@@ -252,7 +252,7 @@
session->rsize + 1024);
}
ret = socket_recv(session->sock,
- NC_Nonblocking | NC_IgnoreInt,
+ NC_Nonblocking | NC_IgnoreInt,
&session->rbuff[session->pos],
session->rsize - session->pos,
&recvd);
@@ -264,7 +264,7 @@
session,
ret,
recvd,
- STRERROR(errno));
+ STRERROR(errno));
#endif
if (ret != OK) {
destroySession(sh, session);
@@ -289,8 +289,8 @@
len);
/* do we have the entire message? */
- if (session->pos < len)
- break; /* wait for more */
+ if (session->pos < len)
+ break; /* wait for more */
session->locked = 1;
MUTEX_UNLOCK(sh->lock);
@@ -322,7 +322,7 @@
}
/**
- * The socket of a session has data waiting that can be
+ * The socket of a session has data waiting that can be
* transmitted, do it!
*
* This function may only be called if the lock is
@@ -341,7 +341,7 @@
"Write and process called for session %p of select %p status %d.\n",
sh,
session,
- sh->shutdown);
+ sh->shutdown);
#endif
sock = session->sock;
while (sh->shutdown == NO) {
@@ -357,7 +357,7 @@
session->wpos,
sh,
session,
- ret);
+ ret);
#endif
if (ret == SYSERR) {
GE_LOG_STRERROR(sh->ectx,
@@ -365,11 +365,11 @@
"send");
destroySession(sh, session);
return SYSERR;
- }
+ }
if (ret == OK) {
if (size == 0) {
- /* send only returns 0 on error (happens if
- other side closed connection), so close
+ /* send only returns 0 on error (happens if
+ other side closed connection), so close
the session */
destroySession(sh, session);
return SYSERR;
@@ -430,7 +430,7 @@
"fstat");
sh->signal_pipe[0] = -1; /* prevent us from error'ing all the time */
} else {
- FD_SET(sh->signal_pipe[0],
+ FD_SET(sh->signal_pipe[0],
&readSet);
}
}
@@ -444,7 +444,7 @@
sh->listen_sock = NULL; /* prevent us from error'ing all the time */
} else {
add_to_select_set(sh->listen_sock, &readSet, &max);
- }
+ }
}
for (i=0;i<sh->sessionCount;i++) {
Session * session = sh->sessions[i];
@@ -456,7 +456,7 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Select %p destroys invalid client handle %p\n",
sh,
- session);
+ session);
#endif
destroySession(sh, session);
} else {
@@ -465,7 +465,7 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Select %p adds to select set connection %p\n",
sh,
- session);
+ session);
#endif
add_to_select_set(sock, &readSet, &max);
add_to_select_set(sock, &errorSet, &max);
@@ -474,7 +474,7 @@
}
}
MUTEX_UNLOCK(sh->lock);
- ret = SELECT(max+1,
+ ret = SELECT(max+1,
&readSet,
&writeSet,
&errorSet,
@@ -486,7 +486,7 @@
if (ret == -1) {
if (errno == EBADF) {
GE_LOG_STRERROR(sh->ectx,
- GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
+ GE_ERROR | GE_ADMIN | GE_USER | GE_BULK,
"select");
} else {
GE_DIE_STRERROR(sh->ectx,
@@ -508,7 +508,7 @@
GE_LOG(sh->ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"Select %s failed to accept!\n",
- sh->description);
+ sh->description);
GE_LOG_STRERROR(sh->ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"accept");
@@ -519,7 +519,7 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Select %p is accepting connection: %d\n",
sh,
- s);
+ s);
#endif
sock = socket_create(sh->ectx,
sh->load_monitor,
@@ -534,7 +534,7 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Select %p is accepting connection: %p\n",
sh,
- sctx);
+ sctx);
#endif
if (sctx == NULL) {
socket_destroy(sock);
@@ -550,7 +550,7 @@
sh->sessionArrayLength + 4);
sh->sessions[sh->sessionCount++] = session;
}
- }
+ }
}
} else { /* is_udp == YES */
if ( (sh->listen_sock != NULL) &&
@@ -586,7 +586,7 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Select %p is preparing to receive %u bytes\n",
sh,
- pending);
+ pending);
#endif
GE_ASSERT(sh->ectx, pending >= 0);
if (pending == 0) {
@@ -604,8 +604,8 @@
socket_close(sh->listen_sock);
} else {
char * msg;
-
- msg = MALLOC(pending);
+
+ msg = MALLOC(pending);
size = 0;
if (YES != socket_recv_from(sh->listen_sock,
NC_Blocking,
@@ -619,19 +619,19 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Error in select %p -- failed to receive %u bytes\n",
sh,
- pending);
+ pending);
#endif
socket_close(sh->listen_sock);
} else {
/* validate msg format! */
const MESSAGE_HEADER * hdr;
-
+
hdr = (const MESSAGE_HEADER*) msg;
if ( (size == pending) &&
(size >= sizeof(MESSAGE_HEADER)) &&
(ntohs(hdr->size) == size) ) {
void * sctx;
-
+
sctx = sh->ah(sh->ah_cls,
sh,
NULL,
@@ -646,13 +646,13 @@
sh->ch(sh->ch_cls,
sh,
NULL,
- sctx);
+ sctx);
} else {
#if DEBUG_SELECT
GE_LOG(sh->ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Error in select %p -- connection refused\n",
- sh);
+ sh);
#endif
}
} else {
@@ -677,7 +677,7 @@
&buf[0],
MAXSIG_BUF)) {
GE_LOG_STRERROR(sh->ectx,
- GE_WARNING | GE_USER | GE_BULK,
+ GE_WARNING | GE_USER | GE_BULK,
"read");
}
}
@@ -695,9 +695,9 @@
session)) ) {
i--;
continue;
- }
+ }
if (FD_ISSET(sock->handle, &errorSet)) {
- destroySession(sh,
+ destroySession(sh,
session);
i--;
continue;
@@ -719,8 +719,8 @@
int handle) {
#if MINGW
u_long l = 1;
- if (ioctlsocket(handle,
- FIONBIO,
+ if (ioctlsocket(handle,
+ FIONBIO,
&l) == SOCKET_ERROR) {
SetErrnoFromWinsockError(WSAGetLastError());
return SYSERR;
@@ -777,7 +777,7 @@
GE_LOG_STRERROR(ectx,
GE_ERROR | GE_USER | GE_IMMEDIATE,
"listen");
- return NULL;
+ return NULL;
}
GE_ASSERT(ectx, description != NULL);
sh = MALLOC(sizeof(SelectHandle));
@@ -797,10 +797,10 @@
(0 != CLOSE(sh->signal_pipe[1])) )
GE_LOG_STRERROR(ectx,
GE_ERROR | GE_IMMEDIATE | GE_ADMIN,
- "close");
+ "close");
FREE(sh);
- return NULL;
- }
+ return NULL;
+ }
sh->shutdown = NO;
sh->ectx = ectx;
sh->load_monitor = mon;
@@ -848,7 +848,7 @@
GE_LOG(sh->ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Destroying select %p\n",
- sh);
+ sh);
#endif
sh->shutdown = YES;
signalSelect(sh);
@@ -859,12 +859,12 @@
GROW(sh->sessions,
sh->sessionArrayLength,
0);
- MUTEX_DESTROY(sh->lock);
+ MUTEX_DESTROY(sh->lock);
if (0 != CLOSE(sh->signal_pipe[1]))
GE_LOG_STRERROR(sh->ectx,
GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"close");
- if (0 != CLOSE(sh->signal_pipe[0]))
+ if (0 != CLOSE(sh->signal_pipe[0]))
GE_LOG_STRERROR(sh->ectx,
GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"close");
@@ -880,7 +880,7 @@
* has been sent
* @param force message is important, queue even if
* there is not enough space
- * @return OK if the message was sent or queued,
+ * @return OK if the message was sent or queued,
* NO if there was not enough memory to queue it,
* SYSERR if the sock does not belong with this select
*/
@@ -900,19 +900,19 @@
"Adding message of size %u to %p of select %p\n",
ntohs(msg->size),
sock,
- sh);
+ sh);
#endif
session = NULL;
len = ntohs(msg->size);
MUTEX_LOCK(sh->lock);
- for (i=0;i<sh->sessionCount;i++)
+ for (i=0;i<sh->sessionCount;i++)
if (sh->sessions[i]->sock == sock) {
session = sh->sessions[i];
break;
}
if (session == NULL) {
MUTEX_UNLOCK(sh->lock);
- return SYSERR;
+ return SYSERR;
}
fresh_write = (session->wsize == 0);
GROW(session->wbuff,
@@ -936,13 +936,13 @@
struct SocketHandle * sock,
void * sock_ctx) {
Session * session;
-
+
#if DEBUG_SELECT
GE_LOG(sh->ectx,
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Adding connection %p to selector %p\n",
sock,
- sh);
+ sh);
#endif
session = MALLOC(sizeof(Session));
memset(session, 0, sizeof(Session));
@@ -974,15 +974,15 @@
GE_DEBUG | GE_DEVELOPER | GE_BULK,
"Removing connection %p from selector %p\n",
sock,
- sh);
+ sh);
#endif
session = NULL;
MUTEX_LOCK(sh->lock);
- for (i=0;i<sh->sessionCount;i++)
+ for (i=0;i<sh->sessionCount;i++)
if (sh->sessions[i]->sock == sock) {
session = sh->sessions[i];
break;
- }
+ }
if (session == NULL) {
MUTEX_UNLOCK(sh->lock);
return SYSERR;
Modified: GNUnet/src/util/network_client/daemon.c
===================================================================
--- GNUnet/src/util/network_client/daemon.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/network_client/daemon.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -37,7 +37,7 @@
int ret;
sock = client_connection_create(ectx, cfg);
- if (sock == NULL)
+ if (sock == NULL)
return SYSERR;
csHdr.size
= htons(sizeof(MESSAGE_HEADER));
Modified: GNUnet/src/util/network_client/tcpio.c
===================================================================
--- GNUnet/src/util/network_client/tcpio.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/network_client/tcpio.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -59,7 +59,7 @@
struct SocketHandle * sock;
struct MUTEX * readlock;
-
+
struct MUTEX * writelock;
struct MUTEX * destroylock;
@@ -119,12 +119,12 @@
return res;
}
-struct ClientServerConnection *
+struct ClientServerConnection *
client_connection_create(struct GE_Context * ectx,
struct GC_Configuration * cfg) {
ClientServerConnection * result;
- result = MALLOC(sizeof(ClientServerConnection));
+ result = MALLOC(sizeof(ClientServerConnection));
result->sock = NULL;
result->readlock = MUTEX_CREATE(NO);
result->writelock = MUTEX_CREATE(NO);
@@ -181,11 +181,11 @@
sock->cfg);
if (port == 0)
return SYSERR;
- host = getGNUnetdHost(sock->ectx,
+ host = getGNUnetdHost(sock->ectx,
sock->cfg);
if (host == NULL)
return SYSERR;
- if (SYSERR == get_host_by_name(sock->ectx,
+ if (SYSERR == get_host_by_name(sock->ectx,
host,
&ip)) {
FREE(host);
@@ -236,7 +236,7 @@
}
/* we call select() first with a timeout of 5s to
avoid blocking on a later write indefinitely;
- Important if a local firewall decides to just drop
+ Important if a local firewall decides to just drop
the TCP handshake...*/
FD_ZERO(&rset);
FD_ZERO(&wset);
@@ -244,10 +244,10 @@
FD_SET(osock, &wset);
timeout.tv_sec = 5;
timeout.tv_usec = 0;
- ret = SELECT(osock + 1,
+ ret = SELECT(osock + 1,
&rset,
&wset,
- &eset,
+ &eset,
&timeout);
if ( (ret == -1) ||
(! FD_ISSET(osock,
@@ -312,7 +312,7 @@
if (OK != connection_ensure_connected(sock))
return SYSERR;
-
+
MUTEX_LOCK(sock->readlock);
pos = 0;
res = 0;
@@ -370,7 +370,7 @@
rv = NULL;
if (SYSERR == connection_read(sock,
- (MESSAGE_HEADER **) &rv))
+ (MESSAGE_HEADER **) &rv))
return SYSERR;
if ( (ntohs(rv->header.size) != sizeof(RETURN_VALUE_MESSAGE)) ||
(ntohs(rv->header.type) != CS_PROTO_RETURN_VALUE) ) {
@@ -413,7 +413,7 @@
* a serious error to the other side.
*
* @param sock the TCP socket
- * @param mask GE_MASK
+ * @param mask GE_MASK
* @param date date string
* @param msg message string
* @return SYSERR on error, OK if the error code was send
Modified: GNUnet/src/util/network_client/tcpiotest.c
===================================================================
--- GNUnet/src/util/network_client/tcpiotest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/network_client/tcpiotest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -43,8 +43,8 @@
1,
65535,
2087,
- &port))
- port = 0;
+ &port))
+ port = 0;
return (unsigned short) port;
}
@@ -87,7 +87,7 @@
if (BIND (listenerFD,
(struct sockaddr *) &serverAddr,
sizeof(serverAddr)) < 0) {
- GE_LOG_STRERROR(NULL,
+ GE_LOG_STRERROR(NULL,
GE_BULK | GE_ERROR | GE_USER,
"bind");
CLOSE(listenerFD);
@@ -96,7 +96,7 @@
/* start listening for new connections */
if (0 != LISTEN(listenerFD, 5)) {
- GE_LOG_STRERROR(NULL,
+ GE_LOG_STRERROR(NULL,
GE_BULK | GE_ERROR | GE_USER,
"listen");
CLOSE(listenerFD);
@@ -117,7 +117,7 @@
(struct sockaddr *)&clientAddr,
&lenOfIncomingAddr);
if (incomingFD < 0) {
- GE_LOG_STRERROR(NULL,
+ GE_LOG_STRERROR(NULL,
GE_BULK | GE_ERROR | GE_USER,
"accept");
continue;
@@ -188,11 +188,11 @@
if (-1 == GC_parse_configuration(cfg,
"check.conf")) {
GC_free(cfg);
- return -1;
+ return -1;
}
serverSocket = openServerSocket();
- if (serverSocket == -1)
- return 1;
+ if (serverSocket == -1)
+ return 1;
clientSocket = client_connection_create(NULL,
cfg);
ret = 0;
@@ -214,8 +214,8 @@
connection_destroy(clientSocket);
CLOSE(serverSocket);
if (ret > 0)
- fprintf(stderr,
- "Error %d\n",
+ fprintf(stderr,
+ "Error %d\n",
ret);
GC_free(cfg);
return ret;
Modified: GNUnet/src/util/os/console.c
===================================================================
--- GNUnet/src/util/os/console.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/console.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -71,8 +71,8 @@
GE_WARNING | GE_USER | GE_BULK,
"close");
ok = SYSERR;
- while (0 < READ(filedes[0],
- &c,
+ while (0 < READ(filedes[0],
+ &c,
sizeof(char))) {
if (c == '.')
ok = OK;
@@ -110,7 +110,7 @@
return SYSERR;
}
pid = setsid(); /* Detach from controlling terminal */
- if (pid == -1)
+ if (pid == -1)
GE_LOG_STRERROR(ectx,
GE_ERROR | GE_USER | GE_ADMIN | GE_IMMEDIATE,
"setsid");
@@ -125,11 +125,11 @@
int success) {
#ifndef MINGW
char c = '.';
-
+
if (! success)
c = '!';
- WRITE(filedes[1],
- &c,
+ WRITE(filedes[1],
+ &c,
sizeof(char)); /* signal success */
if (0 != CLOSE(filedes[1]))
GE_LOG_STRERROR(ectx,
Modified: GNUnet/src/util/os/cpustatus.c
===================================================================
--- GNUnet/src/util/os/cpustatus.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/cpustatus.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -115,7 +115,7 @@
total_time = usage_time + idle;
}
if ( (total_time > 0) &&
- (have_last_cpu == YES) )
+ (have_last_cpu == YES) )
currentLoad = (100 * usage_time) / total_time;
else
currentLoad = -1;
@@ -150,7 +150,7 @@
kc = kstat_open();
if (kc == NULL) {
GE_LOG_STRERROR(NULL,
- GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
+ GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"kstat_open");
goto ABORT_KSTAT;
}
@@ -395,7 +395,7 @@
MUTEX_UNLOCK(statusMutex);
return -1;
}
-
+
ret = (100 * currentLoad) / maxCPULoad;
/* for CPU, we don't do the 'fast increase' since CPU is much
more jitterish to begin with */
@@ -415,7 +415,7 @@
void __attribute__ ((constructor)) gnunet_cpustats_ltdl_init() {
statusMutex = MUTEX_CREATE(NO);
#ifdef LINUX
- proc_stat = fopen("/proc/stat", "r");
+ proc_stat = fopen("/proc/stat", "r");
if (NULL == proc_stat)
GE_LOG_STRERROR_FILE(NULL,
GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
Modified: GNUnet/src/util/os/daemon.c
===================================================================
--- GNUnet/src/util/os/daemon.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/daemon.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -81,7 +81,7 @@
nice(10); /* return value is not well-defined */
if (errno != 0)
GE_LOG_STRERROR(ectx,
- GE_WARNING | GE_USER | GE_BULK,
+ GE_WARNING | GE_USER | GE_BULK,
"nice");
if (path != NULL)
execv(path,
@@ -90,7 +90,7 @@
execvp("gnunetd",
(char**) args);
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_BULK,
+ GE_ERROR | GE_USER | GE_BULK,
"exec",
path == NULL ? "gnunetd" : path);
FREENONNULL(path);
@@ -102,7 +102,7 @@
ret = waitpid(pid, &status, 0);
if (ret == -1) {
GE_LOG_STRERROR(ectx,
- GE_ERROR | GE_USER | GE_BULK,
+ GE_ERROR | GE_USER | GE_BULK,
"waitpid");
return SYSERR;
}
@@ -155,9 +155,9 @@
if (daemonize == NO) {
args[0] = "-d";
idx = 1;
-
+
cp = GC_get_configuration_value_string(cfg,
- "GNUNET",
+ "GNUNET",
"GNUNETD-CONFIG",
NULL,
&cp);
@@ -169,7 +169,7 @@
}
args[idx] = NULL;
- pid = spawnvp(_P_NOWAIT,
+ pid = spawnvp(_P_NOWAIT,
szCall,
(const char *const *) args);
chdir(szCWd);
@@ -192,21 +192,21 @@
#else
int ret;
DWORD dwExitCode = 0;
-
+
HANDLE hProc = OpenProcess(1, 0, pid);
GenerateConsoleCtrlEvent(CTRL_C_EVENT, pid);
-
+
WaitForSingleObject(hProc, 3000);
-
+
GetExitCodeProcess(hProc, &dwExitCode);
if(dwExitCode == STILL_ACTIVE) {
ret = TerminateProcess(hProc, 0);
}
else
ret = 1;
-
+
CloseHandle(hProc);
-
+
return ret;
#endif
}
Modified: GNUnet/src/util/os/daemontest.c
===================================================================
--- GNUnet/src/util/os/daemontest.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/daemontest.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -29,13 +29,13 @@
#include "gnunet_util_error_loggers.h"
#include "platform.h"
-int main(int argc,
+int main(int argc,
const char *argv[]) {
int daemon;
struct GE_Context * ectx;
struct GC_Configuration * cfg;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
@@ -43,7 +43,7 @@
cfg = GC_create_C_impl();
GE_ASSERT(ectx, cfg != NULL);
os_init(ectx);
- daemon = os_daemon_start(ectx,
+ daemon = os_daemon_start(ectx,
cfg,
"check.conf",
NO);
Modified: GNUnet/src/util/os/dso.c
===================================================================
--- GNUnet/src/util/os/dso.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/dso.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -62,7 +62,7 @@
path = os_get_installation_path(IPK_LIBDIR);
if (path != NULL) {
lt_dlsetsearchpath(path);
- FREE(path);
+ FREE(path);
}
}
@@ -72,15 +72,15 @@
FREE(old_dlsearchpath);
old_dlsearchpath = NULL;
}
-
+
#ifdef MINGW
ShutdownWinEnv();
#endif
-
+
lt_dlexit();
}
-struct PluginHandle *
+struct PluginHandle *
os_plugin_load(struct GE_Context * ectx,
const char * libprefix,
const char * dsoname) {
@@ -119,7 +119,7 @@
FREE(plugin);
}
-void *
+void *
os_plugin_resolve_function(struct PluginHandle * plug,
const char * methodprefix,
int logError) {
@@ -132,7 +132,7 @@
strcat(initName, methodprefix);
strcat(initName, plug->dsoname);
mptr = lt_dlsym(plug->handle, &initName[1]);
- if (mptr == NULL)
+ if (mptr == NULL)
mptr = lt_dlsym(plug->handle, initName);
if ( (mptr == NULL) &&
(logError) )
Modified: GNUnet/src/util/os/installpath.c
===================================================================
--- GNUnet/src/util/os/installpath.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/installpath.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -46,13 +46,13 @@
/**
* Try to determine path by reading /proc/PID/exe
*/
-static char *
+static char *
get_path_from_proc_exe() {
char fn[64];
char * lnk;
size_t size;
- SNPRINTF(fn,
+ SNPRINTF(fn,
64,
"/proc/%u/exe",
getpid());
@@ -88,20 +88,20 @@
static char * get_path_from_module_filename() {
char * path;
char * idx;
-
+
path = MALLOC(4097);
GetModuleFileName(NULL, path, 4096);
idx = path + strlen(path);
- while ( (idx > path) &&
+ while ( (idx > path) &&
(*idx != '\\') &&
(*idx != '/') )
idx--;
*idx = '\0';
- return path;
+ return path;
}
#endif
-static char *
+static char *
get_path_from_PATH() {
char * path;
char * pos;
@@ -141,7 +141,7 @@
return NULL;
}
-static char *
+static char *
get_path_from_GNUNET_PREFIX() {
const char * p;
@@ -163,8 +163,8 @@
ret = get_path_from_GNUNET_PREFIX();
if (ret != NULL)
- return ret;
-#if LINUX
+ return ret;
+#if LINUX
ret = get_path_from_proc_exe();
if (ret != NULL)
return ret;
@@ -197,16 +197,16 @@
execpath = os_get_exec_path();
if (execpath == NULL)
return NULL;
-
+
n = strlen(execpath);
- if (n == 0) {
+ if (n == 0) {
/* should never happen, but better safe than sorry */
FREE(execpath);
return NULL;
}
- if (execpath[n-1] == DIR_SEPARATOR)
- execpath[--n] = '\0';
-
+ if (execpath[n-1] == DIR_SEPARATOR)
+ execpath[--n] = '\0';
+
if ( (n > 3) &&
(0 == strcmp(&execpath[n-3], "bin")) ) {
/* good, strip of '/bin'! */
@@ -231,10 +231,10 @@
break;
default:
FREE(execpath);
- return NULL;
+ return NULL;
}
tmp = MALLOC(strlen(execpath)+strlen(dirname)+1);
- sprintf(tmp,
+ sprintf(tmp,
"%s%s",
execpath,
dirname);
Modified: GNUnet/src/util/os/osconfig.c
===================================================================
--- GNUnet/src/util/os/osconfig.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/osconfig.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -59,12 +59,12 @@
while(1) {
int i = 0;
int c = fgetc(f);
-
+
if (c == EOF)
break;
-
+
dst = entry;
-
+
/* Read interface name until the first space (or colon under OS X) */
while (c != EOF && c != '\n' &&
#ifdef OSX
@@ -78,13 +78,13 @@
c = fgetc(f);
}
*dst = 0;
-
+
if ( (entry[0] != '\0') &&
- (OK != proc(entry,
+ (OK != proc(entry,
strcmp(entry, "eth0") == 0,
cls)) )
break;
-
+
while ((c != '\n') && (c != EOF))
c = fgetc(f);
}
@@ -98,10 +98,10 @@
*/
static int isOSAutostartCapable() {
#ifdef LINUX
- if (ACCESS("/usr/sbin/update-rc.d",
+ if (ACCESS("/usr/sbin/update-rc.d",
X_OK) == 0) {
/* Debian */
- if (ACCESS("/etc/init.d/",
+ if (ACCESS("/etc/init.d/",
W_OK) == 0)
return 1;
}
@@ -119,7 +119,7 @@
int testCapability,
int doAutoStart,
const char * application,
- const char * username,
+ const char * username,
const char * groupname) {
if (testCapability) {
/* TODO: check that user/group/application
@@ -131,10 +131,10 @@
if (IsWinNT()) {
char *err = NULL;
DWORD dwErr = 0;
-
+
if (username && !strlen(username))
username = NULL;
-
+
/* Install service */
switch (InstallAsService(username)) {
case 0:
@@ -148,7 +148,7 @@
default:
return -1;
}
-
+
/* Grant permissions to the GNUnet directory */
if ((!err || dwErr == ERROR_SERVICE_EXISTS) && username) {
char szHome[_MAX_PATH + 1];
@@ -161,17 +161,17 @@
} else {
char szPath[_MAX_PATH + 1];
HKEY hKey;
-
+
plibc_conv_to_win_path(application, szPath);
-
+
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0,
KEY_EXECUTE,
&hKey) == ERROR_SUCCESS) {
- if (RegSetValueEx(hKey,
- "GNUnet",
- 0,
- REG_SZ,
- szPath,
+ if (RegSetValueEx(hKey,
+ "GNUnet",
+ 0,
+ REG_SZ,
+ szPath,
strlen(szPath)) != ERROR_SUCCESS)
return 4;
@@ -196,10 +196,10 @@
}
} else {
HKEY hKey;
-
+
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,
- "Software\\Microsoft\\Windows\\CurrentVersion\\Run",
- 0,
+ "Software\\Microsoft\\Windows\\CurrentVersion\\Run",
+ 0,
KEY_SET_VALUE,
&hKey) == ERROR_SUCCESS) {
RegDeleteValue(hKey, "GNUnet");
@@ -209,7 +209,7 @@
}
#else
struct stat buf;
-
+
/* Unix */
if ( (ACCESS("/usr/sbin/update-rc.d",
X_OK) != 0) ) {
@@ -219,7 +219,7 @@
"/usr/sbin/update-rc.d");
return SYSERR;
}
-
+
/* Debian */
if (doAutoStart) {
if (ACCESS(application,
@@ -229,7 +229,7 @@
"access",
application);
}
- if (STAT("/etc/init.d/gnunetd",
+ if (STAT("/etc/init.d/gnunetd",
&buf) == -1) {
/* create init file */
FILE * f = FOPEN("/etc/init.d/gnunetd", "w");
@@ -240,7 +240,7 @@
"/etc/init.d/gnunetd");
return 1;
}
-
+
fprintf(f,
"#!/bin/sh\n"
"#\n"
@@ -274,11 +274,11 @@
" ;;\n"
"\n"
"esac\n"
- "exit 0\n",
+ "exit 0\n",
"gnunet-setup",
application);
fclose(f);
- if (0 != CHMOD("/etc/init.d/gnunetd",
+ if (0 != CHMOD("/etc/init.d/gnunetd",
S_IRWXU | S_IRGRP | S_IXGRP |
S_IROTH | S_IXOTH)) {
GE_LOG_STRERROR_FILE(ectx,
@@ -313,7 +313,7 @@
"system",
"/usr/sbin/update-rc.d");
return SYSERR;
- }
+ }
return OK;
}
#endif
Modified: GNUnet/src/util/os/priority.c
===================================================================
--- GNUnet/src/util/os/priority.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/priority.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -34,7 +34,7 @@
int os_set_process_priority(struct GE_Context * ectx,
const char * str) {
int prio = 0;
-
+
GE_ASSERT(ectx,
str != NULL);
/* We support four levels (NORMAL, ABOVE NORMAL, BELOW NORMAL, HIGH and IDLE)
@@ -70,7 +70,7 @@
prio = 19;
#endif
else {
- if (1 != sscanf(str,
+ if (1 != sscanf(str,
"%d",
&prio)) {
GE_LOG(ectx,
@@ -79,7 +79,7 @@
str);
return SYSERR;
}
-
+
#ifdef MINGW
/* Convert the nice increment to a priority class */
if (prio == 0)
@@ -94,7 +94,7 @@
prio = HIGH_PRIORITY_CLASS;
#endif
}
-
+
/* Set process priority */
#ifdef MINGW
SetPriorityClass(GetCurrentProcess(), prio);
Modified: GNUnet/src/util/os/semaphore.c
===================================================================
--- GNUnet/src/util/os/semaphore.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/semaphore.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -116,25 +116,25 @@
ret = -1;
while (ret == -1) {
- ret = flock(fd,
+ ret = flock(fd,
operation);
if (ret == -1) {
if (errno != EINTR) {
GE_LOG_STRERROR(NULL,
GE_ERROR | GE_USER | GE_ADMIN | GE_BULK,
"flock");
- return;
+ return;
}
}
}
fsync(fd);
}
static int LSEEK(int fd,
- off_t pos,
+ off_t pos,
int mode) {
int ret;
- ret = lseek(fd,
- pos,
+ ret = lseek(fd,
+ pos,
mode);
if (ret == -1)
GE_LOG_STRERROR(NULL,
@@ -144,7 +144,7 @@
}
#endif
-struct IPC_SEMAPHORE *
+struct IPC_SEMAPHORE *
IPC_SEMAPHORE_CREATE(struct GE_Context * ectx,
const char * basename,
const unsigned int initialValue) {
@@ -176,7 +176,7 @@
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP, /* 660 */
initialValue);
}
- if (ret->internal == (void *) SEM_FAILED)
+ if (ret->internal == (void *) SEM_FAILED)
GE_DIE_STRERROR_FILE(ectx,
GE_FATAL | GE_USER | GE_DEVELOPER | GE_IMMEDIATE,
"sem_open",
@@ -210,7 +210,7 @@
if (! ret->internal) {
GE_LOG(ectx,
GE_FATAL | GE_USER | GE_DEVELOPER | GE_BULK,
- _("Can't create semaphore: %i"),
+ _("Can't create semaphore: %i"),
dwErr);
GE_DIE_STRERROR_FILE(ectx,
GE_FATAL | GE_USER | GE_DEVELOPER | GE_BULK,
@@ -249,19 +249,19 @@
again:
ret->internal = semget(key,
- 3,
+ 3,
IPC_CREAT|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP);
if (ret->internal == -1)
GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semget");
if (semop(ret->internal, &op_lock[0], 2) < 0) {
if (errno == EINVAL)
goto again;
else
- GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_DIE_STRERROR(ectx,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semop");
}
@@ -270,33 +270,33 @@
1,
GETVAL,
0)) < 0)
- GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_DIE_STRERROR(ectx,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semctl");
if (pcount==0) {
semctl_arg.val = initialValue;
- if (semctl(ret->internal,
- 0,
- SETVAL,
+ if (semctl(ret->internal,
+ 0,
+ SETVAL,
semctl_arg) < 0)
- GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_DIE_STRERROR(ectx,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semtcl");
semctl_arg.val = PROCCOUNT;
- if (semctl(ret->internal,
+ if (semctl(ret->internal,
1,
SETVAL,
semctl_arg) < 0)
- GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_DIE_STRERROR(ectx,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semtcl");
}
- if (semop(ret->internal,
+ if (semop(ret->internal,
&op_endcreate[0],
2) < 0)
- GE_DIE_STRERROR(ectx,
- GE_FATAL | GE_USER | GE_IMMEDIATE,
+ GE_DIE_STRERROR(ectx,
+ GE_FATAL | GE_USER | GE_IMMEDIATE,
"semop");
ret->filename = ebasename;
return ret;
@@ -332,8 +332,8 @@
}
if (fd == -1) {
GE_LOG_STRERROR_FILE(ectx,
- GE_ERROR | GE_USER | GE_BULK,
- "open",
+ GE_ERROR | GE_USER | GE_BULK,
+ "open",
ret->filename);
MUTEX_DESTROY(&ret->internalLock);
FREE(ret->filename);
@@ -342,25 +342,25 @@
}
FLOCK(fd, LOCK_EX);
if (sizeof(int) != READ(fd,
- &cnt,
+ &cnt,
sizeof(int))) {
cnt = htonl(initialValue);
- LSEEK(fd,
- 0,
+ LSEEK(fd,
+ 0,
SEEK_SET);
- if (sizeof(int) != WRITE(fd,
- &cnt,
+ if (sizeof(int) != WRITE(fd,
+ &cnt,
sizeof(int)))
GE_LOG_STRERROR_FILE(ectx,
GE_ERROR | GE_USER | GE_BULK,
- "write",
+ "write",
basename);
}
- LSEEK(fd,
- sizeof(int),
+ LSEEK(fd,
+ sizeof(int),
SEEK_SET);
- if (sizeof(int) != READ(fd,
- &cnt,
+ if (sizeof(int) != READ(fd,
+ &cnt,
sizeof(int)))
cnt = htonl(1);
else
@@ -370,7 +370,7 @@
&cnt,
sizeof(int)))
GE_LOG_STRERROR_FILE(ectx,
- GE_WARNING | GE_USER | GE_BULK,
+ GE_WARNING | GE_USER | GE_BULK,
"write",
basename);
FLOCK(fd, LOCK_UN);
@@ -416,11 +416,11 @@
MUTEX_LOCK(&sem->internalLock);
FLOCK(sem->fd,
LOCK_EX);
- LSEEK(sem->fd,
- 0,
+ LSEEK(sem->fd,
+ 0,
SEEK_SET);
- if (sizeof(int) != READ(sem->fd,
- &cnt,
+ if (sizeof(int) != READ(sem->fd,
+ &cnt,
sizeof(int))) {
GE_LOG_STRERROR_FILE(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
@@ -433,10 +433,10 @@
}
cnt = htonl(ntohl(cnt)+1);
LSEEK(sem->fd,
- 0,
+ 0,
SEEK_SET);
if (sizeof(int) != WRITE(sem->fd,
- &cnt,
+ &cnt,
sizeof(int)))
GE_LOG_STRERROR_FILE(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
@@ -465,7 +465,7 @@
}
return OK;
#elif WINDOWS
- if (WaitForSingleObject(sem->internal,
+ if (WaitForSingleObject(sem->internal,
INFINITE) == WAIT_FAILED)
GE_LOG_STRERROR(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
@@ -496,17 +496,17 @@
LOCK_EX);
cnt = ntohl(0);
while (htonl(cnt) == 0) {
- LSEEK(sem->fd,
- 0,
+ LSEEK(sem->fd,
+ 0,
SEEK_SET);
- if (sizeof(int) != READ(sem->fd,
- &cnt,
+ if (sizeof(int) != READ(sem->fd,
+ &cnt,
sizeof(int))) {
GE_LOG_STRERROR_FILE(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
"read",
sem->filename);
- FLOCK(sem->fd,
+ FLOCK(sem->fd,
LOCK_UN);
MUTEX_UNLOCK(&sem->internalLock);
return;
@@ -516,21 +516,21 @@
FLOCK(sem->fd,
LOCK_UN);
PTHREAD_SLEEP(50 * cronMILLIS);
- FLOCK(sem->fd,
+ FLOCK(sem->fd,
LOCK_EX);
}
}
cnt = htonl(ntohl(cnt)-1);
LSEEK(sem->fd, 0, SEEK_SET);
- if (sizeof(int) != WRITE(sem->fd,
- &cnt,
+ if (sizeof(int) != WRITE(sem->fd,
+ &cnt,
sizeof(int)))
GE_LOG_STRERROR_FILE(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
"write",
sem->filename);
- FLOCK(sem->fd,
+ FLOCK(sem->fd,
LOCK_UN);
MUTEX_UNLOCK(&sem->internalLock);
}
@@ -562,7 +562,7 @@
GE_LOG_STRERROR(sem->ectx,
GE_USER | GE_WARNING | GE_BULK,
"semop");
- if ( (pcount = semctl(sem->internal, 1, GETVAL, 0)) < 0)
+ if ( (pcount = semctl(sem->internal, 1, GETVAL, 0)) < 0)
GE_LOG_STRERROR(sem->ectx,
GE_USER | GE_WARNING | GE_BULK,
"semctl");
@@ -578,14 +578,14 @@
"semctl");
UNLINK(sem->filename);
} else {
- if (semop(sem->internal,
+ if (semop(sem->internal,
&op_unlock[0],
1) < 0)
GE_LOG_STRERROR(sem->ectx,
GE_USER | GE_WARNING | GE_BULK,
"semop");
}
- FREE(sem->filename);
+ FREE(sem->filename);
}
#elif SOMEBSD
{
@@ -601,8 +601,8 @@
GE_LOG_STRERROR(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
"write");
- if (ntohl(cnt) == 0)
- UNLINK(sem->filename);
+ if (ntohl(cnt) == 0)
+ UNLINK(sem->filename);
} else
GE_LOG_STRERROR(sem->ectx,
GE_WARNING | GE_USER | GE_BULK,
Modified: GNUnet/src/util/os/semaphoretest.c
===================================================================
--- GNUnet/src/util/os/semaphoretest.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/semaphoretest.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -136,7 +136,7 @@
int main(int argc, char * argv[]){
int ret = 0;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
Modified: GNUnet/src/util/os/statuscalls.c
===================================================================
--- GNUnet/src/util/os/statuscalls.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/statuscalls.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -84,7 +84,7 @@
} DirectionInfo;
typedef struct LoadMonitor {
-
+
/**
* Traffic counter for only gnunetd traffic.
*/
@@ -109,7 +109,7 @@
#ifdef LINUX
FILE * proc_net_dev;
#endif
-
+
/**
* Lock.
*/
@@ -189,7 +189,7 @@
BYTE bPhysAddr[MAXLEN_PHYSADDR];
int iLine = 0;
FILE * command;
-
+
/* Win 98 and NT SP 4 */
if (GNGetIfEntry) {
EnumNICs(&pTable, NULL);
@@ -277,7 +277,7 @@
"LOAD",
"BASICLIMITING",
NO);
- if (basic == SYSERR)
+ if (basic == SYSERR)
return SYSERR;
if (-1 == GC_get_configuration_value_string(cfg,
"LOAD",
@@ -387,7 +387,7 @@
MUTEX_LOCK(monitor->statusMutex);
now = get_time();
if ( (monitor->useBasicMethod == NO) &&
- (now - di->lastCall > 10 * cronSECONDS) )
+ (now - di->lastCall > 10 * cronSECONDS) )
updateInterfaceTraffic(monitor);
if (dir == Upload) {
currentLoadSum = monitor->globalTrafficBetweenProc.last_out;
@@ -397,7 +397,7 @@
currentLoadSum = monitor->globalTrafficBetweenProc.last_in;
for (i=0;i<monitor->ifcsSize;i++)
currentLoadSum += monitor->ifcs[i].last_in;
- }
+ }
if ( (di->lastSum > currentLoadSum) ||
(di->have_last == 0) ||
(now < di->lastCall) ) {
@@ -420,7 +420,7 @@
/* return weighted average between last return value and
load in the last interval */
weight = (now - di->lastCall) * 100 / (5 * cronSECONDS); /* how close are
we to lastCall? */
- if (maxExpect == 0)
+ if (maxExpect == 0)
ret = di->lastValue;
else
ret = (di->lastValue * (100-weight) + weight * (currentLoadSum -
di->lastSum) / maxExpect) / 2;
@@ -441,7 +441,7 @@
return ret;
}
-struct LoadMonitor *
+struct LoadMonitor *
os_network_monitor_create(struct GE_Context * ectx,
struct GC_Configuration * cfg) {
struct LoadMonitor * monitor;
@@ -477,7 +477,7 @@
&resetStatusCalls,
monitor);
#ifdef LINUX
- if (monitor->proc_net_dev != NULL)
+ if (monitor->proc_net_dev != NULL)
fclose(monitor->proc_net_dev);
#endif
for (i=0;i<monitor->ifcsSize;i++)
Modified: GNUnet/src/util/os/statuscallstest.c
===================================================================
--- GNUnet/src/util/os/statuscallstest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/os/statuscallstest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -33,7 +33,7 @@
struct GE_Context * ectx;
struct GC_Configuration * cfg;
- ectx = GE_create_context_stderr(NO,
+ ectx = GE_create_context_stderr(NO,
GE_WARNING | GE_ERROR | GE_FATAL |
GE_USER | GE_ADMIN | GE_DEVELOPER |
GE_IMMEDIATE | GE_BULK);
Modified: GNUnet/src/util/os/user.c
===================================================================
--- GNUnet/src/util/os/user.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/os/user.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -30,8 +30,8 @@
int os_modify_user(struct GE_Context * ectx,
int testCapability,
- int doAdd,
- const char *group_name,
+ int doAdd,
+ const char *group_name,
const char *user_name) {
int haveGroup;
@@ -68,15 +68,15 @@
return SYSERR;
}
if ( (user_name == NULL) ||
- (0 == strlen(user_name)) )
+ (0 == strlen(user_name)) )
return 0;
-
+
#ifdef WINDOWS
- if (IsWinNT())
- return CreateServiceAccount(user_name,
+ if (IsWinNT())
+ return CreateServiceAccount(user_name,
"GNUnet service account");
#else
- if (ACCESS("/usr/sbin/adduser",
+ if (ACCESS("/usr/sbin/adduser",
X_OK) == 0) {
/* Debian */
/* TODO: FreeBSD?
http://www.freebsd.org/cgi/man.cgi?query=adduser&sektion=8 */
@@ -84,21 +84,21 @@
haveGroup = group_name && strlen(group_name) > 0;
cmd = MALLOC(haveGroup ? strlen(group_name) : 0 + strlen(user_name) + 64);
-
+
if (haveGroup) {
sprintf(cmd,
- "/usr/sbin/addgroup --quiet --system %s",
+ "/usr/sbin/addgroup --quiet --system %s",
group_name);
system(cmd);
}
-
- sprintf(cmd,
+
+ sprintf(cmd,
"/usr/sbin/adduser --quiet --system %s %s "
- "--no-create-home %s",
+ "--no-create-home %s",
haveGroup ? "--ingroup" : "",
- haveGroup ? group_name : "",
+ haveGroup ? group_name : "",
user_name);
- system(cmd);
+ system(cmd);
FREE(cmd);
return OK;
}
@@ -134,7 +134,7 @@
GE_LOG(ectx,
GE_FATAL | GE_USER | GE_ADMIN | GE_IMMEDIATE,
_("Cannot change user/group to `%s': %s\n"),
- user,
+ user,
STRERROR(errno));
return SYSERR;
}
Modified: GNUnet/src/util/string/xmalloc.c
===================================================================
--- GNUnet/src/util/string/xmalloc.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/string/xmalloc.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -50,12 +50,12 @@
const char * function) {
/* As a security precaution, we generally do not allow very large
allocations using the default 'MALLOC' macro */
- GE_ASSERT_FLF(NULL,
+ GE_ASSERT_FLF(NULL,
size <= MAX_MALLOC_CHECKED,
- filename,
- linenumber,
+ filename,
+ linenumber,
function);
- return xmalloc_unchecked_(size,
+ return xmalloc_unchecked_(size,
filename,
linenumber,
function);
@@ -67,7 +67,7 @@
const char * function) {
void * result;
- GE_ASSERT_FLF(NULL,
+ GE_ASSERT_FLF(NULL,
size < INT_MAX,
filename,
linenumber,
@@ -77,8 +77,8 @@
GE_DIE_STRERROR_FLF(NULL,
GE_IMMEDIATE | GE_USER | GE_DEVELOPER | GE_FATAL,
"malloc",
- filename,
- linenumber,
+ filename,
+ linenumber,
function);
memset(result,
0,
@@ -109,7 +109,7 @@
GE_DIE_STRERROR_FLF(NULL,
GE_IMMEDIATE | GE_USER | GE_DEVELOPER | GE_FATAL,
"realloc",
- filename,
+ filename,
linenumber,
function);
return ptr;
@@ -129,7 +129,7 @@
const char * function) {
GE_ASSERT_FLF(NULL,
ptr != NULL,
- filename,
+ filename,
linenumber,
function);
free(ptr);
@@ -151,15 +151,15 @@
GE_ASSERT_FLF(NULL,
str != NULL,
- filename,
+ filename,
linenumber,
function);
res = (char*)xmalloc_(strlen(str)+1,
filename,
linenumber,
function);
- memcpy(res,
- str,
+ memcpy(res,
+ str,
strlen(str)+1);
return res;
}
@@ -182,8 +182,8 @@
size_t min;
GE_ASSERT_FLF(NULL,
- str != NULL,
- filename,
+ str != NULL,
+ filename,
linenumber,
function);
min = 0;
@@ -223,7 +223,7 @@
GE_ASSERT_FLF(NULL,
INT_MAX / elementSize > newCount,
- filename,
+ filename,
linenumber,
function);
size = newCount * elementSize;
Modified: GNUnet/src/util/threads/mutex.c
===================================================================
--- GNUnet/src/util/threads/mutex.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/threads/mutex.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -57,7 +57,7 @@
* on all pthread-systems so far. Odd.
*/
#ifndef _MSC_VER
-extern int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr,
+extern int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr,
int kind);
#endif
@@ -95,18 +95,18 @@
#if LINUX
GE_ASSERT(NULL,
0 == pthread_mutexattr_setkind_np
- (&attr,
+ (&attr,
PTHREAD_MUTEX_ERRORCHECK_NP));
#else
GE_ASSERT(NULL,
0 == pthread_mutexattr_settype
- (&attr,
+ (&attr,
PTHREAD_MUTEX_ERRORCHECK));
#endif
}
mut = MALLOC(sizeof(Mutex));
- GE_ASSERT(NULL,
- 0 == pthread_mutex_init(&mut->pt,
+ GE_ASSERT(NULL,
+ 0 == pthread_mutex_init(&mut->pt,
&attr));
return mut;
}
@@ -135,7 +135,7 @@
#if DEBUG_LOCK_DELAY
start = get_time() - start;
if (start > 10)
- printf("Locking took %llu ms!\n",
+ printf("Locking took %llu ms!\n",
start);
#endif
if (ret != 0) {
Modified: GNUnet/src/util/threads/pthread.c
===================================================================
--- GNUnet/src/util/threads/pthread.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/threads/pthread.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -121,7 +121,7 @@
}
/**
- * Should we debug the time a join takes?
+ * Should we debug the time a join takes?
* Useful for detecting missing PTHREAD_STOP_SLEEPS
* and similar signaling operations.
*/
@@ -134,18 +134,18 @@
#endif
int k;
- GE_ASSERT(NULL,
+ GE_ASSERT(NULL,
handle != NULL);
- GE_ASSERT(NULL,
- NO == PTHREAD_TEST_SELF(handle));
+ GE_ASSERT(NULL,
+ NO == PTHREAD_TEST_SELF(handle));
#if DEBUG_JOIN_DELAY
start = get_time();
#endif
k = pthread_join(handle->pt, ret);
#if DEBUG_JOIN_DELAY
start = get_time() - start;
- if (start > 10)
- printf("Join took %llu ms\n",
+ if (start > 10)
+ printf("Join took %llu ms\n",
start);
#endif
FREE(handle);
@@ -237,7 +237,7 @@
* MICROSEC_TO_CRON_UNIT;
ret = SELECT(0, NULL, NULL, NULL, &timeout);
if ( (ret == -1) &&
- (errno != EINTR) )
+ (errno != EINTR) )
GE_LOG_STRERROR(NULL,
GE_WARNING | GE_USER | GE_BULK,
"select");
@@ -252,13 +252,13 @@
return;
#ifdef WINDOWS
ret = QueueUserAPC((PAPCFUNC) __PTHREAD_SIGNALED,
- pthread_getw32threadhandle_np(handle->pt),
+ pthread_getw32threadhandle_np(handle->pt),
0) != 0 ? 0 : EINVAL;
#else
ret = pthread_kill(handle->pt, SIGALRM);
#endif
switch (ret) {
- case 0:
+ case 0:
break; /* ok */
case EINVAL:
GE_LOG(NULL,
@@ -297,13 +297,13 @@
memset(&sig, 0, sizeof(struct sigaction));
memset(&old, 0, sizeof(struct sigaction));
sig.sa_flags = SA_NODEFER;
- sig.sa_handler = &sigalrmHandler;
+ sig.sa_handler = &sigalrmHandler;
if (0 != sigaction(SIGALRM, &sig, &old))
GE_LOG_STRERROR(NULL,
GE_WARNING | GE_ADMIN | GE_BULK,
"sigaction");
#else
- InitWinEnv(NULL);
+ InitWinEnv(NULL);
#endif
}
@@ -314,7 +314,7 @@
GE_WARNING | GE_ADMIN | GE_BULK,
"sigaction");
#else
- ShutdownWinEnv();
+ ShutdownWinEnv();
#endif
}
Modified: GNUnet/src/util/threads/semaphore.c
===================================================================
--- GNUnet/src/util/threads/semaphore.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/threads/semaphore.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -80,7 +80,7 @@
* on all pthread-systems so far. Odd.
*/
#ifndef _MSC_VER
-extern int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr,
+extern int pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr,
int kind);
#endif
@@ -100,21 +100,21 @@
#if LINUX
GE_ASSERT(NULL,
0 == pthread_mutexattr_setkind_np
- (&attr,
+ (&attr,
PTHREAD_MUTEX_ERRORCHECK_NP));
#else
GE_ASSERT(NULL,
0 == pthread_mutexattr_settype
- (&attr,
+ (&attr,
PTHREAD_MUTEX_ERRORCHECK));
#endif
s = MALLOC(sizeof(Semaphore));
s->v = value;
- GE_ASSERT(NULL,
- 0 == pthread_mutex_init(&s->mutex,
+ GE_ASSERT(NULL,
+ 0 == pthread_mutex_init(&s->mutex,
&attr));
GE_ASSERT(NULL,
- 0 == pthread_cond_init(&s->cond,
+ 0 == pthread_cond_init(&s->cond,
NULL));
return s;
}
@@ -149,13 +149,13 @@
GE_ASSERT(NULL, s != NULL);
GE_ASSERT(NULL,
0 == pthread_mutex_lock(&s->mutex));
- while ( (s->v <= 0) && mayblock)
+ while ( (s->v <= 0) && mayblock)
GE_ASSERT(NULL,
0 == pthread_cond_wait(&s->cond,
&s->mutex));
- if (s->v > 0)
+ if (s->v > 0)
ret = --(s->v);
- else
+ else
ret = SYSERR;
GE_ASSERT(NULL,
0 == pthread_mutex_unlock(&s->mutex));
Modified: GNUnet/src/util/threads/semaphoretest.c
===================================================================
--- GNUnet/src/util/threads/semaphoretest.c 2006-10-21 19:57:31 UTC (rev
3529)
+++ GNUnet/src/util/threads/semaphoretest.c 2006-10-21 19:58:30 UTC (rev
3530)
@@ -81,7 +81,7 @@
static int testMutex() {
struct PTHREAD * pt;
void * unused;
-
+
lock = MUTEX_CREATE(NO);
sv = 1;
@@ -156,7 +156,7 @@
__FILE__, __LINE__);
return 1;
}
- for (i=0;i<42;i++)
+ for (i=0;i<42;i++)
SEMAPHORE_UP(sem);
for (i=0;i<42;i++)
if (SYSERR == SEMAPHORE_DOWN(sem, NO)) {
@@ -188,7 +188,7 @@
return 0;
}
-int main(int argc,
+int main(int argc,
char * argv[]){
int ret = 0;
Modified: GNUnet/src/util/win/winproc.c
===================================================================
--- GNUnet/src/util/win/winproc.c 2006-10-21 19:57:31 UTC (rev 3529)
+++ GNUnet/src/util/win/winproc.c 2006-10-21 19:58:30 UTC (rev 3530)
@@ -74,7 +74,7 @@
{
if (!pEctx)
fprintf(stderr, "%s", msg);
- else
+ else
GE_LOG(pEctx, ((err == INT_MAX) ? GE_DEBUG : GE_FATAL) | GE_USER |
GE_ADMIN |
GE_IMMEDIATE, "%s", msg);
}
@@ -87,15 +87,15 @@
int InitWinEnv(struct GE_Context *ectx)
{
int ret, init;
-
+
if (ectx)
pEctx = ectx;
- init = plibc_initialized();
+ init = plibc_initialized();
plibc_set_panic_proc(plibc_panic);
ret = plibc_init("GNU", PACKAGE);
- /* don't load other DLLs twice */
+ /* don't load other DLLs twice */
if (init)
return ret;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3530 - in GNUnet/src: applications/advertising applications/bootstrap_http applications/chat applications/datastore applications/dht/module applications/dht/tools applications/fragmentation applications/fs/collection applications/fs/ecrs applications/fs/fsui applications/fs/lib applications/fs/module applications/fs/namespace applications/fs/tools applications/fs/uritrack applications/gap applications/getoption applications/identity applications/kvstore_sqlite applications/pingpong applications/rpc applications/session applications/sqstore_mysql applications/sqstore_sqlite applications/state applications/stats applications/tbench applications/template applications/testbed applications/topology_default applications/topology_f2f applications/tracekit applications/traffic applications/transport applications/vpn include server setup setup/gtk setup/lib setup/ncurses setup/text transports util/config util/config_impl util/containers util/cron util/crypto util/disk util/error util/getopt util/loggers util/network util/network_client util/os util/string util/threads util/win,
grothoff <=