[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13756 - gnunet/src/core
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13756 - gnunet/src/core |
Date: |
Sat, 20 Nov 2010 16:28:33 +0100 |
Author: grothoff
Date: 2010-11-20 16:28:33 +0100 (Sat, 20 Nov 2010)
New Revision: 13756
Modified:
gnunet/src/core/core_api.c
Log:
possible fix
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2010-11-20 15:21:31 UTC (rev 13755)
+++ gnunet/src/core/core_api.c 2010-11-20 15:28:33 UTC (rev 13756)
@@ -468,8 +468,11 @@
{
GNUNET_CONTAINER_DLL_remove (h->pending_head,
h->pending_tail,
- cm);
- cm->cont (cm->cont_cls, NULL);
+ cm);
+ if (cm->th != NULL)
+ cm->th->cm = NULL;
+ if (cm->cont != NULL)
+ cm->cont (cm->cont_cls, NULL);
GNUNET_free (cm);
}
if (h->client != NULL)
@@ -517,22 +520,6 @@
/**
- * Control message was sent, mark it as such.
- *
- * @param cls the 'struct GNUNET_CORE_TransmitHandle*'
- * @param tc scheduler context
- */
-static void
-mark_control_message_sent (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc)
-{
- struct GNUNET_CORE_TransmitHandle *th = cls;
-
- th->cm = NULL;
-}
-
-
-/**
* Send a control message to the peer asking for transmission
* of the message in the given peer record.
*
@@ -563,8 +550,6 @@
pr);
cm = GNUNET_malloc (sizeof (struct ControlMessage) +
sizeof (struct SendMessageRequest));
- cm->cont = &mark_control_message_sent;
- cm->cont_cls = th;
th->cm = cm;
cm->th = th;
smr = (struct SendMessageRequest*) &cm[1];
@@ -1415,7 +1400,8 @@
cm);
if (cm->th != NULL)
cm->th->cm = NULL;
- cm->cont (cm->cont_cls, NULL);
+ if (cm->cont != NULL)
+ cm->cont (cm->cont_cls, NULL);
GNUNET_free (cm);
}
GNUNET_CONTAINER_multihashmap_iterate (handle->peers,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13756 - gnunet/src/core,
gnunet <=