[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r9588 - in GNUnet/src: applications/bootstrap_http applicat
From: |
gnunet |
Subject: |
[GNUnet-SVN] r9588 - in GNUnet/src: applications/bootstrap_http applications/fs/ecrs applications/fs/tools applications/identity server setup util/network |
Date: |
Fri, 20 Nov 2009 09:24:22 -0700 |
Author: grothoff
Date: 2009-11-20 09:24:22 -0700 (Fri, 20 Nov 2009)
New Revision: 9588
Modified:
GNUnet/src/applications/bootstrap_http/httptest.c
GNUnet/src/applications/fs/ecrs/namespace.c
GNUnet/src/applications/fs/tools/gnunet-auto-share.c
GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
GNUnet/src/applications/identity/identitytest.c
GNUnet/src/server/gnunetd.c
GNUnet/src/setup/gnunet-setup.c
GNUnet/src/util/network/selecttest.c
Log:
fixing various minor bugs
Modified: GNUnet/src/applications/bootstrap_http/httptest.c
===================================================================
--- GNUnet/src/applications/bootstrap_http/httptest.c 2009-11-20 07:44:20 UTC
(rev 9587)
+++ GNUnet/src/applications/bootstrap_http/httptest.c 2009-11-20 16:24:22 UTC
(rev 9588)
@@ -98,8 +98,19 @@
capi.service_request = &rs;
capi.service_release = &rsx;
plugin = GNUNET_plugin_load (NULL, "libgnunetmodule_", "bootstrap");
+ if (NULL == plugin)
+ {
+ GNUNET_GC_free (cfg);
+ return 1;
+ }
init =
GNUNET_plugin_resolve_function (plugin, "provide_module_", GNUNET_YES);
+ if (NULL == init)
+ {
+ GNUNET_plugin_unload (plugin);
+ GNUNET_GC_free (cfg);
+ return 2;
+ }
boot = init (&capi);
if (boot != NULL)
{
Modified: GNUnet/src/applications/fs/ecrs/namespace.c
===================================================================
--- GNUnet/src/applications/fs/ecrs/namespace.c 2009-11-20 07:44:20 UTC (rev
9587)
+++ GNUnet/src/applications/fs/ecrs/namespace.c 2009-11-20 16:24:22 UTC (rev
9588)
@@ -140,6 +140,7 @@
return GNUNET_SYSERR;
}
namespace_priv_key_encoded = GNUNET_RSA_encode_key (key);
+ GNUNET_assert (namespace_priv_key_encoded != NULL);
GNUNET_disk_file_write (NULL, fileName,
(const char *) namespace_priv_key_encoded,
ntohs (namespace_priv_key_encoded->len), "600");
Modified: GNUnet/src/applications/fs/tools/gnunet-auto-share.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-auto-share.c 2009-11-20
07:44:20 UTC (rev 9587)
+++ GNUnet/src/applications/fs/tools/gnunet-auto-share.c 2009-11-20
16:24:22 UTC (rev 9588)
@@ -690,7 +690,11 @@
meta_cfg = GNUNET_GC_create ();
if (GNUNET_YES == GNUNET_disk_file_test (NULL, metafn))
- GNUNET_GC_parse_configuration (meta_cfg, metafn);
+ if (0 != GNUNET_GC_parse_configuration (meta_cfg, metafn))
+ GNUNET_GE_LOG (ectx,
+ GNUNET_GE_ERROR | GNUNET_GE_USER | GNUNET_GE_BULK,
+ _("Failed to parse meta data information file `%s'\n"),
+ metafn);
if (GNUNET_NO == debug_flag)
GNUNET_terminal_detach_complete (ectx, filedes, GNUNET_YES);
GNUNET_free (metafn);
Modified: GNUnet/src/applications/fs/tools/gnunet-pseudonym.c
===================================================================
--- GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-11-20 07:44:20 UTC
(rev 9587)
+++ GNUnet/src/applications/fs/tools/gnunet-pseudonym.c 2009-11-20 16:24:22 UTC
(rev 9588)
@@ -140,11 +140,13 @@
namespaceName = GNUNET_pseudonym_id_to_name (ectx, cfg, id);
GNUNET_hash_to_enc (id, &enc);
- if (0 == strcmp (namespaceName, (char *) &enc))
+ if ( (namespaceName != NULL) &&
+ (0 == strcmp (namespaceName, (char *) &enc)) )
printf (_("Namespace `%s' has rating %d.\n"), namespaceName, rating);
else
printf (_("Namespace `%s' (%s) has rating %d.\n"),
- namespaceName, (char *) &enc, rating);
+ namespaceName != NULL ? namespaceName : "<unknown>",
+ (char *) &enc, rating);
printMeta (md);
if (set_rating != NULL)
{
@@ -183,7 +185,7 @@
}
}
printf ("\n");
- GNUNET_free (namespaceName);
+ GNUNET_free_non_null (namespaceName);
return GNUNET_OK;
}
Modified: GNUnet/src/applications/identity/identitytest.c
===================================================================
--- GNUnet/src/applications/identity/identitytest.c 2009-11-20 07:44:20 UTC
(rev 9587)
+++ GNUnet/src/applications/identity/identitytest.c 2009-11-20 16:24:22 UTC
(rev 9588)
@@ -142,7 +142,7 @@
return -1;
}
cron = GNUNET_cron_create (NULL);
- GNUNET_CORE_init (NULL, cfg, cron, NULL);
+ GNUNET_Assert (GNUNET_OK == GNUNET_CORE_init (NULL, cfg, cron, NULL));
err = 0;
if (GNUNET_OK != runTest ())
err = 1;
Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2009-11-20 07:44:20 UTC (rev 9587)
+++ GNUnet/src/server/gnunetd.c 2009-11-20 16:24:22 UTC (rev 9588)
@@ -61,7 +61,11 @@
reread_config_helper (void *unused)
{
GNUNET_GE_ASSERT (NULL, cfgFilename != NULL);
- GNUNET_GC_parse_configuration (cfg, cfgFilename);
+ if (0 != GNUNET_GC_parse_configuration (cfg, cfgFilename))
+ GNUNET_GE_LOG (ectx,
+ GNUNET_GE_ERROR | GNUNET_GE_USER | GNUNET_GE_IMMEDIATE,
+ _("Failed to parse configuration file `%s'\n"),
+ cfgFilename);
}
/**
Modified: GNUnet/src/setup/gnunet-setup.c
===================================================================
--- GNUnet/src/setup/gnunet-setup.c 2009-11-20 07:44:20 UTC (rev 9587)
+++ GNUnet/src/setup/gnunet-setup.c 2009-11-20 16:24:22 UTC (rev 9588)
@@ -410,7 +410,10 @@
GNUNET_free (dirname);
if (0 == ACCESS (cfgFilename, F_OK))
- GNUNET_GC_parse_configuration (cfg, cfgFilename);
+ if (0 != GNUNET_GC_parse_configuration (cfg, cfgFilename))
+ fprintf (stderr,
+ _("Failed to parse configuration file `%s'\n"),
+ cfgFilename);
dirname = GNUNET_get_installation_path (GNUNET_IPK_DATADIR);
GNUNET_GE_ASSERT (ectx, dirname != NULL);
Modified: GNUnet/src/util/network/selecttest.c
===================================================================
--- GNUnet/src/util/network/selecttest.c 2009-11-20 07:44:20 UTC (rev
9587)
+++ GNUnet/src/util/network/selecttest.c 2009-11-20 16:24:22 UTC (rev
9588)
@@ -204,7 +204,7 @@
128 /* socket quota */ );
write_sock = SOCKET (PF_INET, SOCK_STREAM, 6);
-
+ GNUNET_assert (-1 != write_sock);
memset (&serverAddr, 0, sizeof (serverAddr));
serverAddr.sin_family = AF_INET;
serverAddr.sin_addr.s_addr = htonl (INADDR_LOOPBACK);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r9588 - in GNUnet/src: applications/bootstrap_http applications/fs/ecrs applications/fs/tools applications/identity server setup util/network,
gnunet <=