diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-07 08:20:56 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-07 08:20:56 +0000 |
commit | 639e6fda1cc136d62673bcccb8c1bd2a0823299f (patch) | |
tree | 2f79ebc373c0f2976de45514c3b2e1806da9e00c /src/transport/plugin_transport_http.c | |
parent | fb40065c4ef973b7fee53473c1a383007a0abf50 (diff) | |
download | gnunet-639e6fda1cc136d62673bcccb8c1bd2a0823299f.tar.gz gnunet-639e6fda1cc136d62673bcccb8c1bd2a0823299f.zip |
mem corruption
Diffstat (limited to 'src/transport/plugin_transport_http.c')
-rw-r--r-- | src/transport/plugin_transport_http.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index d3d1c7928..656f49c06 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -1272,7 +1272,6 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
1272 | s = plugin->head; | 1272 | s = plugin->head; |
1273 | while (s != NULL) | 1273 | while (s != NULL) |
1274 | { | 1274 | { |
1275 | struct Session *t = s->next; | ||
1276 | #if DEBUG_HTTP | 1275 | #if DEBUG_HTTP |
1277 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 1276 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
1278 | "Disconnecting `%s' \n", GNUNET_i2s (&s->target)); | 1277 | "Disconnecting `%s' \n", GNUNET_i2s (&s->target)); |
@@ -1281,10 +1280,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
1281 | GNUNET_assert (GNUNET_OK == client_disconnect (s)); | 1280 | GNUNET_assert (GNUNET_OK == client_disconnect (s)); |
1282 | else | 1281 | else |
1283 | GNUNET_assert (GNUNET_OK == server_disconnect (s)); | 1282 | GNUNET_assert (GNUNET_OK == server_disconnect (s)); |
1284 | 1283 | s = s->next; | |
1285 | GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); | ||
1286 | delete_session (s); | ||
1287 | s = t; | ||
1288 | } | 1284 | } |
1289 | 1285 | ||
1290 | #if DEBUG_HTTP | 1286 | #if DEBUG_HTTP |
@@ -1301,6 +1297,16 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls) | |||
1301 | /* Stop client */ | 1297 | /* Stop client */ |
1302 | client_stop (plugin); | 1298 | client_stop (plugin); |
1303 | 1299 | ||
1300 | /* deleting up sessions */ | ||
1301 | s = plugin->head; | ||
1302 | while (s != NULL) | ||
1303 | { | ||
1304 | struct Session *t = s->next; | ||
1305 | GNUNET_CONTAINER_DLL_remove (plugin->head, plugin->tail, s); | ||
1306 | delete_session (s); | ||
1307 | s = t; | ||
1308 | } | ||
1309 | |||
1304 | 1310 | ||
1305 | #if DEBUG_HTTP | 1311 | #if DEBUG_HTTP |
1306 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 1312 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |