[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3739 - in GNUnet/src: applications/dht/tools applications/
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3739 - in GNUnet/src: applications/dht/tools applications/fs/collection applications/fs/ecrs applications/fs/tools applications/stats applications/tbench applications/template applications/tracekit applications/vpn include server setup transports util/boot util/loggers |
Date: |
Sun, 12 Nov 2006 19:49:07 -0800 (PST) |
Author: grothoff
Date: 2006-11-12 19:48:56 -0800 (Sun, 12 Nov 2006)
New Revision: 3739
Modified:
GNUnet/src/applications/dht/tools/dht-join.c
GNUnet/src/applications/dht/tools/dht-query.c
GNUnet/src/applications/fs/collection/collection.c
GNUnet/src/applications/fs/ecrs/keyspace.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/stats/gnunet-stats.c
GNUnet/src/applications/tbench/gnunet-tbench.c
GNUnet/src/applications/template/gnunet-template.c
GNUnet/src/applications/tracekit/gnunet-tracekit.c
GNUnet/src/applications/vpn/gnunet-vpn.c
GNUnet/src/include/gnunet_util_boot.h
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/setup/gnunet-setup.c
GNUnet/src/transports/tcp6.c
GNUnet/src/util/boot/startup.c
GNUnet/src/util/loggers/file.c
Log:
type cleanup and minor bugfixes
Modified: GNUnet/src/applications/dht/tools/dht-join.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-join.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/dht/tools/dht-join.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -143,7 +143,7 @@
}
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
int i;
HashCode512 table;
struct GC_Configuration * cfg;
Modified: GNUnet/src/applications/dht/tools/dht-query.c
===================================================================
--- GNUnet/src/applications/dht/tools/dht-query.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/dht/tools/dht-query.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -173,7 +173,7 @@
int main(int argc,
- const char **argv) {
+ char * const * argv) {
int i;
struct ClientServerConnection * handle;
HashCode512 table;
Modified: GNUnet/src/applications/fs/collection/collection.c
===================================================================
--- GNUnet/src/applications/fs/collection/collection.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/fs/collection/collection.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -341,7 +341,6 @@
struct GC_Configuration * cfg,
const ECRS_FileInfo * fi,
unsigned int prio) {
- CollectionData * collectionData;
unsigned long long dirLen;
char * dirData;
struct ECRS_MetaData * metaData;
Modified: GNUnet/src/applications/fs/ecrs/keyspace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/keyspace.c 2006-11-13 03:31:37 UTC (rev
3738)
+++ GNUnet/src/applications/fs/ecrs/keyspace.c 2006-11-13 03:48:56 UTC (rev
3739)
@@ -130,7 +130,6 @@
unsigned int size;
unsigned int mdsize;
struct PrivateKey * pk;
- HashCode512 hc;
char * dstURI;
KBlock * kb;
char ** keywords;
@@ -139,6 +138,9 @@
#if DEBUG_KEYSPACE
EncName enc;
#endif
+#if EXTRA_CHECKS
+ HashCode512 hc;
+#endif
HashCode512 key;
char * cpy; /* copy of the encrypted portion */
struct ECRS_URI * xuri;
Modified: GNUnet/src/applications/fs/tools/gnunet-download.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-download.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/fs/tools/gnunet-download.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -150,7 +150,7 @@
* @return return value from download file: 0: ok, -1, 1: error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
int ok;
int try_rename;
struct FSUI_Context * ctx;
Modified: GNUnet/src/applications/fs/tools/gnunet-insert.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/fs/tools/gnunet-insert.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -107,7 +107,6 @@
* post-processing.
*/
static void postProcess(const struct ECRS_URI * uri) {
- char * pname;
HashCode512 prevId;
HashCode512 thisId;
HashCode512 nextId;
@@ -124,7 +123,7 @@
anonymity,
priority,
1024, /* FIXME: expiration */
- pname,
+ pseudonym,
(TIME_T) interval,
prev_id == NULL ? NULL : &prevId,
this_id == NULL ? NULL : &thisId,
@@ -136,13 +135,14 @@
ECRS_freeUri(nsuri);
printf(_("Created entry `%s' in namespace `%s'\n"),
us,
- pname);
+ pseudonym);
FREE(us);
} else {
printf(_("Failed to add entry to namespace `%s' (does it exist?)\n"),
- pname);
+ pseudonym);
}
- FREE(pname);
+ FREE(pseudonym);
+ pseudonym = NULL;
}
/**
@@ -302,7 +302,7 @@
* @return return 0 for ok, -1 on error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
const char * filename;
int i;
char * tmp;
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -183,9 +183,8 @@
}
int main(int argc,
- const char *argv[]) {
+ char * const * argv) {
int cnt;
- char * pname;
int success;
int i;
HashCode512 hc;
@@ -233,16 +232,16 @@
if (start_collection) {
ECRS_addToMetaData(meta,
EXTRACTOR_OWNER,
- pname);
+ create_name);
if (OK == CO_startCollection(ectx,
cfg,
anonymity,
priority,
ECRS_SBLOCK_UPDATE_SPORADIC, /* FIXME: allow
other update policies */
- pname,
+ create_name,
meta)) {
printf(_("Started collection `%s'.\n"),
- pname);
+ create_name);
} else {
printf(_("Failed to start collection.\n"));
success++;
@@ -250,11 +249,9 @@
ECRS_delFromMetaData(meta,
EXTRACTOR_OWNER,
- pname);
+ create_name);
} else { /* no collection */
HashCode512 rootEntry;
- char * keyword;
- struct ECRS_URI * advertisement;
struct ECRS_URI * rootURI;
char * root;
@@ -268,14 +265,14 @@
&hc);
}
if (no_advertisement) {
- ECRS_freeUri(advertisement);
+ if (advertisement != NULL)
+ ECRS_freeUri(advertisement);
advertisement = NULL;
} else {
if (advertisement == NULL)
advertisement = ECRS_parseCharKeywordURI(ectx,
"namespace");
}
- FREE(keyword);
rootURI = NS_createNamespace(ectx,
cfg,
anonymity,
@@ -287,12 +284,12 @@
&rootEntry);
if (rootURI == NULL) {
printf(_("Could not create namespace `%s' (exists?).\n"),
- pname);
+ create_name);
success += 1;
} else {
root = ECRS_uriToString(rootURI);
printf(_("Namespace `%s' created (root: %s).\n"),
- pname,
+ create_name,
root);
FREE(root);
ECRS_freeUri(rootURI);
@@ -300,8 +297,8 @@
if (NULL != advertisement)
ECRS_freeUri(advertisement);
}
- FREE(pname);
- pname = NULL;
+ FREE(create_name);
+ create_name = NULL;
}
if (0 == be_quiet) {
/* print information about pseudonyms */
Modified: GNUnet/src/applications/stats/gnunet-stats.c
===================================================================
--- GNUnet/src/applications/stats/gnunet-stats.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/stats/gnunet-stats.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -106,7 +106,7 @@
* @return 0 ok, 1 on error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
int res;
struct ClientServerConnection * sock;
struct GC_Configuration * cfg;
Modified: GNUnet/src/applications/tbench/gnunet-tbench.c
===================================================================
--- GNUnet/src/applications/tbench/gnunet-tbench.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/tbench/gnunet-tbench.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -101,7 +101,7 @@
* @return return value from gnunetsearch: 0: ok, -1: error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
struct ClientServerConnection * sock;
CS_tbench_request_MESSAGE msg;
CS_tbench_reply_MESSAGE * buffer;
Modified: GNUnet/src/applications/template/gnunet-template.c
===================================================================
--- GNUnet/src/applications/template/gnunet-template.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/template/gnunet-template.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -67,7 +67,7 @@
* @return return value from gnunet-template: 0: ok, -1: error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
void * unused;
Modified: GNUnet/src/applications/tracekit/gnunet-tracekit.c
===================================================================
--- GNUnet/src/applications/tracekit/gnunet-tracekit.c 2006-11-13 03:31:37 UTC
(rev 3738)
+++ GNUnet/src/applications/tracekit/gnunet-tracekit.c 2006-11-13 03:48:56 UTC
(rev 3739)
@@ -285,7 +285,7 @@
* @return return value from gnunet-tracekit: 0: ok, -1: error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
void * unused;
Modified: GNUnet/src/applications/vpn/gnunet-vpn.c
===================================================================
--- GNUnet/src/applications/vpn/gnunet-vpn.c 2006-11-13 03:31:37 UTC (rev
3738)
+++ GNUnet/src/applications/vpn/gnunet-vpn.c 2006-11-13 03:48:56 UTC (rev
3739)
@@ -117,7 +117,7 @@
* @return return value from gnunet-template: 0: ok, -1: error
*/
int main(int argc,
- const char ** argv) {
+ char * const * argv) {
struct ClientServerConnection * sock;
struct PTHREAD * messageReceiveThread;
void * unused;
Modified: GNUnet/src/include/gnunet_util_boot.h
===================================================================
--- GNUnet/src/include/gnunet_util_boot.h 2006-11-13 03:31:37 UTC (rev
3738)
+++ GNUnet/src/include/gnunet_util_boot.h 2006-11-13 03:48:56 UTC (rev
3739)
@@ -58,7 +58,7 @@
* otherwise
*/
int GNUNET_init(int argc,
- const char ** argv,
+ char * const * argv,
const char * binaryName,
char ** configurationFileName,
const struct CommandLineOption * options,
Modified: GNUnet/src/server/gnunet-peer-info.c
===================================================================
--- GNUnet/src/server/gnunet-peer-info.c 2006-11-13 03:31:37 UTC (rev
3738)
+++ GNUnet/src/server/gnunet-peer-info.c 2006-11-13 03:48:56 UTC (rev
3739)
@@ -103,7 +103,7 @@
}
int main(int argc,
- const char *argv[]) {
+ char * const * argv) {
struct GC_Configuration * cfg;
struct CronManager * cron;
int ret;
Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c 2006-11-13 03:31:37 UTC (rev
3738)
+++ GNUnet/src/server/gnunet-transport-check.c 2006-11-13 03:48:56 UTC (rev
3739)
@@ -378,11 +378,10 @@
};
int main(int argc,
- const char *argv[]) {
+ char * const * argv) {
int res;
unsigned long long Xrepeat;
char * trans;
- int ping;
int stats[3];
int pos;
Modified: GNUnet/src/server/gnunet-update.c
===================================================================
--- GNUnet/src/server/gnunet-update.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/server/gnunet-update.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -243,7 +243,7 @@
int main(int argc,
- const char * argv[]) {
+ char * const * argv) {
char * get;
int ret;
Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/server/gnunetd.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -188,7 +188,7 @@
* call the main routine.
*/
int main(int argc,
- const char * argv[]) {
+ char * const * argv) {
int ret;
struct GE_Context * ectx;
Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/setup/gnunet-setup.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -33,7 +33,7 @@
#include "platform.h"
typedef int (*ConfigurationPluginMain)(int argc,
- const char ** argv,
+ char * const * argv,
struct PluginHandle * self,
struct GE_Context * ectx,
struct GC_Configuration * cfg,
@@ -100,7 +100,7 @@
static int dyn_config(const char * module,
const char * mainfunc,
int argc,
- const char **argv,
+ char * const * argv,
const char * filename) {
ConfigurationPluginMain mptr;
struct PluginHandle * library;
@@ -153,7 +153,7 @@
int main(int argc,
- const char * argv[]) {
+ char * const * argv) {
const char * operation;
int done;
char * dirname;
Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/transports/tcp6.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -236,6 +236,7 @@
#endif
sock = -1;
+ s = NULL;
for (res=res0; res; res=res->ai_next) {
if (res->ai_family != PF_INET6)
continue;
@@ -265,8 +266,8 @@
GE_LOG_STRERROR(ectx,
GE_WARNING | GE_ADMIN | GE_BULK,
"connect");
- CLOSE(sock);
- sock = -1;
+ socket_destroy(s);
+ s = NULL;
continue;
}
break;
@@ -274,7 +275,7 @@
freeaddrinfo(res0);
if (sock == -1)
return SYSERR;
-
+ GE_ASSERT(ectx, s != NULL);
return tcpConnectHelper(helo,
s,
tcp6API.protocolNumber,
Modified: GNUnet/src/util/boot/startup.c
===================================================================
--- GNUnet/src/util/boot/startup.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/util/boot/startup.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -142,7 +142,7 @@
* otherwise
*/
int GNUNET_init(int argc,
- const char ** argv,
+ char * const * argv,
const char * binaryName,
char ** cfgFileName,
const struct CommandLineOption * options,
Modified: GNUnet/src/util/loggers/file.c
===================================================================
--- GNUnet/src/util/loggers/file.c 2006-11-13 03:31:37 UTC (rev 3738)
+++ GNUnet/src/util/loggers/file.c 2006-11-13 03:48:56 UTC (rev 3739)
@@ -218,7 +218,7 @@
dirname = STRDUP(name);
while ( (strlen(dirname) > 0) &&
(dirname[strlen(dirname)-1] != '/') )
- dirname[strlen(dirname)-1] == '\0';
+ dirname[strlen(dirname)-1] = '\0';
disk_directory_scan(fctx->ectx,
dirname,
&removeOldLog,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3739 - in GNUnet/src: applications/dht/tools applications/fs/collection applications/fs/ecrs applications/fs/tools applications/stats applications/tbench applications/template applications/tracekit applications/vpn include server setup transports util/boot util/loggers,
grothoff <=