[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r28224 - libmicrohttpd/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r28224 - libmicrohttpd/src/microhttpd |
Date: |
Sun, 21 Jul 2013 18:05:48 +0200 |
Author: andreyu
Date: 2013-07-21 18:05:48 +0200 (Sun, 21 Jul 2013)
New Revision: 28224
Modified:
libmicrohttpd/src/microhttpd/connection.c
libmicrohttpd/src/microhttpd/connection_https.c
libmicrohttpd/src/microhttpd/daemon.c
Log:
microhttpd: put "#if EPOLL_SUPPORT" everywhere, so compilation can succeed even
when it is disabled
Modified: libmicrohttpd/src/microhttpd/connection.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection.c 2013-07-21 12:51:38 UTC (rev
28223)
+++ libmicrohttpd/src/microhttpd/connection.c 2013-07-21 16:05:48 UTC (rev
28224)
@@ -2435,6 +2435,7 @@
return MHD_YES;
}
MHD_connection_update_event_loop_info (connection);
+#if EPOLL_SUPPORT
switch (connection->event_loop_info)
{
case MHD_EVENT_LOOP_INFO_READ:
@@ -2472,7 +2473,6 @@
/* This connection is finished, nothing left to do */
break;
}
-#if EPOLL_SUPPORT
return MHD_connection_epoll_update_ (connection);
#else
return MHD_YES;
Modified: libmicrohttpd/src/microhttpd/connection_https.c
===================================================================
--- libmicrohttpd/src/microhttpd/connection_https.c 2013-07-21 12:51:38 UTC
(rev 28223)
+++ libmicrohttpd/src/microhttpd/connection_https.c 2013-07-21 16:05:48 UTC
(rev 28224)
@@ -157,7 +157,11 @@
return MHD_YES;
return MHD_connection_handle_idle (connection);
}
+#if EPOLL_SUPPORT
return MHD_connection_epoll_update_ (connection);
+#else
+ return MHD_YES;
+#endif
}
Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c 2013-07-21 12:51:38 UTC (rev
28223)
+++ libmicrohttpd/src/microhttpd/daemon.c 2013-07-21 16:05:48 UTC (rev
28224)
@@ -401,7 +401,9 @@
(GNUTLS_E_INTERRUPTED == res) )
{
errno = EINTR;
+#if EPOLL_SUPPORT
connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY;
+#endif
return -1;
}
if (res < 0)
@@ -441,7 +443,9 @@
{
fprintf (stderr, "WAGAIN!\n");
errno = EINTR;
+#if EPOLL_SUPPORT
connection->epoll_state &= ~MHD_EPOLL_STATE_WRITE_READY;
+#endif
return -1;
}
return res;
@@ -3344,8 +3348,10 @@
free_and_fail:
/* clean up basic memory state in 'daemon' and return NULL to
indicate failure */
+#if EPOLL_SUPPORT
if (-1 != daemon->epoll_fd)
close (daemon->epoll_fd);
+#endif
#ifdef DAUTH_SUPPORT
free (daemon->nnc);
pthread_mutex_destroy (&daemon->nnc_lock);
@@ -3532,9 +3538,11 @@
MHD_PANIC ("Failed to join a thread\n");
close_all_connections (&daemon->worker_pool[i]);
pthread_mutex_destroy
(&daemon->worker_pool[i].cleanup_connection_mutex);
+#if EPOLL_SUPPORT
if ( (-1 != daemon->worker_pool[i].epoll_fd) &&
(0 != CLOSE (daemon->worker_pool[i].epoll_fd)) )
MHD_PANIC ("close failed\n");
+#endif
}
free (daemon->worker_pool);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r28224 - libmicrohttpd/src/microhttpd,
gnunet <=