aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-04 14:46:43 +0000
committerChristian Grothoff <christian@grothoff.org>2016-08-04 14:46:43 +0000
commit1176977e921d068c2367dd080b92e4e5e4e0ae24 (patch)
tree87ce2758c70835587e5b736041e4d3acd2b2a319 /src/core
parent2e5663d57acba21e81fd7c5eff0d5655d114f6e3 (diff)
downloadgnunet-1176977e921d068c2367dd080b92e4e5e4e0ae24.tar.gz
gnunet-1176977e921d068c2367dd080b92e4e5e4e0ae24.zip
-fix core mq cancel operation, need to use discard, not send_cancel as env was never send
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core_api_2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/core/core_api_2.c b/src/core/core_api_2.c
index 70dd1e0f0..536fe597c 100644
--- a/src/core/core_api_2.c
+++ b/src/core/core_api_2.c
@@ -53,13 +53,13 @@ struct PeerRecord
53 * for this peer (from @e mq). 53 * for this peer (from @e mq).
54 */ 54 */
55 struct GNUNET_MQ_Envelope *env; 55 struct GNUNET_MQ_Envelope *env;
56 56
57 /** 57 /**
58 * Value the client returned when we connected, used 58 * Value the client returned when we connected, used
59 * as the closure in various places. 59 * as the closure in various places.
60 */ 60 */
61 void *client_cls; 61 void *client_cls;
62 62
63 /** 63 /**
64 * Peer the record is about. 64 * Peer the record is about.
65 */ 65 */
@@ -261,7 +261,7 @@ handle_mq_error (void *cls,
261 * so that it is transmitted with the given @a priority and 261 * so that it is transmitted with the given @a priority and
262 * the given @a cork value. 262 * the given @a cork value.
263 * 263 *
264 * @param cork desired corking 264 * @param cork desired corking
265 * @param priority desired message priority 265 * @param priority desired message priority
266 * @param[out] flags set to `flags` value for #GNUNET_MQ_set_options() 266 * @param[out] flags set to `flags` value for #GNUNET_MQ_set_options()
267 * @return `extra` argument to give to #GNUNET_MQ_set_options() 267 * @return `extra` argument to give to #GNUNET_MQ_set_options()
@@ -381,7 +381,7 @@ core_mq_cancel_impl (struct GNUNET_MQ_Handle *mq,
381 struct PeerRecord *pr = impl_state; 381 struct PeerRecord *pr = impl_state;
382 382
383 GNUNET_assert (NULL != pr->env); 383 GNUNET_assert (NULL != pr->env);
384 GNUNET_MQ_send_cancel (pr->env); 384 GNUNET_MQ_discard (pr->env);
385 pr->env = NULL; 385 pr->env = NULL;
386} 386}
387 387
@@ -419,7 +419,7 @@ connect_peer (struct GNUNET_CORE_Handle *h,
419 struct PeerRecord *pr; 419 struct PeerRecord *pr;
420 uint64_t flags; 420 uint64_t flags;
421 const void *extra; 421 const void *extra;
422 422
423 pr = GNUNET_new (struct PeerRecord); 423 pr = GNUNET_new (struct PeerRecord);
424 pr->peer = *peer; 424 pr->peer = *peer;
425 pr->h = h; 425 pr->h = h;
@@ -595,7 +595,7 @@ check_notify_inbound (void *cls,
595{ 595{
596 uint16_t msize; 596 uint16_t msize;
597 const struct GNUNET_MessageHeader *em; 597 const struct GNUNET_MessageHeader *em;
598 598
599 msize = ntohs (ntm->header.size) - sizeof (struct NotifyTrafficMessage); 599 msize = ntohs (ntm->header.size) - sizeof (struct NotifyTrafficMessage);
600 if (msize < sizeof (struct GNUNET_MessageHeader)) 600 if (msize < sizeof (struct GNUNET_MessageHeader))
601 { 601 {
@@ -682,7 +682,7 @@ handle_send_ready (void *cls,
682 * ignore! (we should have already sent another request) */ 682 * ignore! (we should have already sent another request) */
683 return; 683 return;
684 } 684 }
685 685
686 /* ok, all good, send message out! */ 686 /* ok, all good, send message out! */
687 GNUNET_MQ_send (h->mq, 687 GNUNET_MQ_send (h->mq,
688 pr->env); 688 pr->env);
@@ -812,7 +812,7 @@ GNUNET_CORE_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg,
812 812
813 813
814/** 814/**
815 * Disconnect from the core service. 815 * Disconnect from the core service.
816 * 816 *
817 * @param handle connection to core to disconnect 817 * @param handle connection to core to disconnect
818 */ 818 */
@@ -853,7 +853,7 @@ GNUNET_CORE_get_mq (const struct GNUNET_CORE_Handle *h,
853 const struct GNUNET_PeerIdentity *pid) 853 const struct GNUNET_PeerIdentity *pid)
854{ 854{
855 struct PeerRecord *pr; 855 struct PeerRecord *pr;
856 856
857 pr = GNUNET_CONTAINER_multipeermap_get (h->peers, 857 pr = GNUNET_CONTAINER_multipeermap_get (h->peers,
858 pid); 858 pid);
859 if (NULL == pr) 859 if (NULL == pr)