diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-02-21 17:47:06 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-02-21 17:47:06 +0100 |
commit | 89e606364e4ccb77d6e6d8b0b7518c1749d90243 (patch) | |
tree | ecffa55e6b6b92a49748f5c0304a1c83775be350 | |
parent | 3767578e9ea875431d77b7cbc3ea3afb2dde1083 (diff) | |
download | gnunet-89e606364e4ccb77d6e6d8b0b7518c1749d90243.tar.gz gnunet-89e606364e4ccb77d6e6d8b0b7518c1749d90243.zip |
change Makefile.am back so it builds at least; fix #4908 in cadet API
-rw-r--r-- | src/cadet/Makefile.am | 4 | ||||
-rw-r--r-- | src/cadet/cadet_api_new.c | 26 | ||||
-rw-r--r-- | src/include/gnunet_mq_lib.h | 2 |
3 files changed, 9 insertions, 23 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 | ||
156 | dep_cadet_test_lib = \ | 156 | dep_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 | */ | ||
449 | static void | ||
450 | cadet_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 | ||
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h index a50a59c49..f9ad6c913 100644 --- a/src/include/gnunet_mq_lib.h +++ b/src/include/gnunet_mq_lib.h | |||
@@ -777,7 +777,7 @@ GNUNET_MQ_impl_send_continue (struct GNUNET_MQ_Handle *mq); | |||
777 | * try to send the next message until #gnunet_mq_impl_send_continue | 777 | * try to send the next message until #gnunet_mq_impl_send_continue |
778 | * is called. | 778 | * is called. |
779 | * | 779 | * |
780 | * only useful for implementing message queues, results in undefined | 780 | * Only useful for implementing message queues, results in undefined |
781 | * behavior if not used carefully. | 781 | * behavior if not used carefully. |
782 | * | 782 | * |
783 | * @param mq message queue to send the next message with | 783 | * @param mq message queue to send the next message with |