diff options
author | lurchi <lurchi@strangeplace.net> | 2017-12-24 13:08:05 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-12-24 13:08:05 +0100 |
commit | 28c941178588fbf349e24a9ebf2dfe36aec2eded (patch) | |
tree | 714891e4b0b873a7445808b9438923af24b4b9f3 /src/psyc | |
parent | 2668ec4f848f5348c0876fe8dd7db97b9b71b045 (diff) | |
download | gnunet-28c941178588fbf349e24a9ebf2dfe36aec2eded.tar.gz gnunet-28c941178588fbf349e24a9ebf2dfe36aec2eded.zip |
forgot to call GNUNET_SERVICE_client_continue
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/gnunet-service-psyc.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 5397793c3..35cc5551d 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c | |||
@@ -603,20 +603,19 @@ client_notify_disconnect (void *cls, | |||
603 | if (NULL == chn) | 603 | if (NULL == chn) |
604 | { | 604 | { |
605 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 605 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
606 | "%p User context is NULL in client_disconnect()\n", | 606 | "%p User context is NULL in client_notify_disconnect ()\n", |
607 | chn); | 607 | chn); |
608 | GNUNET_break (0); | 608 | GNUNET_break (0); |
609 | return; | 609 | return; |
610 | } | 610 | } |
611 | 611 | ||
612 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 612 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
613 | "%p Client (%s) disconnected from channel %s\n", | 613 | "%p Client %p (%s) disconnected from channel %s\n", |
614 | chn, | 614 | chn, |
615 | client, | ||
615 | (GNUNET_YES == chn->is_master) ? "master" : "slave", | 616 | (GNUNET_YES == chn->is_master) ? "master" : "slave", |
616 | GNUNET_h2s (&chn->pub_key_hash)); | 617 | GNUNET_h2s (&chn->pub_key_hash)); |
617 | 618 | ||
618 | // FIXME (due to protocol change): here we must not remove all clients, | ||
619 | // only the one we were notified about! | ||
620 | struct ClientList *cli = chn->clients_head; | 619 | struct ClientList *cli = chn->clients_head; |
621 | while (NULL != cli) | 620 | while (NULL != cli) |
622 | { | 621 | { |
@@ -649,14 +648,6 @@ client_notify_disconnect (void *cls, | |||
649 | GNUNET_h2s (&chn->pub_key_hash)); | 648 | GNUNET_h2s (&chn->pub_key_hash)); |
650 | chn->is_disconnected = GNUNET_YES; | 649 | chn->is_disconnected = GNUNET_YES; |
651 | cleanup_channel (chn); | 650 | cleanup_channel (chn); |
652 | //if (NULL != chn->tmit_head) | ||
653 | //{ /* Send pending messages to multicast before cleanup. */ | ||
654 | // transmit_message (chn); | ||
655 | //} | ||
656 | //else | ||
657 | //{ | ||
658 | // cleanup_channel (chn); | ||
659 | //} | ||
660 | } | 651 | } |
661 | } | 652 | } |
662 | 653 | ||
@@ -691,7 +682,7 @@ client_send_msg (const struct Channel *chn, | |||
691 | const struct GNUNET_MessageHeader *msg) | 682 | const struct GNUNET_MessageHeader *msg) |
692 | { | 683 | { |
693 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 684 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
694 | "%p Sending message to clients.\n", | 685 | "Sending message to clients of channel %p.\n", |
695 | chn); | 686 | chn); |
696 | 687 | ||
697 | struct ClientList *cli = chn->clients_head; | 688 | struct ClientList *cli = chn->clients_head; |
@@ -702,7 +693,6 @@ client_send_msg (const struct Channel *chn, | |||
702 | 693 | ||
703 | GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cli->client), | 694 | GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cli->client), |
704 | env); | 695 | env); |
705 | |||
706 | cli = cli->next; | 696 | cli = cli->next; |
707 | } | 697 | } |
708 | } | 698 | } |
@@ -737,7 +727,7 @@ client_send_result (struct GNUNET_SERVICE_Client *client, uint64_t op_id, | |||
737 | GNUNET_memcpy (&res[1], data, data_size); | 727 | GNUNET_memcpy (&res[1], data, data_size); |
738 | 728 | ||
739 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 729 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
740 | "%p Sending result to client for operation #%" PRIu64 ": %" PRId64 " (size: %u)\n", | 730 | "%p Sending result to client for OP ID %" PRIu64 ": %" PRId64 " (size: %u)\n", |
741 | client, | 731 | client, |
742 | GNUNET_ntohll (op_id), | 732 | GNUNET_ntohll (op_id), |
743 | result_code, | 733 | result_code, |
@@ -1834,6 +1824,9 @@ handle_client_slave_join (void *cls, | |||
1834 | struct GNUNET_CRYPTO_EcdsaPublicKey slv_pub_key; | 1824 | struct GNUNET_CRYPTO_EcdsaPublicKey slv_pub_key; |
1835 | struct GNUNET_HashCode pub_key_hash, slv_pub_hash; | 1825 | struct GNUNET_HashCode pub_key_hash, slv_pub_hash; |
1836 | 1826 | ||
1827 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
1828 | "got join request from client %p\n", | ||
1829 | client); | ||
1837 | GNUNET_CRYPTO_ecdsa_key_get_public (&req->slave_key, &slv_pub_key); | 1830 | GNUNET_CRYPTO_ecdsa_key_get_public (&req->slave_key, &slv_pub_key); |
1838 | GNUNET_CRYPTO_hash (&slv_pub_key, sizeof (slv_pub_key), &slv_pub_hash); | 1831 | GNUNET_CRYPTO_hash (&slv_pub_key, sizeof (slv_pub_key), &slv_pub_hash); |
1839 | GNUNET_CRYPTO_hash (&req->channel_pub_key, sizeof (req->channel_pub_key), &pub_key_hash); | 1832 | GNUNET_CRYPTO_hash (&req->channel_pub_key, sizeof (req->channel_pub_key), &pub_key_hash); |
@@ -2061,7 +2054,10 @@ handle_client_part_request (void *cls, | |||
2061 | if (GNUNET_YES == c->channel->is_master) | 2054 | if (GNUNET_YES == c->channel->is_master) |
2062 | { | 2055 | { |
2063 | struct Master *mst = (struct Master *) c->channel; | 2056 | struct Master *mst = (struct Master *) c->channel; |
2064 | 2057 | ||
2058 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2059 | "Got part request from master %p\n", | ||
2060 | mst); | ||
2065 | GNUNET_assert (NULL != mst->origin); | 2061 | GNUNET_assert (NULL != mst->origin); |
2066 | GNUNET_MULTICAST_origin_stop (mst->origin, channel_part_cb, c->client); | 2062 | GNUNET_MULTICAST_origin_stop (mst->origin, channel_part_cb, c->client); |
2067 | mst->origin = NULL; | 2063 | mst->origin = NULL; |
@@ -2070,10 +2066,14 @@ handle_client_part_request (void *cls, | |||
2070 | { | 2066 | { |
2071 | struct Slave *slv = (struct Slave *) c->channel; | 2067 | struct Slave *slv = (struct Slave *) c->channel; |
2072 | 2068 | ||
2069 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
2070 | "Got part request from slave %p\n", | ||
2071 | slv); | ||
2073 | GNUNET_assert (NULL != slv->member); | 2072 | GNUNET_assert (NULL != slv->member); |
2074 | GNUNET_MULTICAST_member_part (slv->member, channel_part_cb, c->client); | 2073 | GNUNET_MULTICAST_member_part (slv->member, channel_part_cb, c->client); |
2075 | slv->member = NULL; | 2074 | slv->member = NULL; |
2076 | } | 2075 | } |
2076 | GNUNET_SERVICE_client_continue (c->client); | ||
2077 | } | 2077 | } |
2078 | 2078 | ||
2079 | 2079 | ||
@@ -2829,9 +2829,9 @@ run (void *cls, | |||
2829 | GNUNET_SERVICE_MAIN | 2829 | GNUNET_SERVICE_MAIN |
2830 | ("psyc", | 2830 | ("psyc", |
2831 | GNUNET_SERVICE_OPTION_NONE, | 2831 | GNUNET_SERVICE_OPTION_NONE, |
2832 | run, | 2832 | &run, |
2833 | client_notify_connect, | 2833 | &client_notify_connect, |
2834 | client_notify_disconnect, | 2834 | &client_notify_disconnect, |
2835 | NULL, | 2835 | NULL, |
2836 | GNUNET_MQ_hd_fixed_size (client_master_start, | 2836 | GNUNET_MQ_hd_fixed_size (client_master_start, |
2837 | GNUNET_MESSAGE_TYPE_PSYC_MASTER_START, | 2837 | GNUNET_MESSAGE_TYPE_PSYC_MASTER_START, |