[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35338 - in gnunet/src: transport util
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35338 - in gnunet/src: transport util |
Date: |
Mon, 2 Mar 2015 21:04:56 +0100 |
Author: grothoff
Date: 2015-03-02 21:04:56 +0100 (Mon, 02 Mar 2015)
New Revision: 35338
Modified:
gnunet/src/transport/plugin_transport_tcp.c
gnunet/src/util/server.c
Log:
finally fix #3698
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2015-03-02 18:32:11 UTC (rev
35337)
+++ gnunet/src/transport/plugin_transport_tcp.c 2015-03-02 20:04:56 UTC (rev
35338)
@@ -2545,6 +2545,8 @@
{
struct Plugin *plugin = cls;
+ if (NULL == client)
+ return;
plugin->cur_connections++;
GNUNET_STATISTICS_set (plugin->env->stats,
gettext_noop ("# TCP server connections active"),
@@ -2583,7 +2585,10 @@
if (NULL == client)
return;
- session = lookup_session_by_client (plugin, client);
+ GNUNET_assert (plugin->cur_connections >= 1);
+ plugin->cur_connections--;
+ session = lookup_session_by_client (plugin,
+ client);
if (NULL == session)
return; /* unknown, nothing to do */
LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -2601,8 +2606,6 @@
GNUNET_NO);
GNUNET_SERVER_resume (plugin->server); /* Resume server */
}
- GNUNET_assert (plugin->cur_connections >= 1);
- plugin->cur_connections--;
GNUNET_STATISTICS_set (plugin->env->stats,
gettext_noop ("# TCP server connections active"),
plugin->cur_connections,
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2015-03-02 18:32:11 UTC (rev 35337)
+++ gnunet/src/util/server.c 2015-03-02 20:04:56 UTC (rev 35338)
@@ -813,7 +813,8 @@
}
while (NULL != (npos = server->disconnect_notify_list_head))
{
- npos->callback (npos->callback_cls, NULL);
+ npos->callback (npos->callback_cls,
+ NULL);
GNUNET_CONTAINER_DLL_remove (server->disconnect_notify_list_head,
server->disconnect_notify_list_tail,
npos);
@@ -821,7 +822,8 @@
}
while (NULL != (npos = server->connect_notify_list_head))
{
- npos->callback (npos->callback_cls, NULL);
+ npos->callback (npos->callback_cls,
+ NULL);
GNUNET_CONTAINER_DLL_remove (server->connect_notify_list_head,
server->connect_notify_list_tail,
npos);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35338 - in gnunet/src: transport util,
gnunet <=