[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6761 - in GNUnet/src/applications: chat testing
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6761 - in GNUnet/src/applications: chat testing |
Date: |
Fri, 25 Apr 2008 15:25:19 -0600 (MDT) |
Author: nevans
Date: 2008-04-25 15:25:18 -0600 (Fri, 25 Apr 2008)
New Revision: 6761
Modified:
GNUnet/src/applications/chat/chat.c
GNUnet/src/applications/testing/remote.c
GNUnet/src/applications/testing/remotetopologies.c
Log:
Modified: GNUnet/src/applications/chat/chat.c
===================================================================
--- GNUnet/src/applications/chat/chat.c 2008-04-25 16:01:28 UTC (rev 6760)
+++ GNUnet/src/applications/chat/chat.c 2008-04-25 21:25:18 UTC (rev 6761)
@@ -331,7 +331,7 @@
if (pos != NULL)
{
found = GNUNET_YES;
- nick_to_remove = GNUNET_malloc (strlen (pos->nick));
+ nick_to_remove = GNUNET_malloc (strlen (pos->nick) + 1);
strcpy (nick_to_remove, pos->nick);
if (prev == NULL)
client_list_head = pos->next;
Modified: GNUnet/src/applications/testing/remote.c
===================================================================
--- GNUnet/src/applications/testing/remote.c 2008-04-25 16:01:28 UTC (rev
6760)
+++ GNUnet/src/applications/testing/remote.c 2008-04-25 21:25:18 UTC (rev
6761)
@@ -139,13 +139,12 @@
if (ipk_dir == NULL)
{
ipk_dir = GNUNET_malloc (1);
- ipk_dir = "\0";
+ strcpy(ipk_dir,"\0");
}
length = snprintf (NULL, 0, "%s%s", ipk_dir, "gnunetd.conf.skel");
data_dir = GNUNET_malloc (length + 1);
snprintf (data_dir, length + 1, "%s%s", ipk_dir, "gnunetd.conf.skel");
- if (ipk_dir != NULL)
- GNUNET_free (ipk_dir);
+ GNUNET_free (ipk_dir);
GNUNET_GC_get_configuration_value_string (newcfg, "MULTIPLE_SERVER_TESTING",
"SSH_USERNAME", "",
&ssh_username);
@@ -277,12 +276,14 @@
GNUNET_GE_BULK, "mkstemp",
temp_path);
GNUNET_free (temp_path);
+ GNUNET_free (temp_remote_config_path);
break;
}
CLOSE (ret);
if (0 != GNUNET_GC_write_configuration (basecfg, temp_path))
{
GNUNET_free (temp_path);
+ GNUNET_free (temp_remote_config_path);
break;
}
@@ -291,10 +292,10 @@
{
temp_pos =
GNUNET_malloc (sizeof (struct GNUNET_REMOTE_host_list));
- temp_pos->hostname = GNUNET_malloc (strlen (curr_host));
+ temp_pos->hostname = GNUNET_malloc (strlen (curr_host)+1);
strcpy (temp_pos->hostname, curr_host);
- temp_pos->username = GNUNET_malloc (strlen (ssh_username));
+ temp_pos->username = GNUNET_malloc (strlen (ssh_username)+1);
strcpy (temp_pos->username, ssh_username);
friend_location_length =
Modified: GNUnet/src/applications/testing/remotetopologies.c
===================================================================
--- GNUnet/src/applications/testing/remotetopologies.c 2008-04-25 16:01:28 UTC
(rev 6760)
+++ GNUnet/src/applications/testing/remotetopologies.c 2008-04-25 21:25:18 UTC
(rev 6761)
@@ -354,10 +354,11 @@
sock2 = GNUNET_client_connection_create (NULL, cfg2);
ret = -20;
fprintf (stderr, _("Waiting for peers to connect"));
+ h1 = NULL;
+ h2 = NULL;
while ((ret++ < -1) && (GNUNET_shutdown_test () == GNUNET_NO))
{
- h1 = NULL;
- h2 = NULL;
+
if ((GNUNET_OK == GNUNET_IDENTITY_get_self (sock1,
&h1)) &&
(GNUNET_OK == GNUNET_IDENTITY_get_self (sock2,
@@ -372,8 +373,6 @@
senderIdentity))
{
ret = GNUNET_OK;
- GNUNET_free_non_null (h1);
- GNUNET_free_non_null (h2);
break;
}
if (GNUNET_YES == GNUNET_IDENTITY_request_connect (sock2,
@@ -381,19 +380,19 @@
senderIdentity))
{
ret = GNUNET_OK;
- GNUNET_free_non_null (h1);
- GNUNET_free_non_null (h2);
break;
}
GNUNET_thread_sleep (100 * GNUNET_CRON_MILLISECONDS);
}
- GNUNET_free_non_null (h1);
- GNUNET_free_non_null (h2);
+
}
GNUNET_hash_to_enc (&h1->senderIdentity.hashPubKey, host1entry);
GNUNET_hash_to_enc (&h2->senderIdentity.hashPubKey, host2entry);
+ GNUNET_free_non_null (h1);
+ GNUNET_free_non_null (h2);
+
if (ret != GNUNET_OK)
{
fprintf (stderr,
@@ -417,6 +416,8 @@
}
GNUNET_GC_free (cfg1);
GNUNET_GC_free (cfg2);
+ GNUNET_free (host1entry);
+ GNUNET_free (host2entry);
return ret;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6761 - in GNUnet/src/applications: chat testing,
gnunet <=