diff options
author | lurchi <lurchi@strangeplace.net> | 2017-11-08 19:19:29 +0100 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-11-08 19:19:29 +0100 |
commit | c9e414861225f5ac84971845015a67c6bd959153 (patch) | |
tree | c18de76be18dc4c66c0f39c3430d1dad8aaf284a /src/social/gnunet-service-social.c | |
parent | 7c1ce9a71e362727509f013900a50ba5879ca8b2 (diff) | |
download | gnunet-c9e414861225f5ac84971845015a67c6bd959153.tar.gz gnunet-c9e414861225f5ac84971845015a67c6bd959153.zip |
protocol change: add ack message for guests/hosts leaving a place
Diffstat (limited to 'src/social/gnunet-service-social.c')
-rw-r--r-- | src/social/gnunet-service-social.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/social/gnunet-service-social.c b/src/social/gnunet-service-social.c index 04bbba192..609cdab06 100644 --- a/src/social/gnunet-service-social.c +++ b/src/social/gnunet-service-social.c | |||
@@ -2227,6 +2227,8 @@ handle_client_place_leave (void *cls, | |||
2227 | struct Client *c = cls; | 2227 | struct Client *c = cls; |
2228 | struct GNUNET_SERVICE_Client *client = c->client; | 2228 | struct GNUNET_SERVICE_Client *client = c->client; |
2229 | struct Place *plc = c->place; | 2229 | struct Place *plc = c->place; |
2230 | struct GNUNET_MQ_Envelope *env; | ||
2231 | struct GNUNET_MessageHeader *ack_msg; | ||
2230 | 2232 | ||
2231 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, | 2233 | GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE, |
2232 | "handle_client_place_leave\n"); | 2234 | "handle_client_place_leave\n"); |
@@ -2255,9 +2257,10 @@ handle_client_place_leave (void *cls, | |||
2255 | NULL != cli; | 2257 | NULL != cli; |
2256 | cli = cli->next) | 2258 | cli = cli->next) |
2257 | { | 2259 | { |
2258 | // protocol design failure: should *tell* clients that room is gone! | 2260 | env = GNUNET_MQ_msg (ack_msg, |
2259 | if (client != cli->client) | 2261 | GNUNET_MESSAGE_TYPE_SOCIAL_PLACE_LEAVE_ACK); |
2260 | GNUNET_SERVICE_client_drop (cli->client); | 2262 | GNUNET_MQ_send (GNUNET_SERVICE_client_get_mq (cli->client), |
2263 | env); | ||
2261 | } | 2264 | } |
2262 | 2265 | ||
2263 | if (GNUNET_YES != plc->is_disconnected) | 2266 | if (GNUNET_YES != plc->is_disconnected) |