[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r10720 - gnunet/src/dv
From: |
gnunet |
Subject: |
[GNUnet-SVN] r10720 - gnunet/src/dv |
Date: |
Tue, 30 Mar 2010 18:18:31 +0200 |
Author: nevans
Date: 2010-03-30 18:18:31 +0200 (Tue, 30 Mar 2010)
New Revision: 10720
Modified:
gnunet/src/dv/gnunet-service-dv.c
Log:
small changes
Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c 2010-03-30 16:17:11 UTC (rev 10719)
+++ gnunet/src/dv/gnunet-service-dv.c 2010-03-30 16:18:31 UTC (rev 10720)
@@ -51,12 +51,12 @@
/**
* The identity of our peer.
*/
-struct GNUNET_PeerIdentity my_identity;
+static struct GNUNET_PeerIdentity my_identity;
/**
* The configuration for this service.
*/
-const struct GNUNET_CONFIGURATION_Handle *cfg;
+static const struct GNUNET_CONFIGURATION_Handle *cfg;
/**
* The scheduler for this service.
@@ -444,18 +444,19 @@
size_t size, void *buf)
{
struct PendingMessage *pending_message = cls;
- char *send_buf = buf;
- if ((buf == NULL) || (size < pending_message->msg_size))
+ size_t ssize;
+
+ if (buf == NULL)
{
+ /* FIXME: error handling: try again? free pending_message? */
return 0;
}
-
- memcpy(send_buf, pending_message->msg, pending_message->msg_size);
-
+ ssize = pending_message->msg_size;
+ GNUNET_assert(size >= ssize);
+ memcpy(buf, pending_message->msg, ssize);
GNUNET_free(pending_message->msg);
GNUNET_free(pending_message);
-
- return size;
+ return ssize;
}
/**
@@ -841,7 +842,6 @@
shutdown_task (void *cls,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
-
GNUNET_CORE_disconnect (coreAPI);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r10720 - gnunet/src/dv,
gnunet <=