aboutsummaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-02-21 17:47:06 +0100
committerChristian Grothoff <christian@grothoff.org>2017-02-21 17:47:06 +0100
commit89e606364e4ccb77d6e6d8b0b7518c1749d90243 (patch)
treeecffa55e6b6b92a49748f5c0304a1c83775be350 /src/cadet
parent3767578e9ea875431d77b7cbc3ea3afb2dde1083 (diff)
downloadgnunet-89e606364e4ccb77d6e6d8b0b7518c1749d90243.tar.gz
gnunet-89e606364e4ccb77d6e6d8b0b7518c1749d90243.zip
change Makefile.am back so it builds at least; fix #4908 in cadet API
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/Makefile.am4
-rw-r--r--src/cadet/cadet_api_new.c26
2 files changed, 8 insertions, 22 deletions
diff --git a/src/cadet/Makefile.am b/src/cadet/Makefile.am
index 6f38c6a94..74791d66e 100644
--- a/src/cadet/Makefile.am
+++ b/src/cadet/Makefile.am
@@ -149,12 +149,12 @@ ld_cadet_test_lib = \
149 $(top_builddir)/src/util/libgnunetutil.la \ 149 $(top_builddir)/src/util/libgnunetutil.la \
150 $(top_builddir)/src/testing/libgnunettesting.la \ 150 $(top_builddir)/src/testing/libgnunettesting.la \
151 libgnunetcadettest.a \ 151 libgnunetcadettest.a \
152 libgnunetcadetnew.la \ 152 libgnunetcadet.la \
153 $(top_builddir)/src/testbed/libgnunettestbed.la \ 153 $(top_builddir)/src/testbed/libgnunettestbed.la \
154 $(top_builddir)/src/statistics/libgnunetstatistics.la 154 $(top_builddir)/src/statistics/libgnunetstatistics.la
155 155
156dep_cadet_test_lib = \ 156dep_cadet_test_lib = \
157 libgnunetcadetnew.la \ 157 libgnunetcadet.la \
158 libgnunetcadettest.a \ 158 libgnunetcadettest.a \
159 $(top_builddir)/src/statistics/libgnunetstatistics.la 159 $(top_builddir)/src/statistics/libgnunetstatistics.la
160 160
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