diff options
Diffstat (limited to 'src/examples/mhd2spdy_spdy.c')
-rw-r--r-- | src/examples/mhd2spdy_spdy.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/examples/mhd2spdy_spdy.c b/src/examples/mhd2spdy_spdy.c index 2c06ef88..2bc87976 100644 --- a/src/examples/mhd2spdy_spdy.c +++ b/src/examples/mhd2spdy_spdy.c | |||
@@ -334,7 +334,7 @@ spdy_cb_on_ctrl_recv(spdylay_session *session, | |||
334 | break; | 334 | break; |
335 | case SPDYLAY_RST_STREAM: | 335 | case SPDYLAY_RST_STREAM: |
336 | PRINT_INFO2("received reset stream for %s", proxy->url); | 336 | PRINT_INFO2("received reset stream for %s", proxy->url); |
337 | proxy->error = true; | 337 | proxy->spdy_error = true; |
338 | break; | 338 | break; |
339 | case SPDYLAY_HEADERS: | 339 | case SPDYLAY_HEADERS: |
340 | PRINT_INFO2("received headers for %s", proxy->url); | 340 | PRINT_INFO2("received headers for %s", proxy->url); |
@@ -398,7 +398,13 @@ spdy_cb_on_data_chunk_recv(spdylay_session *session, | |||
398 | 398 | ||
399 | struct Proxy *proxy; | 399 | struct Proxy *proxy; |
400 | proxy = spdylay_session_get_stream_user_data(session, stream_id); | 400 | proxy = spdylay_session_get_stream_user_data(session, stream_id); |
401 | 401 | ||
402 | if(NULL == proxy) | ||
403 | { | ||
404 | PRINT_INFO("proxy in spdy_cb_on_data_chunk_recv is NULL)"); | ||
405 | return; | ||
406 | } | ||
407 | |||
402 | if(!copy_buffer(data, len, &proxy->http_body, &proxy->http_body_size)) | 408 | if(!copy_buffer(data, len, &proxy->http_body, &proxy->http_body_size)) |
403 | { | 409 | { |
404 | //TODO handle it better? | 410 | //TODO handle it better? |
@@ -1076,9 +1082,9 @@ spdy_run_select(fd_set * read_fd_set, | |||
1076 | else | 1082 | else |
1077 | { | 1083 | { |
1078 | PRINT_INFO("not called"); | 1084 | PRINT_INFO("not called"); |
1079 | PRINT_INFO2("connection->want_io %i",connections[i]->want_io); | 1085 | //PRINT_INFO2("connection->want_io %i",connections[i]->want_io); |
1080 | PRINT_INFO2("read %i",spdylay_session_want_read(connections[i]->session)); | 1086 | //PRINT_INFO2("read %i",spdylay_session_want_read(connections[i]->session)); |
1081 | PRINT_INFO2("write %i",spdylay_session_want_write(connections[i]->session)); | 1087 | //PRINT_INFO2("write %i",spdylay_session_want_write(connections[i]->session)); |
1082 | //raise(SIGINT); | 1088 | //raise(SIGINT); |
1083 | } | 1089 | } |
1084 | } | 1090 | } |