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.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/examples/mhd2spdy_spdy.c b/src/examples/mhd2spdy_spdy.c
index 99b2a3a1..9c5b94f5 100644
--- a/src/examples/mhd2spdy_spdy.c
+++ b/src/examples/mhd2spdy_spdy.c
@@ -70,9 +70,14 @@ void spdy_diec(const char *func, int error_code)
70 * spdylay_send_callback for the details. 70 * spdylay_send_callback for the details.
71 */ 71 */
72static ssize_t spdy_cb_send(spdylay_session *session, 72static ssize_t spdy_cb_send(spdylay_session *session,
73 const uint8_t *data, size_t length, int flags, 73 const uint8_t *data,
74 size_t length,
75 int flags,
74 void *user_data) 76 void *user_data)
75{ 77{
78 (void)session;
79 (void)flags;
80
76 //PRINT_INFO("spdy_cb_send called"); 81 //PRINT_INFO("spdy_cb_send called");
77 struct SPDY_Connection *connection; 82 struct SPDY_Connection *connection;
78 ssize_t rv; 83 ssize_t rv;
@@ -129,6 +134,9 @@ static ssize_t spdy_cb_recv(spdylay_session *session,
129 uint8_t *buf, size_t length, int flags, 134 uint8_t *buf, size_t length, int flags,
130 void *user_data) 135 void *user_data)
131{ 136{
137 (void)session;
138 (void)flags;
139
132 struct SPDY_Connection *connection; 140 struct SPDY_Connection *connection;
133 ssize_t rv; 141 ssize_t rv;
134 142
@@ -199,6 +207,8 @@ static void spdy_cb_on_ctrl_send(spdylay_session *session,
199 spdylay_frame_type type, 207 spdylay_frame_type type,
200 spdylay_frame *frame, void *user_data) 208 spdylay_frame *frame, void *user_data)
201{ 209{
210 (void)user_data;
211
202 //char **nv; 212 //char **nv;
203 //const char *name = NULL; 213 //const char *name = NULL;
204 int32_t stream_id; 214 int32_t stream_id;
@@ -224,6 +234,8 @@ void spdy_cb_on_ctrl_recv(spdylay_session *session,
224 spdylay_frame_type type, 234 spdylay_frame_type type,
225 spdylay_frame *frame, void *user_data) 235 spdylay_frame *frame, void *user_data)
226{ 236{
237 (void)user_data;
238
227 //struct SPDY_Request *req; 239 //struct SPDY_Request *req;
228 char **nv; 240 char **nv;
229 //const char *name = NULL; 241 //const char *name = NULL;
@@ -284,6 +296,9 @@ static void spdy_cb_on_stream_close(spdylay_session *session,
284 spdylay_status_code status_code, 296 spdylay_status_code status_code,
285 void *user_data) 297 void *user_data)
286{ 298{
299 (void)status_code;
300 (void)user_data;
301
287 struct Proxy * proxy = spdylay_session_get_stream_user_data(session, stream_id); 302 struct Proxy * proxy = spdylay_session_get_stream_user_data(session, stream_id);
288 303
289 assert(NULL != proxy); 304 assert(NULL != proxy);
@@ -312,6 +327,9 @@ static void spdy_cb_on_data_chunk_recv(spdylay_session *session, uint8_t flags,
312 const uint8_t *data, size_t len, 327 const uint8_t *data, size_t len,
313 void *user_data) 328 void *user_data)
314{ 329{
330 (void)flags;
331 (void)user_data;
332
315 //struct SPDY_Request *req; 333 //struct SPDY_Request *req;
316 struct Proxy *proxy; 334 struct Proxy *proxy;
317 proxy = spdylay_session_get_stream_user_data(session, stream_id); 335 proxy = spdylay_session_get_stream_user_data(session, stream_id);
@@ -335,6 +353,9 @@ static void spdy_cb_on_data_chunk_recv(spdylay_session *session, uint8_t flags,
335static void spdy_cb_on_data_recv(spdylay_session *session, 353static void spdy_cb_on_data_recv(spdylay_session *session,
336 uint8_t flags, int32_t stream_id, int32_t length, void *user_data) 354 uint8_t flags, int32_t stream_id, int32_t length, void *user_data)
337{ 355{
356 (void)length;
357 (void)user_data;
358
338 if(flags & SPDYLAY_DATA_FLAG_FIN) 359 if(flags & SPDYLAY_DATA_FLAG_FIN)
339 { 360 {
340 struct Proxy *proxy; 361 struct Proxy *proxy;
@@ -373,6 +394,8 @@ static int spdy_cb_ssl_select_next_proto(SSL* ssl,
373 const unsigned char *in, unsigned int inlen, 394 const unsigned char *in, unsigned int inlen,
374 void *arg) 395 void *arg)
375{ 396{
397 (void)ssl;
398
376 //PRINT_INFO("spdy_cb_ssl_select_next_proto"); 399 //PRINT_INFO("spdy_cb_ssl_select_next_proto");
377 int rv; 400 int rv;
378 uint16_t *spdy_proto_version; 401 uint16_t *spdy_proto_version;
@@ -505,6 +528,8 @@ bool spdy_ctl_select(fd_set * read_fd_set,
505 fd_set * except_fd_set, 528 fd_set * except_fd_set,
506 struct SPDY_Connection *connection) 529 struct SPDY_Connection *connection)
507{ 530{
531 (void)except_fd_set;
532
508 bool ret = false; 533 bool ret = false;
509 534
510 if(spdylay_session_want_read(connection->session) || 535 if(spdylay_session_want_read(connection->session) ||
@@ -687,7 +712,7 @@ spdy_request(const char **nv, struct Proxy *proxy)
687 712
688 713
689void 714void
690spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], int max_size, nfds_t *real_size) 715spdy_get_pollfdset(struct pollfd fds[], struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size)
691{ 716{
692 struct SPDY_Connection *connection; 717 struct SPDY_Connection *connection;
693 struct Proxy *proxy; 718 struct Proxy *proxy;
@@ -756,7 +781,7 @@ int
756spdy_get_selectfdset(fd_set * read_fd_set, 781spdy_get_selectfdset(fd_set * read_fd_set,
757 fd_set * write_fd_set, 782 fd_set * write_fd_set,
758 fd_set * except_fd_set, 783 fd_set * except_fd_set,
759 struct SPDY_Connection *connections[], int max_size, nfds_t *real_size) 784 struct SPDY_Connection *connections[], unsigned int max_size, nfds_t *real_size)
760{ 785{
761 struct SPDY_Connection *connection; 786 struct SPDY_Connection *connection;
762 struct Proxy *proxy; 787 struct Proxy *proxy;