-const char jcc_rcs[] = "$Id: jcc.c,v 1.371 2011/10/23 11:24:33 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.374 2011/11/06 11:58:51 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jcc.c,v $
privoxy_mutex_t rand_mutex;
#endif /* ndef HAVE_RANDOM */
-#ifdef HAVE_STRTOK
-privoxy_mutex_t strtok_mutex;
-#endif /* def HAVE_STRTOK */
-
#endif /* def MUTEX_LOCKS_AVAILABLE */
#if defined(unix)
* Description : Read the client's request (more precisely the
* client headers) and answer it if necessary.
*
- * Note that since we're not using select() we could get
- * blocked here if a client connected, then didn't say
- * anything!
- *
* Parameters :
* 1 : csp = Current client state (buffers, headers, etc...)
*
*********************************************************************/
static void prepare_csp_for_next_request(struct client_state *csp)
{
+ unsigned int toggled_on_flag_set = (0 != (csp->flags & CSP_FLAG_TOGGLED_ON));
+
csp->content_type = 0;
csp->content_length = 0;
csp->expected_content_length = 0;
csp->fwd = NULL;
}
/* XXX: Store per-connection flags someplace else. */
- csp->flags &= CSP_FLAG_TOGGLED_ON;
- csp->flags |= CSP_FLAG_ACTIVE;
- csp->flags |= CSP_FLAG_REUSED_CLIENT_CONNECTION;
+ csp->flags = (CSP_FLAG_ACTIVE | CSP_FLAG_REUSED_CLIENT_CONNECTION);
+ if (toggled_on_flag_set)
+ {
+ csp->flags |= CSP_FLAG_TOGGLED_ON;
+ }
}
#endif /* def FEATURE_CONNECTION_KEEP_ALIVE */
privoxy_mutex_init(&rand_mutex);
#endif /* ndef HAVE_RANDOM */
-#ifdef HAVE_STRTOK
- privoxy_mutex_init(&strtok_mutex);
-#endif /* def HAVE_STRTOK */
#endif /* def MUTEX_LOCKS_AVAILABLE */
}