[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28635 - libmicrohttpd/src/examples
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28635 - libmicrohttpd/src/examples |
Date: |
Thu, 15 Aug 2013 00:18:35 +0200 |
Author: andreyu
Date: 2013-08-15 00:18:34 +0200 (Thu, 15 Aug 2013)
New Revision: 28635
Modified:
libmicrohttpd/src/examples/spdy_event_loop.c
Log:
spdy:warnings fixed in event loop example
Modified: libmicrohttpd/src/examples/spdy_event_loop.c
===================================================================
--- libmicrohttpd/src/examples/spdy_event_loop.c 2013-08-14 20:16:04 UTC
(rev 28634)
+++ libmicrohttpd/src/examples/spdy_event_loop.c 2013-08-14 22:18:34 UTC
(rev 28635)
@@ -22,7 +22,7 @@
* PROGRAM
* @author Andrey Uzunov
*/
-
+
#include "platform.h"
#include <unistd.h>
#include <stdlib.h>
@@ -55,6 +55,8 @@
new_session_callback (void *cls,
struct SPDY_Session * session)
{
+ (void)cls;
+
char ipstr[1024];
struct sockaddr *addr;
@@ -96,6 +98,9 @@
struct SPDY_Session * session,
int by_client)
{
+ (void)cls;
+ (void)session;
+
//printf("session_closed_handler called\n");
if(SPDY_YES != by_client)
@@ -139,7 +144,7 @@
free(cls);
}
-
+/*
static int
print_headers (void *cls,
const char *name, const char *value)
@@ -148,7 +153,9 @@
printf("%s: %s\n",name,value);
return SPDY_YES;
}
+ */
+
/*
void
new_request_cb (void *cls,
@@ -202,6 +209,8 @@
struct SPDY_NameValue * headers,
bool more)
{
+ (void)more;
+
char *html;
char *data;
struct SPDY_Response *response=NULL;
@@ -267,6 +276,10 @@
size_t size,
bool more)
{
+ (void)cls;
+ (void)request;
+ (void)more;
+
printf("DATA:\n===============================\n");
write(0, buf, size);
printf("\n===============================\n");
@@ -277,7 +290,9 @@
static void
sig_handler(int signo)
{
- printf("received signal\n");
+ (void)signo;
+
+ printf("received signal\n");
}
@@ -293,13 +308,15 @@
SPDY_init();
- struct sockaddr_in addr4;
+ /*
+ struct sockaddr_in addr4;
struct in_addr inaddr4;
inaddr4.s_addr = htonl(INADDR_ANY);
addr4.sin_family = AF_INET;
addr4.sin_addr = inaddr4;
addr4.sin_port = htons(atoi(argv[1]));
-
+ */
+
struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]),
DATA_DIR "cert-and-key.pem",
DATA_DIR "cert-and-key.pem",
@@ -313,11 +330,13 @@
return 1;
}
+ /*
struct sockaddr_in6 addr6;
addr6.sin6_family = AF_INET6;
addr6.sin6_addr = in6addr_any;
addr6.sin6_port = htons(atoi(argv[1]) + 1);
-
+ */
+
struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1,
DATA_DIR "cert-and-key.pem",
DATA_DIR "cert-and-key.pem",
@@ -363,7 +382,7 @@
timeout.tv_usec = (timeoutlong % 1000) * 1000;
}
- printf("ret=%i; timeoutlong=%i; sec=%i; usec=%i\n", ret,
timeoutlong, timeout.tv_sec, timeout.tv_usec);
+ printf("ret=%i; timeoutlong=%llu; sec=%llu; usec=%llu\n", ret,
timeoutlong, (long long unsigned)timeout.tv_sec, (long long
unsigned)timeout.tv_usec);
//raise(SIGINT);
/* get file descriptors from the transfers */
@@ -395,7 +414,7 @@
}
else if(daemon != NULL){
- printf("%i loops in %i secs\n", loops, time(NULL) - start);
+ printf("%lu loops in %llu secs\n", loops, (long long
unsigned)(time(NULL) - start));
SPDY_stop_daemon(daemon);
daemon=NULL;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28635 - libmicrohttpd/src/examples,
gnunet <=