[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 17/64: logging, cosmetic fixes
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 17/64: logging, cosmetic fixes |
Date: |
Sat, 30 Dec 2017 20:58:02 +0100 |
This is an automated email from the git hooks/post-receive script.
lurchi pushed a commit to branch master
in repository gnunet.
commit ca78392674d82d97832798f933b9c75f4e0af367
Author: Christian Grothoff <address@hidden>
AuthorDate: Sun Oct 29 11:27:32 2017 +0100
logging, cosmetic fixes
---
src/social/gnunet-service-social.c | 34 +++++++++++++++++-----------------
src/social/social_api.c | 3 +++
src/social/test_social.conf | 3 +++
3 files changed, 23 insertions(+), 17 deletions(-)
diff --git a/src/social/gnunet-service-social.c
b/src/social/gnunet-service-social.c
index f9e70a25d..04bbba192 100644
--- a/src/social/gnunet-service-social.c
+++ b/src/social/gnunet-service-social.c
@@ -570,7 +570,6 @@ client_notify_disconnect (void *cls,
if (NULL != c->app_id)
GNUNET_free (c->app_id);
-
GNUNET_free (c);
if (NULL == plc)
@@ -586,7 +585,9 @@ client_notify_disconnect (void *cls,
{
if (cli->client == client)
{
- GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli);
+ GNUNET_CONTAINER_DLL_remove (plc->clients_head,
+ plc->clients_tail,
+ cli);
GNUNET_free (cli);
break;
}
@@ -608,11 +609,13 @@ client_notify_connect (void *cls,
struct GNUNET_SERVICE_Client *client,
struct GNUNET_MQ_Handle *mq)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Client connected: %p\n", client);
+ struct Client *c = GNUNET_new (struct Client);
- struct Client *c = GNUNET_malloc (sizeof (*c));
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Client %p connected with queue %p\n",
+ client,
+ mq);
c->client = client;
-
return c;
}
@@ -2204,7 +2207,7 @@ handle_client_app_detach (void *cls,
}
-int
+static int
app_places_entry_remove (void *cls, const struct GNUNET_HashCode *key, void
*value)
{
struct Place *plc = cls;
@@ -2247,15 +2250,14 @@ handle_client_place_leave (void *cls,
/* FIXME: disconnect from the network, but keep local connection for history
access */
/* Disconnect all clients connected to the place */
- struct ClientListItem *cli = plc->clients_head, *next;
- while (NULL != cli)
+
+ for (struct ClientListItem *cli = plc->clients_head;
+ NULL != cli;
+ cli = cli->next)
{
- GNUNET_CONTAINER_DLL_remove (plc->clients_head, plc->clients_tail, cli);
// protocol design failure: should *tell* clients that room is gone!
- GNUNET_SERVICE_client_drop (cli->client);
- next = cli->next;
- GNUNET_free (cli);
- cli = next;
+ if (client != cli->client)
+ GNUNET_SERVICE_client_drop (cli->client);
}
if (GNUNET_YES != plc->is_disconnected)
@@ -2268,10 +2270,11 @@ handle_client_place_leave (void *cls,
else
{
cleanup_place (plc);
+ c->place = NULL;
}
}
// FIXME: can't continue+drop above, but should not drop above!
- // GNUNET_SERVICE_client_continue (client);
+ GNUNET_SERVICE_client_continue (client);
}
@@ -2989,7 +2992,6 @@ handle_client_psyc_message (void *cls,
"%p Received message with invalid payload size (%u) from
client.\n",
plc, psize);
GNUNET_break (0);
- psyc_transmit_cancel (plc, client);
GNUNET_SERVICE_client_drop (client);
return;
}
@@ -3003,7 +3005,6 @@ handle_client_psyc_message (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%p Received invalid message part from client.\n", plc);
GNUNET_break (0);
- psyc_transmit_cancel (plc, client);
GNUNET_SERVICE_client_drop (client);
return;
}
@@ -3029,7 +3030,6 @@ handle_client_psyc_message (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"%p Received invalid message part from client.\n", plc);
GNUNET_break (0);
- psyc_transmit_cancel (plc, client);
ret = GNUNET_SYSERR;
}
diff --git a/src/social/social_api.c b/src/social/social_api.c
index fc649fcde..1db8e501a 100644
--- a/src/social/social_api.c
+++ b/src/social/social_api.c
@@ -1044,6 +1044,7 @@ static void
place_cleanup (struct GNUNET_SOCIAL_Place *plc)
{
struct GNUNET_HashCode place_pub_hash;
+
GNUNET_CRYPTO_hash (&plc->pub_key, sizeof (plc->pub_key), &place_pub_hash);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"%s place cleanup: %s\n",
@@ -2092,6 +2093,8 @@ leave_done_cont (void *cls)
{
struct LeaveContext *lc = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "social_api: guest's place_leave message sent!\n");
GNUNET_SOCIAL_guest_disconnect (lc->gst,
lc->disconnect_cb,
lc->disconnect_cb_cls);
diff --git a/src/social/test_social.conf b/src/social/test_social.conf
index 52ed20c6b..a11144b60 100644
--- a/src/social/test_social.conf
+++ b/src/social/test_social.conf
@@ -3,3 +3,6 @@
[social]
AUTOSTART = YES
FORCESTART = YES
+
+[transport]
+PLUGINS = udp
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] branch master updated (d01f1bd83 -> 5c8feda7f), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 02/64: start social service before running the test (not sure if needed), gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 06/64: Merge branch 'fix_social' of ssh://gnunet.org/gnunet into fix_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 07/64: added mq logging, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 01/64: trying to fix test_social and social service with a lot of debug outputs, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 05/64: we were on the wood way, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 03/64: don't call GNUNET_SERVICE_client_continue twice; maybe fix bug resulting from destroying MQ too early, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 04/64: -we no enter to place, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 13/64: clarify use of client_drop, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 17/64: logging, cosmetic fixes,
gnunet <=
- [GNUnet-SVN] [gnunet] 09/64: misc social hacking with Lurchi, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 18/64: minor style fix, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 10/64: added logging, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 14/64: handle service disconnect without crashing if reconnect fails, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 15/64: better logging of message processing errors in mq handling, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 08/64: added logging, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 16/64: do handle CTRL-C properly in test_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 12/64: fix wrong condition, do only drop if it has not been dropped, instead of causing double-drop, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 11/64: Merge branch 'fix_social' of gnunet.org:gnunet into fix_social, gnunet, 2017/12/30
- [GNUnet-SVN] [gnunet] 20/64: Fix tcp on exit crash -- could have sworn I fixed this one before, gnunet, 2017/12/30