aboutsummaryrefslogtreecommitdiff
path: root/src/examples/mhd2spdy_spdy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/mhd2spdy_spdy.c')
-rw-r--r--src/examples/mhd2spdy_spdy.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/examples/mhd2spdy_spdy.c b/src/examples/mhd2spdy_spdy.c
index 41c45317..e7464c6a 100644
--- a/src/examples/mhd2spdy_spdy.c
+++ b/src/examples/mhd2spdy_spdy.c
@@ -371,17 +371,15 @@ spdy_cb_on_stream_close(spdylay_session *session,
371 --glob_opt.streams_opened; 371 --glob_opt.streams_opened;
372 --proxy->spdy_connection->streams_opened; 372 --proxy->spdy_connection->streams_opened;
373 PRINT_INFO2("closing stream: str opened %i; remove proxy %i", glob_opt.streams_opened, proxy->id); 373 PRINT_INFO2("closing stream: str opened %i; remove proxy %i", glob_opt.streams_opened, proxy->id);
374 374
375 DLL_remove(proxy->spdy_connection->proxies_head, proxy->spdy_connection->proxies_tail, proxy);
375 if(proxy->http_active) 376 if(proxy->http_active)
376 { 377 {
377 proxy->spdy_active = false; 378 proxy->spdy_active = false;
378 //DLL_remove(proxy->spdy_connection->proxies_head, proxy->spdy_connection->proxies_tail, proxy);
379 } 379 }
380 else 380 else
381 { 381 {
382 PRINT_INFO2("proxy free close id %i ", proxy->id); 382 free_proxy(proxy);
383 //DLL_remove(proxy->spdy_connection->proxies_head, proxy->spdy_connection->proxies_tail, proxy);
384 //free_proxy(proxy);
385 } 383 }
386} 384}
387 385
@@ -773,25 +771,27 @@ void
773spdy_free_connection(struct SPDY_Connection * connection) 771spdy_free_connection(struct SPDY_Connection * connection)
774{ 772{
775 struct Proxy *proxy; 773 struct Proxy *proxy;
774 struct Proxy *proxy_next;
776 775
777 if(NULL != connection) 776 if(NULL != connection)
778 { 777 {
779 for(proxy = connection->proxies_head; NULL != proxy; proxy=proxy->next) 778 for(proxy = connection->proxies_head; NULL != proxy; proxy=proxy_next)
780 { 779 {
780 proxy_next = proxy->next;
781 DLL_remove(connection->proxies_head, connection->proxies_tail, proxy); 781 DLL_remove(connection->proxies_head, connection->proxies_tail, proxy);
782 proxy->spdy_active = false; 782 proxy->spdy_active = false;
783 proxy->spdy_error = true; 783 proxy->spdy_error = true;
784 PRINT_INFO2("spdy_free_connection for id %i", proxy->id); 784 PRINT_INFO2("spdy_free_connection for id %i", proxy->id);
785 if(!proxy->http_active) 785 if(!proxy->http_active)
786 { 786 {
787 //free_proxy(proxy); 787 free_proxy(proxy);
788 } 788 }
789 } 789 }
790 spdylay_session_del(connection->session); 790 spdylay_session_del(connection->session);
791 SSL_free(connection->ssl); 791 SSL_free(connection->ssl);
792 free(connection->host); 792 free(connection->host);
793 //free(connection); 793 free(connection);
794 connection->session = NULL; 794 //connection->session = NULL;
795 } 795 }
796} 796}
797 797