aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/transport/tcp_server_legacy.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/transport/tcp_server_legacy.c b/src/transport/tcp_server_legacy.c
index 6b4daa525..d0ce790fc 100644
--- a/src/transport/tcp_server_legacy.c
+++ b/src/transport/tcp_server_legacy.c
@@ -1477,23 +1477,6 @@ GNUNET_SERVER_connect_notify_cancel (struct GNUNET_SERVER_Handle *server,
1477 1477
1478 1478
1479/** 1479/**
1480 * Destroy the connection that is passed in via @a cls. Used
1481 * as calling #GNUNET_CONNECTION_destroy from within a function
1482 * that was itself called from within process_notify() of
1483 * 'connection.c' is not allowed (see #2329).
1484 *
1485 * @param cls connection to destroy
1486 */
1487static void
1488destroy_connection (void *cls)
1489{
1490 struct GNUNET_CONNECTION_Handle *connection = cls;
1491
1492 GNUNET_CONNECTION_destroy (connection);
1493}
1494
1495
1496/**
1497 * Ask the server to disconnect from the given client. 1480 * Ask the server to disconnect from the given client.
1498 * This is the same as returning #GNUNET_SYSERR from a message 1481 * This is the same as returning #GNUNET_SYSERR from a message
1499 * handler, except that it allows dropping of a client even 1482 * handler, except that it allows dropping of a client even
@@ -1565,8 +1548,7 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client)
1565 GNUNET_CONNECTION_persist_ (client->connection); 1548 GNUNET_CONNECTION_persist_ (client->connection);
1566 if (NULL != client->th.cth) 1549 if (NULL != client->th.cth)
1567 GNUNET_SERVER_notify_transmit_ready_cancel (&client->th); 1550 GNUNET_SERVER_notify_transmit_ready_cancel (&client->th);
1568 (void) GNUNET_SCHEDULER_add_now (&destroy_connection, 1551 GNUNET_CONNECTION_destroy (client->connection);
1569 client->connection);
1570 /* need to cancel again, as it might have been re-added 1552 /* need to cancel again, as it might have been re-added
1571 in the meantime (i.e. during callbacks) */ 1553 in the meantime (i.e. during callbacks) */
1572 if (NULL != client->warn_task) 1554 if (NULL != client->warn_task)