aboutsummaryrefslogtreecommitdiff
path: root/src/examples/spdy_event_loop.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-06-27 14:41:35 +0000
committerChristian Grothoff <christian@grothoff.org>2013-06-27 14:41:35 +0000
commitfe8202d39c32032b68a7a6760651c843b2e3e16d (patch)
treecc92301b6c92767d65912c24d5b9accb4361efc1 /src/examples/spdy_event_loop.c
parent79f2eea2629367ca402671cf7d033e52de0f9e8a (diff)
downloadlibmicrohttpd-fe8202d39c32032b68a7a6760651c843b2e3e16d.tar.gz
libmicrohttpd-fe8202d39c32032b68a7a6760651c843b2e3e16d.zip
-fixing misc minor bugs and compiler warnings in libmicrospdy
Diffstat (limited to 'src/examples/spdy_event_loop.c')
-rw-r--r--src/examples/spdy_event_loop.c36
1 files changed, 23 insertions, 13 deletions
diff --git a/src/examples/spdy_event_loop.c b/src/examples/spdy_event_loop.c
index e5bac293..a716028f 100644
--- a/src/examples/spdy_event_loop.c
+++ b/src/examples/spdy_event_loop.c
@@ -41,15 +41,17 @@
41//#include "../framinglayer/structures.h" 41//#include "../framinglayer/structures.h"
42//#include "../applicationlayer/alstructures.h" 42//#include "../applicationlayer/alstructures.h"
43 43
44int run = 1; 44static int run = 1;
45int run2 = 1; 45
46static int run2 = 1;
46 47
47 48
48 uint64_t loops; 49static uint64_t loops;
49 time_t start;
50 50
51static time_t start;
51 52
52void 53
54static void
53new_session_callback (void *cls, 55new_session_callback (void *cls,
54 struct SPDY_Session * session) 56 struct SPDY_Session * session)
55{ 57{
@@ -88,7 +90,8 @@ new_session_callback (void *cls,
88 } 90 }
89} 91}
90 92
91void 93
94static void
92session_closed_handler (void *cls, 95session_closed_handler (void *cls,
93 struct SPDY_Session * session, 96 struct SPDY_Session * session,
94 int by_client) 97 int by_client)
@@ -108,7 +111,8 @@ session_closed_handler (void *cls,
108 //session_closed_called = 1; 111 //session_closed_called = 1;
109} 112}
110 113
111void 114
115static void
112response_done_callback(void *cls, 116response_done_callback(void *cls,
113 struct SPDY_Response *response, 117 struct SPDY_Response *response,
114 struct SPDY_Request *request, 118 struct SPDY_Request *request,
@@ -135,7 +139,8 @@ response_done_callback(void *cls,
135 free(cls); 139 free(cls);
136} 140}
137 141
138int 142
143static int
139print_headers (void *cls, 144print_headers (void *cls,
140 const char *name, const char *value) 145 const char *name, const char *value)
141{ 146{
@@ -163,11 +168,12 @@ new_request_cb (void *cls,
163} 168}
164*/ 169*/
165 170
166int 171
172static int
167append_headers_to_data (void *cls, 173append_headers_to_data (void *cls,
168 const char *name, const char **value, int num_values) 174 const char *name, const char * const *value, int num_values)
169{ 175{
170 char **data = (char **)cls; 176 char **data = cls;
171 void *tofree = *data; 177 void *tofree = *data;
172 int i; 178 int i;
173 179
@@ -183,7 +189,8 @@ append_headers_to_data (void *cls,
183 return SPDY_YES; 189 return SPDY_YES;
184} 190}
185 191
186void 192
193static void
187standard_request_handler(void *cls, 194standard_request_handler(void *cls,
188 struct SPDY_Request * request, 195 struct SPDY_Request * request,
189 uint8_t priority, 196 uint8_t priority,
@@ -251,11 +258,14 @@ standard_request_handler(void *cls,
251 } 258 }
252} 259}
253 260
254void sig_handler(int signo) 261
262static void
263sig_handler(int signo)
255{ 264{
256 printf("received signal\n"); 265 printf("received signal\n");
257} 266}
258 267
268
259int 269int
260main (int argc, char *const *argv) 270main (int argc, char *const *argv)
261{ 271{