[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r7987 - GNUnet/src/applications/dv/module
From: |
gnunet |
Subject: |
[GNUnet-SVN] r7987 - GNUnet/src/applications/dv/module |
Date: |
Wed, 3 Dec 2008 14:39:08 -0700 (MST) |
Author: nevans
Date: 2008-12-03 14:39:08 -0700 (Wed, 03 Dec 2008)
New Revision: 7987
Modified:
GNUnet/src/applications/dv/module/dv.c
Log:
backup before change
Modified: GNUnet/src/applications/dv/module/dv.c
===================================================================
--- GNUnet/src/applications/dv/module/dv.c 2008-12-03 21:34:47 UTC (rev
7986)
+++ GNUnet/src/applications/dv/module/dv.c 2008-12-03 21:39:08 UTC (rev
7987)
@@ -253,6 +253,7 @@
struct GNUNET_dv_neighbor *about = NULL;
struct GNUNET_dv_neighbor *to = NULL;
+
p2p_dv_MESSAGE_NeighborInfo *message =
GNUNET_malloc(sizeof(p2p_dv_MESSAGE_NeighborInfo));
message->header.size = htons (sizeof(p2p_dv_MESSAGE_NeighborInfo));
@@ -265,23 +266,13 @@
about = chooseAboutNeighbor();
to = chooseToNeighbor();
- if (message->neighbor != NULL)
- {
- GNUNET_free(message->neighbor);
- }
- message->neighbor = GNUNET_malloc(sizeof(GNUNET_PeerIdentity));
message->cost = htonl(about->cost);
memcpy(&message->neighbor,&about->neighbor,sizeof(GNUNET_PeerIdentity));
- coreAPI->ciphertext_send(to->neighbor,&message,0,send_interval
* GNUNET_CRON_MILLISECONDS);
+
coreAPI->ciphertext_send(to->neighbor,&message->header,0,send_interval *
GNUNET_CRON_MILLISECONDS);
GNUNET_thread_sleep (send_interval * GNUNET_CRON_MILLISECONDS);
}
- if (message->neighbor != NULL)
- {
- GNUNET_free(message->neighbor);
- }
-
GNUNET_free(message);
return NULL;
@@ -290,13 +281,13 @@
struct GNUNET_dv_neighbor *
chooseToNeighbor()
{
-
+ return NULL;
}
struct GNUNET_dv_neighbor *
chooseAboutNeighbor()
{
-
+ return NULL;
}
int
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r7987 - GNUnet/src/applications/dv/module,
gnunet <=