[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 03/04: resume_suspended_connections(): mino
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 03/04: resume_suspended_connections(): minor optimization |
Date: |
Thu, 11 May 2017 21:39:45 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 02f1f5e5cc70380f1e8a110d7bab9986a56f43e7
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Thu May 11 22:29:11 2017 +0300
resume_suspended_connections(): minor optimization
---
src/microhttpd/daemon.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 551aa4ed..2a88ea83 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -2833,6 +2833,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
struct MHD_Connection *pos;
struct MHD_Connection *prev = NULL;
int ret;
+ const bool used_thr_p_c = (0 != (daemon->options &
MHD_USE_THREAD_PER_CONNECTION));
ret = MHD_NO;
MHD_mutex_lock_chk_ (&daemon->cleanup_connection_mutex);
@@ -2870,7 +2871,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
DLL_insert (daemon->connections_head,
daemon->connections_tail,
pos);
- if (0 == (daemon->options & MHD_USE_THREAD_PER_CONNECTION))
+ if (!used_thr_p_c)
{
/* Reset timeout timer on resume. */
if (0 != pos->connection_timeout)
@@ -2916,7 +2917,7 @@ resume_suspended_connections (struct MHD_Daemon *daemon)
pos->resuming = false;
}
MHD_mutex_unlock_chk_ (&daemon->cleanup_connection_mutex);
- if ( (0 != (daemon->options & MHD_USE_THREAD_PER_CONNECTION)) &&
+ if ( (used_thr_p_c) &&
(MHD_NO != ret) )
{ /* Wake up suspended connections. */
if (! MHD_itc_activate_(daemon->itc,
--
To stop receiving notification emails like this one, please contact
address@hidden