diff options
Diffstat (limited to 'src/testspdy/test_request_response_with_callback.c')
-rw-r--r-- | src/testspdy/test_request_response_with_callback.c | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/src/testspdy/test_request_response_with_callback.c b/src/testspdy/test_request_response_with_callback.c index 6eed8eba..7cc4f7ac 100644 --- a/src/testspdy/test_request_response_with_callback.c +++ b/src/testspdy/test_request_response_with_callback.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * @brief tests responses with callbacks | 21 | * @brief tests responses with callbacks |
22 | * @author Andrey Uzunov | 22 | * @author Andrey Uzunov |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include "platform.h" | 25 | #include "platform.h" |
26 | #include "microspdy.h" | 26 | #include "microspdy.h" |
27 | #include "stdio.h" | 27 | #include "stdio.h" |
@@ -85,10 +85,14 @@ response_callback (void *cls, | |||
85 | 85 | ||
86 | void | 86 | void |
87 | response_done_callback(void *cls, | 87 | response_done_callback(void *cls, |
88 | struct SPDY_Response *response, | 88 | struct SPDY_Response * response, |
89 | struct SPDY_Request *request, | 89 | struct SPDY_Request * request, |
90 | enum SPDY_RESPONSE_RESULT status, | ||
90 | bool streamopened) | 91 | bool streamopened) |
91 | { | 92 | { |
93 | (void)status; | ||
94 | (void)streamopened; | ||
95 | |||
92 | printf("answer for %s was sent\n", (char*)cls); | 96 | printf("answer for %s was sent\n", (char*)cls); |
93 | 97 | ||
94 | SPDY_destroy_request(request); | 98 | SPDY_destroy_request(request); |
@@ -107,8 +111,19 @@ standard_request_handler(void *cls, | |||
107 | const char *version, | 111 | const char *version, |
108 | const char *host, | 112 | const char *host, |
109 | const char *scheme, | 113 | const char *scheme, |
110 | struct SPDY_NameValue * headers) | 114 | struct SPDY_NameValue * headers, |
115 | bool more) | ||
111 | { | 116 | { |
117 | (void)cls; | ||
118 | (void)request; | ||
119 | (void)priority; | ||
120 | (void)host; | ||
121 | (void)scheme; | ||
122 | (void)headers; | ||
123 | (void)method; | ||
124 | (void)version; | ||
125 | (void)more; | ||
126 | |||
112 | struct SPDY_Response *response=NULL; | 127 | struct SPDY_Response *response=NULL; |
113 | struct SPDY_NameValue *resp_headers; | 128 | struct SPDY_NameValue *resp_headers; |
114 | 129 | ||
@@ -271,7 +286,7 @@ childproc() | |||
271 | if(0 == ret && 0 == stat(DATA_DIR "spdy-draft.txt", &st)) | 286 | if(0 == ret && 0 == stat(DATA_DIR "spdy-draft.txt", &st)) |
272 | { | 287 | { |
273 | usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec; | 288 | usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec; |
274 | printf("%i bytes read in %i usecs\n", st.st_size, usecs); | 289 | printf("%lld bytes read in %llu usecs\n", (long long)st.st_size, (long long unsigned )usecs); |
275 | } | 290 | } |
276 | 291 | ||
277 | return ret; | 292 | return ret; |
@@ -279,7 +294,7 @@ childproc() | |||
279 | 294 | ||
280 | 295 | ||
281 | int | 296 | int |
282 | main(int argc, char **argv) | 297 | main() |
283 | { | 298 | { |
284 | port = get_port(11123); | 299 | port = get_port(11123); |
285 | parent = getpid(); | 300 | parent = getpid(); |