diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-04 15:19:05 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-04 15:19:05 +0200 |
commit | 664aca2d29b15dd75967d2bb0298caf750993b6f (patch) | |
tree | f54f8f7a45c2bb3169b4a8344ee1fc895dc80e47 /src/transport/tcp_server_legacy.c | |
parent | 2c50cc88764a2f05e320bc36c1e149d79fbf67a4 (diff) | |
download | gnunet-664aca2d29b15dd75967d2bb0298caf750993b6f.tar.gz gnunet-664aca2d29b15dd75967d2bb0298caf750993b6f.zip |
fix transport crash from util-legacy-server refactoring of tcp plugin
Diffstat (limited to 'src/transport/tcp_server_legacy.c')
-rw-r--r-- | src/transport/tcp_server_legacy.c | 20 |
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 | */ | ||
1487 | static void | ||
1488 | destroy_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) |