aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_api_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet/cadet_api_new.c')
-rw-r--r--src/cadet/cadet_api_new.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/cadet/cadet_api_new.c b/src/cadet/cadet_api_new.c
index 81bfe1f6f..a62de0a47 100644
--- a/src/cadet/cadet_api_new.c
+++ b/src/cadet/cadet_api_new.c
@@ -442,22 +442,6 @@ notify_window_size (struct GNUNET_CADET_Channel *ch)
442 442
443 443
444/** 444/**
445 * Allow the MQ implementation to send the next message.
446 *
447 * @param cls Closure (channel whose mq to activate).
448 */
449static void
450cadet_mq_send_continue (void *cls)
451{
452 struct GNUNET_CADET_Channel *ch = cls;
453
454 ch->mq_cont = NULL;
455 GNUNET_assert (NULL == ch->pending_env);
456 GNUNET_MQ_impl_send_continue (ch->mq);
457}
458
459
460/**
461 * Transmit the next message from our queue. 445 * Transmit the next message from our queue.
462 * 446 *
463 * @param cls Closure (channel whose mq to activate). 447 * @param cls Closure (channel whose mq to activate).
@@ -482,13 +466,10 @@ cadet_mq_send_now (void *cls)
482 return; 466 return;
483 } 467 }
484 ch->allow_send--; 468 ch->allow_send--;
485 GNUNET_MQ_impl_send_in_flight (ch->mq);
486 ch->pending_env = NULL; 469 ch->pending_env = NULL;
487 GNUNET_MQ_notify_sent (env,
488 &cadet_mq_send_continue,
489 ch);
490 GNUNET_MQ_send (ch->cadet->mq, 470 GNUNET_MQ_send (ch->cadet->mq,
491 env); 471 env);
472 GNUNET_MQ_impl_send_continue (ch->mq);
492} 473}
493 474
494 475
@@ -604,6 +585,11 @@ cadet_mq_cancel_impl (struct GNUNET_MQ_Handle *mq,
604 GNUNET_assert (NULL != ch->pending_env); 585 GNUNET_assert (NULL != ch->pending_env);
605 GNUNET_MQ_discard (ch->pending_env); 586 GNUNET_MQ_discard (ch->pending_env);
606 ch->pending_env = NULL; 587 ch->pending_env = NULL;
588 if (NULL != ch->mq_cont)
589 {
590 GNUNET_SCHEDULER_cancel (ch->mq_cont);
591 ch->mq_cont = NULL;
592 }
607} 593}
608 594
609 595