aboutsummaryrefslogtreecommitdiff
path: root/src/testspdy/test_new_connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/testspdy/test_new_connection.c')
-rw-r--r--src/testspdy/test_new_connection.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/testspdy/test_new_connection.c b/src/testspdy/test_new_connection.c
index 1a9e47a4..b07a0e84 100644
--- a/src/testspdy/test_new_connection.c
+++ b/src/testspdy/test_new_connection.c
@@ -24,7 +24,7 @@
24 * @author Tatsuhiro Tsujikawa 24 * @author Tatsuhiro Tsujikawa
25 */ 25 */
26 26
27 //TODO child exits with ret val 1 sometimes 27//TODO child exits with ret val 1 sometimes
28 28
29#include "platform.h" 29#include "platform.h"
30#include "microspdy.h" 30#include "microspdy.h"
@@ -44,12 +44,17 @@ pid_t child;
44int 44int
45spdylay_printf(const char *format, ...) 45spdylay_printf(const char *format, ...)
46{ 46{
47 (void)format;
48
47 return 0; 49 return 0;
48} 50}
49 51
50int 52int
51spdylay_fprintf(FILE *stream, const char *format, ...) 53spdylay_fprintf(FILE *stream, const char *format, ...)
52{ 54{
55 (void)stream;
56 (void)format;
57
53 return 0; 58 return 0;
54} 59}
55 60
@@ -215,6 +220,9 @@ static ssize_t send_callback(spdylay_session *session,
215 const uint8_t *data, size_t length, int flags, 220 const uint8_t *data, size_t length, int flags,
216 void *user_data) 221 void *user_data)
217{ 222{
223 (void)session;
224 (void)flags;
225
218 struct Connection *connection; 226 struct Connection *connection;
219 ssize_t rv; 227 ssize_t rv;
220 connection = (struct Connection*)user_data; 228 connection = (struct Connection*)user_data;
@@ -244,6 +252,9 @@ static ssize_t recv_callback(spdylay_session *session,
244 uint8_t *buf, size_t length, int flags, 252 uint8_t *buf, size_t length, int flags,
245 void *user_data) 253 void *user_data)
246{ 254{
255 (void)session;
256 (void)flags;
257
247 struct Connection *connection; 258 struct Connection *connection;
248 ssize_t rv; 259 ssize_t rv;
249 connection = (struct Connection*)user_data; 260 connection = (struct Connection*)user_data;
@@ -276,6 +287,8 @@ static void before_ctrl_send_callback(spdylay_session *session,
276 spdylay_frame *frame, 287 spdylay_frame *frame,
277 void *user_data) 288 void *user_data)
278{ 289{
290 (void)user_data;
291
279 if(type == SPDYLAY_SYN_STREAM) { 292 if(type == SPDYLAY_SYN_STREAM) {
280 struct Request *req; 293 struct Request *req;
281 int stream_id = frame->syn_stream.stream_id; 294 int stream_id = frame->syn_stream.stream_id;
@@ -291,6 +304,8 @@ static void on_ctrl_send_callback(spdylay_session *session,
291 spdylay_frame_type type, 304 spdylay_frame_type type,
292 spdylay_frame *frame, void *user_data) 305 spdylay_frame *frame, void *user_data)
293{ 306{
307 (void)user_data;
308
294 char **nv; 309 char **nv;
295 const char *name = NULL; 310 const char *name = NULL;
296 int32_t stream_id; 311 int32_t stream_id;
@@ -316,6 +331,8 @@ static void on_ctrl_recv_callback(spdylay_session *session,
316 spdylay_frame_type type, 331 spdylay_frame_type type,
317 spdylay_frame *frame, void *user_data) 332 spdylay_frame *frame, void *user_data)
318{ 333{
334 (void)user_data;
335
319 struct Request *req; 336 struct Request *req;
320 char **nv; 337 char **nv;
321 const char *name = NULL; 338 const char *name = NULL;
@@ -359,6 +376,8 @@ static void on_stream_close_callback(spdylay_session *session,
359 spdylay_status_code status_code, 376 spdylay_status_code status_code,
360 void *user_data) 377 void *user_data)
361{ 378{
379 (void)user_data;
380 (void)status_code;
362 struct Request *req; 381 struct Request *req;
363 req = spdylay_session_get_stream_user_data(session, stream_id); 382 req = spdylay_session_get_stream_user_data(session, stream_id);
364 if(req) { 383 if(req) {
@@ -381,6 +400,9 @@ static void on_data_chunk_recv_callback(spdylay_session *session, uint8_t flags,
381 const uint8_t *data, size_t len, 400 const uint8_t *data, size_t len,
382 void *user_data) 401 void *user_data)
383{ 402{
403 (void)user_data;
404 (void)flags;
405
384 struct Request *req; 406 struct Request *req;
385 req = spdylay_session_get_stream_user_data(session, stream_id); 407 req = spdylay_session_get_stream_user_data(session, stream_id);
386 if(req) { 408 if(req) {
@@ -441,6 +463,8 @@ static int select_next_proto_cb(SSL* ssl,
441 const unsigned char *in, unsigned int inlen, 463 const unsigned char *in, unsigned int inlen,
442 void *arg) 464 void *arg)
443{ 465{
466 (void)ssl;
467
444 int rv; 468 int rv;
445 uint16_t *spdy_proto_version; 469 uint16_t *spdy_proto_version;
446 /* spdylay_select_next_protocol() selects SPDY protocol version the 470 /* spdylay_select_next_protocol() selects SPDY protocol version the
@@ -799,7 +823,7 @@ new_session_callback (void *cls,
799{ 823{
800 char ipstr[1024]; 824 char ipstr[1024];
801 825
802 const struct sockaddr *addr; 826 struct sockaddr *addr;
803 socklen_t addr_len = SPDY_get_remote_addr(session, &addr); 827 socklen_t addr_len = SPDY_get_remote_addr(session, &addr);
804 828
805 if(!addr_len) 829 if(!addr_len)
@@ -955,7 +979,7 @@ parentproc(int child)
955 return 0; 979 return 0;
956} 980}
957 981
958int main(int argc, char **argv) 982int main()
959{ 983{
960 port = get_port(14123); 984 port = get_port(14123);
961 parent = getpid(); 985 parent = getpid();